Thursday, January 10, 2008

BizTalk Consume WebServices with SOAP Header

When working with Web Services, the common scenario is to pass in the credential in the SOAP Header.

In this post, I will provide the steps how to do this in BizTalk Orchestration.
This will be a simple flow like below screen shot :

Flow Detail :

  1. Web Application will call an exposed web services by Biztalk Orchestration
  2. The request object consists of 3 elements : UserName, Password, Message
  3. BizTalk Orchestration will construct the SOAP Header Message with UserName and Password
  4. BizTalk Orchestration will assign the Message as the body and assign the SOAP Header
  5. BizTalk Orchestration calls the Web Services (WSSOAPHeader)
  6. Web Services will read the SOAP Header message and return back some message
  7. BizTalk will also return back the message to the web application

BizTalk Orchestration layout

One of the most crucial thing in here is the SOAP Header message.
To create the SOAP Header message schema :
  1. Create a property schema file
  2. In the schema properties, change the Target Namespace to http://schemas.microsoft.com/BizTalk/2003/SOAPHeader Set the Node Name property to the SOAP Header Name and the Property Schema Base to MessageContextPropertyBase
After creating this property, we can assign the SOAP Header into the message like this below

varXMLSOAPHeader = msgSOAPHeader;
msgWSRequest(MyBizTalkApp.AuthenticationSOAPHeader) = varXMLSOAPHeader.OuterXml;


Note :
  • When assigning the SOAP Header, it expects string value, that's why I assign the msgSOAPHeader into an XML document variable and get the string from OuterXml property.
  • If the SOAP Header is not received by the web services even though you have assigned it in the code, make sure that you have followed each of the steps to create the SOAP Header message schema above, especially the namespace part. It caused me 2 days to notice this one in the end :P
You can find and download the whole VS 2005 solution at here :


Here is the link to the MSDN Site : Consuming Web Services with SOAP Headers

Hope this helps

9 comments:

Anonymous said...

Excellent article. However, Link to source code "http://www.mediamax.com/bembengarifin/Hosted/BizTalkSOAPHeader.zip
" is no longer available. Could you please update it? Alternatively, you can Email me at s_nutulapati@yahoo.com

Thank you

James Zicrov said...

Thank you so much for putting up such a interesting post on the significance of SOAP API.

SQL Server Load Soap Api

svrtechnologies said...

Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing... biztalk training

Ranjith said...

I think this the best blog with the most important information filled in this website
I Got the more and more ideas from this blog Thank You for letting us to know.
pythonTraining in chennai

python Course in chennai

Chris Lesnar said...
This comment has been removed by the author.
Cyberz Pc said...

Wow, that is appealing studying. i am glad i found this and were given to artifice in it. great task upon this content. I preferred it loads. thanks for the colossal and precise data. Driver Genius Crack

crackinghax said...

Extremely informative site blog.
Efofex Fx Draw Tools Crack

Magix Video Pro X Crack

4k Stogram Crack

Unknown said...


We notice and value your efforts.
https://easyserialkeys.com/plagiarism-checker-x-crack/

Salman Softaware said...

You can use Plagiarism Checker X 2023 Professional Edition Crack to determine whether or not your article is original. By examining any difficulties with duplication in their assignments and papers, Plagiarism Checker X aids pupils.
"How check plagiarism
best free plagiarism check
plagiarism checker xcracked download
how to check plagiarism free online
plagiarism checker x crack download
plagiarism checker x free download full version with crack
is plagiarism Checker x safe"

Post a Comment