Answered by:
BizTalk WCF Service - SOAP envelope

Question
-
Hi!
I have published a BizTalk WCF service and i have shared the endpoint url to the users.
When i tested it through SOAP UI, BizTalk is successfully receiving the message. But currently what is happening, the users are trying to post the message without the SOAP envelope. So the message is not hitting the service.
To more elaborate,
My Service is accepting the following message
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://abc">
<soapenv:Header/>
<soapenv:Body>
<con:Snddoc>
<con:sndm>
<con:sndHeader>
<con:Sender>testr</con:Sender>
<con:TDate>11-2-2016</con:TDate>
</con:sndHeader>
<con:sndmsgs>
<!--1 or more repetitions:-->
<con:sndmsg>
<con:GID>010000005606</con:GID>
<con:sndconts>
<!--1 or more repetitions:-->
<con:sndcont>
<con:Key>DVID</con:Key>
<con:Value>abc</con:Value>
</con:sndcont>
<con:sndcont>
<con:Key>DVID</con:Key>
<con:Value>abc</con:Value>
</con:sndcont>
</con:sndconts>
</con:sndmsg>
</con:sndmsgs>
</con:snddm>
</con:snddoc>
</soapenv:Body>
</soapenv:Envelope>
But they are trying to push the following message, which is not hitting the service
<con:Snddoc>
<con:sndm>
<con:sndHeader>
<con:Sender>testr</con:Sender>
<con:TDate>11-2-2016</con:TDate>
</con:sndHeader>
<con:sndmsgs>
<!--1 or more repetitions:-->
<con:sndmsg>
<con:GID>010000005606</con:GID>
<con:sndconts>
<!--1 or more repetitions:-->
<con:sndcont>
<con:Key>DVID</con:Key>
<con:Value>abc</con:Value>
</con:sndcont>
<con:sndcont>
<con:Key>DVID</con:Key>
<con:Value>abc</con:Value>
</con:sndcont>
</con:sndconts>
</con:sndmsg>
</con:sndmsgs>
</con:snddm>
</con:snddoc>
I am not sure how to resolve this. any help would be much appreciated.
Thank you in advance.
If this answers your question please Mark as Answer. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.
Tuesday, June 7, 2016 11:55 AM
Answers
-
Hi Anand
In that case it is not a SOAP Service. Expose your endpoint using WCF-webHttp binding/adapter with XMLReceive pipeline in your Receive pipeline. They can send only the XML payload over HTTP POST.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Friday, June 10, 2016 10:34 AM
- Proposed as answer by Angie Xu Tuesday, June 14, 2016 8:18 AM
- Marked as answer by Angie Xu Tuesday, June 14, 2016 8:18 AM
Friday, June 10, 2016 10:29 AMModerator -
I am not sure how they are consuming my service...But also they have confirmed, they are not sending the soap header...but I am thinking is there any way i can append the soap header in BizTalk
Stop, don't do anything until you and the other team agree on exactly how this conversation will work. SOAP/REST/JSON/XML/Binary..
The important part: It doesn't matter what you use so long as you agree. BizTalk is perfectly fine with any of those. No need to wrap anything.
The easiest implementation is a simple http post which can transmit any type of content.
Friday, June 10, 2016 12:14 PMModerator
All replies
-
Hi Anand
What tool/application are they using to send?
The problem is at their side, they need to send SOAP envelope for a SOAP based WCF service. You need to inform them that their payload must be contained within the SOAP envelope as per the first format.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Tuesday, June 7, 2016 12:01 PM
Tuesday, June 7, 2016 11:59 AMModerator -
Hi Anand,
If they invoke your service properly then it's fine - You will not face any issues at all.
Try to know how they are trying to sending messages to your service.
Thanks,
SMSVikasK
Tuesday, June 7, 2016 12:06 PMAnswerer -
Well, it's either SOAP or it's not...:)
So, if you've published a SOAP Service, the clients should be calling it using SOAP so it's really their problem.
If you need to support both SOAP and essentially REST, you should have two different Receive Locations. At that point though, having a SOAP endpoint is just extra complication.
Tuesday, June 7, 2016 12:25 PMModerator -
Hi,
SOAP UI by default adding the SOAP envelope at the time of generation of Request instance. I would recommend to generate the instance of your schema (the same schema for which you have published a WCF Service using the WCF Schema Publishing Wizard)
also would suggest to check by using the WcfTestClient.exe utility provided in out of box in .NET Framework, where you can get exact xml instance of your Request Schema.
Hope this Helps!!!
Please Mark as Answered if you satisfy with Reply.
- Proposed as answer by vikas.a.mehta Wednesday, June 8, 2016 9:27 AM
- Unproposed as answer by Johns-305MVP, Moderator Wednesday, June 8, 2016 1:27 PM
Wednesday, June 8, 2016 9:27 AM -
It's better to let the group Propose Answers.Wednesday, June 8, 2016 1:28 PMModerator
-
Thanks for your reply guys,
I am not sure how they are consuming my service.
They are expecting an endpoint from us, to post the message. But also they have confirmed, they are not sending the soap header.
So my current published service will not be okay to receive the message, but I am thinking is there any way i can append the soap header in BizTalk, like adapter behaviour or any other way..
Or i can develop a .NET proxy service to receive whatever they send and from there i can send to my published BizTalk WCF service.
Any suggestions ?
Friday, June 10, 2016 10:24 AM -
Hi Anand
In that case it is not a SOAP Service. Expose your endpoint using WCF-webHttp binding/adapter with XMLReceive pipeline in your Receive pipeline. They can send only the XML payload over HTTP POST.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Friday, June 10, 2016 10:34 AM
- Proposed as answer by Angie Xu Tuesday, June 14, 2016 8:18 AM
- Marked as answer by Angie Xu Tuesday, June 14, 2016 8:18 AM
Friday, June 10, 2016 10:29 AMModerator -
I am not sure how they are consuming my service...But also they have confirmed, they are not sending the soap header...but I am thinking is there any way i can append the soap header in BizTalk
Stop, don't do anything until you and the other team agree on exactly how this conversation will work. SOAP/REST/JSON/XML/Binary..
The important part: It doesn't matter what you use so long as you agree. BizTalk is perfectly fine with any of those. No need to wrap anything.
The easiest implementation is a simple http post which can transmit any type of content.
Friday, June 10, 2016 12:14 PMModerator -
Hi Vikas,
Your post has been flagged as abusive. It is better that other people have control over whether a post is useful or qualifies as an answer. Thank you.
Steef-Jan Wiggers
Microsoft Azure MVP
BizTalk
Saturday, June 18, 2016 3:31 PMModerator