System.ServiceModel.ProtocolExcept ion: An HTTP Content-Type header is required for SOAP messaging and none was found.

Hi,

I am trying to do POST operation to a third party REST service via WCF-WebHttp adapter.  The third party REST service URL is the secured site. So I used Security mode as Transport and Transport credential Type as Basic.

I am converting the Request xml message as a JSON before posting the request to REST service by using custom pipeline component with JSON encoder(out of box).

While running the interface, I am getting the below error

Details:"System.ServiceModel.ProtocolException: An HTTP Content-Type header is required for SOAP messaging and none was found.

The request message is not at all hitting the REST url. So I could not test that with Fiddler tool.

But If I paste the request message (JSON) separately in Fiddler it is working fine.  Even I tested this service with .NET application.  There is no error at all.

But only through BizTalk WCF-WebHttp configuration it is not working. 

Any help is appreciated!!

Regards,

Claudia

August 26th, 2015 8:59pm

HI,

I think you are posting a incorrect format of message to the rest endpoint .The way web http adapter works is bit different . please follow below link and try to configure your solution properly

https://msdn.microsoft.com/en-us/library/jj572836.aspx

https://msdn.microsoft.com/en-us/library/jj572846.aspx

http://social.technet.microsoft.com/wiki/contents/articles/18935.biztalk-server-2013-consuming-a-restful-endpoint-using-wcf-webhttp.aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 2:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics