Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Passing SOAP Header to consumer webservice problems…
- This topic has 3 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
August 15, 2006 at 3:33 PM #15310
I keep getting following exception:
A message sent to adapter \”SOAP\” on send port \”EAIOrchestrations_1.0.0.7_EAIOrchestrations.EAIProcess_CNRPort_c6fb4467faed1873\” with URI \”http://cnrdev/service.asmx\” is suspended.
Error details: Failed to initialize the SOAP header field or property \”CNRHeaderValue\”.
Details: \”System.InvalidOperationException: There is an error in XML document (1, 41).\”.
Possible reasons are:
1) MemberName property of System.Web.Services.Protocol.SoapHeaderAttribute does not map to a field or property in the type.
2) The message context property value associated with the header cannot be converted to the target header type.
3) The target field or property is read-only or cannot be modified.
MessageId: {48C136E8-CB16-421F-9D01-2671CDD65B89}
InstanceID: {1E602A22-FA14-4A99-9D9A-B989FC355218}For more information, see Help and Support Center at
Here is my Message Assignment expression:
msgCNRRequest.xmlRequest = RequestInstance;
msgCNRRequest(EAIOrchestrations.SOAPHeaderPropertySchema.CNRHeaderTypeName)=\”<?xml version=\\\”1.0\\\” encoding=\\\”utf=8\\\” ?><ns0:CNRHeader xmlns:ns0=\\\”http://tempuri.org\\\”><ns0:Application>Macrocell</ns0:Application><ns0:EndUserID>BizTalk</ns0:EndUserID></ns0:CNRHeader>\”;Here is my Soap Header property schema:
<?xml version=\”1.0\” encoding=\”utf-16\” ?>
– <xs:schema xmlns:b=\”http://schemas.microsoft.com/BizTalk/2003\” xmlns=\”http://schemas.microsoft.com/BizTalk/2003/SOAPHeader\” targetNamespace=\”http://schemas.microsoft.com/BizTalk/2003/SOAPHeader\” xmlns:xs=\”http://www.w3.org/2001/XMLSchema\”>
– <xs:annotation>
– <xs:appinfo>
<b:schemaInfo schema_type=\”property\” xmlns:b=\”http://schemas.microsoft.com/BizTalk/2003\” />
</xs:appinfo>
</xs:annotation>
– <xs:element name=\”CNRHeader\” type=\”xs:string\”>
– <xs:annotation>
– <xs:appinfo>
<b:fieldInfo propertyGuid=\”5cdd27d0-f1e2-4dd7-b741-9d9a25134f9c\” rootTypeName=\”CNRHeaderTypeName\” propSchFieldBase=\”MessageContextPropertyBase\” />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:schema>Here is Reference.odx schema:
<?xml version=\”1.0\” encoding=\”utf-16\” ?>
– <xs:schema xmlns:tns=\”http://tempuri.org/\” xmlns:b=\”http://schemas.microsoft.com/BizTalk/2003\” elementFormDefault=\”qualified\” targetNamespace=\”http://tempuri.org/\” xmlns:xs=\”http://www.w3.org/2001/XMLSchema\”>
<xs:element name=\”CNRHeader\” type=\”tns:CNRHeader\” />
– <xs:complexType name=\”CNRHeader\”>
– <xs:sequence>
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”Application\” type=\”xs:string\” />
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”EndUserID\” type=\”xs:string\” />
</xs:sequence>
<xs:anyAttribute />
</xs:complexType>
</xs:schema>Any help???? I am about to go postal.
-
August 15, 2006 at 4:51 PM #15311
[quote:810a67125e=\”Joel\”]This probably isn’t it but:
<?xml … encoding=\\\”utf[b:810a67125e]=[/b:810a67125e]8\\\” ?>
should be:
<?xml … encoding=\\\”utf[b:810a67125e]-[/b:810a67125e]8\\\” ?>
Sorry, I haven’t played with custom SOAP headers very much but I just noticed that…[/quote:810a67125e]
LOL… Actually, that was the problem… Thanks!! I knew it had to be something silly I am overlooking.
-
August 15, 2006 at 4:31 PM #15312
This probably isn’t it but:
<?xml … encoding=\\\”utf[b:f40d874e7e]=[/b:f40d874e7e]8\\\” ?>
should be:
<?xml … encoding=\\\”utf[b:f40d874e7e]-[/b:f40d874e7e]8\\\” ?>
Sorry, I haven’t played with custom SOAP headers very much but I just noticed that…
-
August 15, 2006 at 5:07 PM #15313
Hehe no problem. A second set of eyes always helps, especially when you’ve been staring at something for a few hours. I can’t count the number of times in C++, during a late night programming session, that I’ve written if(a=true) instead of (a==true).
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.