Home Page › Forums › BizTalk 2004 – BizTalk 2010 › The part ‘input_xml’ of message ‘WebRequest_doc’ contained a null value at the end of the construct block
- This topic has 2 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
August 21, 2008 at 10:41 PM #20471
Hi,
I’m a newbie to Biztalk. I wanted to call a web service and so I had added reference to the web service but the XSD files for this web service are not generated. So, I decided to use Construct Message and Message Assignment shape to initialize my web request message from my incoming message data.(And then Send shape should send the Request Message to Request operation of web port.)
I’m trying to assign to my Web Request message in the message assignment shape with this expression:
WebRequest_doc.input_xml = InboundDoc.input_xml;
Where
WebRequest_doc is a message created in Orchestration View under messages with ‘Message Type’ pointing to request Type Name of web method. input_xml ‘s Object Type = Message part with Type = System.String and ‘Message Body part = false’
And InboundDoc is a message created in Orchestration View under messages with following Schema
<?xml version=”1.0″ encoding=”utf-16″ ?>
– <xs:schema xmlns:b=”http://schemas.microsoft.com/BizTalk/2003″ xmlns=”http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“ targetNamespace=”http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“” rel=”nofollow”>http://EDMIntegrationSchema.DocID“ xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
– <xs:element name=”ForEDM”>
– <xs:annotation>
– <xs:appinfo>
– <b:properties>
<b:property distinguished=”true” xpath=”/*[local-name()=’ForEDM’ and namespace-uri()=’http://EDMIntegrationSchema.DocID‘]/*[local-name()=’input_xml’ and namespace-uri()=”]” />
</b:properties>
</xs:appinfo>
</xs:annotation>
– <xs:complexType>
– <xs:sequence>
<xs:element name=”input_xml” type=”xs:string” />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>And XML in my input message file looks like
<ns0:ForEDM xmlns:ns0=”http://EDMIntegrationSchema.DocID“>
<ns0:input_xml>SomeStringParameter</ns0:input_xml>
</ns0:ForEDM>But this does not work and when application runs I get this exception: Inner exception: The part ‘input_xml’ of message ‘WebRequest_doc’ contained a null value at the end of the construct block.
How should I initialize the message part ‘input_xml’ ? Or How to construct a multipart message in orchestration?Do I need to change the xml in my input XML file?
Many thanks for your help.
Regards,
Sharad -
August 25, 2008 at 10:33 AM #20497
Sharad,
Web services usually end up with multi-part messages. If you look at the types section in the BizTalk orchestrations tool windows, you can see the definition of your message. Basically, think of a multi-part message as a single container that contains multiple “independent” data streams grouped together.
So yes, you need to initialize each one separately inside the same Construct Message shape. You’ll find that each part is accessible as “msg.<partname>”.
-
August 25, 2008 at 10:17 PM #20504
Hi Tom,
Thanks for your time and help.
The web service’s request multi part message has only one part, namely input_xml and in Message Assignment shape’s expression this part is assigned value from input message like WebRequest_doc.input_xml = InboundDoc.input_xml; I also tried hard coding value into the part like WebRequest_doc.input_xml = “1234”; but I get the same error. The part input_xml is of String type and I need to pass a XML string to web method.
The web method’s description(Request/Response) in browser shows as below:
POST /c9sl/html/ISvcInterface.asmx HTTP/1.1 Host: lrk4aa Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.smek.com/imaging/240/AcquireDocuments" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns
oap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AcquireDocuments xmlns="http://www.smek.com/imaging/240">
<input_xml>string</input_xml>
</AcquireDocuments>
</soap:Body>
</soap:Envelope>HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns
oap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AcquireDocumentsResponse xmlns="http://www.smek.com/imaging/240">
<AcquireDocumentsResult>string</AcquireDocumentsResult>
</AcquireDocumentsResponse>
</soap:Body>
</soap:Envelope>Thanks & Regards,
Sharad
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.