1

I have a requirement to create a WCF restful service containing couple of operation contracts, where one of the operation contract of type GET takes input parameter as a string ID and returns a MessgeContract(as I needed to modify the SOAP body structure, i used MessageContract).

Now, when I browse the service http://appname/service1.svc in browser, it throws exception, saying that service method cannot use primitive parameters and MessageContract return type together, but when I execute the service method as : http://appname/service1.svc/Method1?ID=2, it works, and gives me required output and does not throw any exception. Should I still keep using it, as all my Operation Contract methods execute correctly without exception except the service, what shall I do to improve this.

daisy
  • 277
  • 1
  • 5
  • 16

0 Answers0