Marc Davis
asked on
WCF REST Service with POST
I am attempting to resolve an issue WCF Rest Service and I am able to step through debug in one way:
I am able to step-through by calling on the URL specifying the method on the URL:
But what I really needed is more like an object in the RequestBody. So, I originally had:
I am getting this:
And it does not even hit the breakpoint.
When I do the first operation contract I had to change the signature of the method. But when I do that and use the GET as well as update the URITemplate it works and I hit the break point but when I change it to a POST and use the object GetTestMemberReq. I get the above?
If the first one is working my config changes should be good.
I am using C#, .NET 4.0, and VS 2017.
Any information as to what I might be doing incorrectly.
Very much appreciated.
I am able to step-through by calling on the URL specifying the method on the URL:
[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "/GetMember/{strTest}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string GetMember(string strTest);
But what I really needed is more like an object in the RequestBody. So, I originally had:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/GetMember", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
GetTestMemberRes GetMember(GetTestMemberReq TestMemberReq);
I am getting this:
And it does not even hit the breakpoint.
When I do the first operation contract I had to change the signature of the method. But when I do that and use the GET as well as update the URITemplate it works and I hit the break point but when I change it to a POST and use the object GetTestMemberReq. I get the above?
If the first one is working my config changes should be good.
I am using C#, .NET 4.0, and VS 2017.
Any information as to what I might be doing incorrectly.
Very much appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Personally I use postman as referenced by käµfm³d 👽
ASKER
käµfm³d 👽 and Daviod, ok gotchya on that. Makes sense because I was thinking there could to a crazy amount the address bar which had my shaking my head.
Ok relation to the tools. Would SOAPUI suffice to your knowledge? I'm not against Fiddler or Postman or anything like that it's just I am hamstrung on what is installed. Do not have the localadmin access nor have the ability to install anything. It's the GPO. GPO's, serve a purpose, but the purpose and impact needs to be really managed well to not hinder.
That said, I do have SOAPUI installed...would that suffice I know it has the REST aspects in it. Or wouldn't event the F12 aspects of like Chrome work for this?
Ok relation to the tools. Would SOAPUI suffice to your knowledge? I'm not against Fiddler or Postman or anything like that it's just I am hamstrung on what is installed. Do not have the localadmin access nor have the ability to install anything. It's the GPO. GPO's, serve a purpose, but the purpose and impact needs to be really managed well to not hinder.
That said, I do have SOAPUI installed...would that suffice I know it has the REST aspects in it. Or wouldn't event the F12 aspects of like Chrome work for this?
I haven't done it myself, but it looks like SoapUI supports testing REST services.
I think Postman used to not be an installer, but I know it is now. You also might be able to find a portable version.
I think Postman used to not be an installer, but I know it is now. You also might be able to find a portable version.
ASKER
Actually, I just tried SOAPUI. Works as expected with what I am working with right now! Thanks!
ASKER
Thank you both for the time and attention. Very, very much appreciated.