web services - soap header doesnt appear in http traffic when coming from biztalk -
i trying construct message in biztalk send out web service. when call web service c# see traffic(from fiddler) this:
<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:header> <h:authenticationinfo xmlns:h="urn:ticket" xmlns="urn:ticket" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <username>user_name</username> <password>password</password> <authentication/> <locale/> <timezone/> </h:authenticationinfo> </s:header> <s:body xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <createtroubleticket xmlns="urn:ticket"> <serviceid>asd</serviceid> <servicetype>service type</servicetype> <impact>1</impact> <priority>1 - critical</priority> </createtroubleticket> </s:body> </s:envelope>
and returns expected response. found instructions online on how working in biztalk, ie. add soap header (http://threaddump.blogspot.com/2005/01/how-to-send-soap-headers-in-biztalk.html, or http://www.apress.com/9781430232643 there walkthrough , code chapter 2.13) , have followed them. haven't been able create header see above. see body come through fiddler when biz sends off web service;
<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:body><ns0:createtroubleticket xmlns:ns0="urn:ticket"> <ns0:serviceid>serviceid_0</ns0:serviceid> <ns0:servicetype>servicetype_0</ns0:servicetype> <ns0:impact>1</ns0:impact> <ns0:priority>1 - critical</ns0:priority> </ns0:createtroubleticket></s:body></s:envelope>
i can promoted property assigned string want. know because when @ suspended message(after fails legit response service) see property value gave in message context:
to clear did far; addded property schema target namespace 'http://schemas.microsoft.com/biztalk/2003/soapheader' , single element named 'authenticationinfo' has property schema base set 'messagecontextpropertybase'. assign in orchestration promoted property of message as:
messageinwheader(tempbizconsumeheader.authenticationinfo)= @"<ns0:authenticationinfo xmlns:ns0=ur..."
so if sees wrong here or knows why not acutally seeing header in request let me know. maybe need special send pipeline, or need define entire envelope? think wcf services(which 1 i'm calling not) there ready made property, wcfoutboundheaders or such thing. id love there 1 of use...
if understand correctly, trying send message custom header webservice through biztalk send port.
there built-in property named wcf.outboundcustomheaders
, should use , property assignment be this:
messageinwheader(wcf.outboundcustomheaders) = "<headers><h:authenticationinfo xmlns:h=\"urn:ticket\" xmlns=\"urn:ticket\" xmlns:xsi=\"http://www.w3.org/2001/xmlschema-instance\" xmlns:xsd=\"http://www.w3.org/2001/xmlschema\"><username>user_name</username></h:authenticationinfo></headers>";
if going use these headers, may create helper this.
Comments
Post a Comment