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:

        [WebInvoke(Method = "GET", UriTemplate = "/GetMember/{strTest}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string GetMember(string strTest);

Open in new window

But what I really needed is more like an object in the RequestBody. So, I originally had:

        [WebInvoke(Method = "POST", UriTemplate = "/GetMember",  RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        GetTestMemberRes GetMember(GetTestMemberReq TestMemberReq);

Open in new window

I am getting this:
Results of test
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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Because you can't do a POST using a web browser and address bar alone--those are GETs by default. You would have to create a web page that has a form with its action attribute set to "POST". You could just use the tools I mentioned to you in your previous question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David Johnson, CD, MVPOwnerCommented:
Personally I use postman as referenced by käµfm³d 👽
davismAuthor Commented:
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?
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

käµfm³d 👽Commented:
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.
davismAuthor Commented:
Actually, I just tried SOAPUI. Works as expected with what I am working with right now! Thanks!
davismAuthor Commented:
Thank you both for the time and attention. Very, very much appreciated.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.