locked
BizTalk WCFSQL adater message DataSet Node RRS feed

  • Question

  • Hi,

    I am using WCFSQL adapter to call a procedure which receive one input and return a repeating node. 

    -<ProcResponse xmlns="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo">
    
    
    -<ProcResult>
    
    
    -<DataSet xmlns="http://schemas.datacontract.org/2004/07/System.Data">
    
    
    -<xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="NewDataSet">
    
    
    -<xs:element name="NewDataSet" msdata:IsDataSet="true">
    
    
    -<xs:complexType>
    
    
    -<xs:sequence>
    
    
    -<xs:element name="NewTable" maxOccurs="unbounded" minOccurs="0">
    
    
    -<xs:complexType>
    
    
    -<xs:sequence>
    
    <xs:element name="XML_F52E2B61-18A1-11d1-B105-00805F49916B" minOccurs="0" type="xs:string"/>
    
    </xs:sequence>
    
    </xs:complexType>
    
    </xs:element>
    
    </xs:sequence>
    
    </xs:complexType>
    
    </xs:element>
    
    </xs:schema>
    
    
    -<diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    
    
    -<NewDataSet xmlns="">
    
    
    -<NewTable>
    
    <XML_F52E2B61-18A1-11d1-B105-00805F49916B><node1><node2>2</node2><node1><node1><node2>200</node2><node1></XML_F52E2B61-18A1-11d1-B105-00805F49916B>
    
    </NewTable>
    
    </NewDataSet>
    
    </diffgr:diffgram>
    
    </DataSet>
    
    </Proc>
    
    <ReturnValue>0</ReturnValue>
    
    </Proc>
    

    The actual message is in node <XML_F52E2B61-18A1-11d1-B105-00805F49916B> 

    and I need to map this message to different message.

    Kindly suggest.

    Monika

    Wednesday, July 27, 2016 1:27 PM

Answers

  • If the Stored Procedure is FOR XML, you do not use the response schema generated by the Wizard.  You have to create your own schema for the response.

    You can still use the Request message.

    The reason is the Wizard has no way of knowing exactly how the Xml will be formed.

    • Proposed as answer by Angie Xu Friday, August 5, 2016 8:16 AM
    • Marked as answer by Angie Xu Monday, August 8, 2016 2:48 AM
    Wednesday, July 27, 2016 2:37 PM
    Moderator

All replies

  • Is this a FOR XML Stored Procedure?
    Wednesday, July 27, 2016 1:54 PM
    Moderator
  • Yes 

    FOR XML AUTO, ELEMENTS

    Wednesday, July 27, 2016 1:59 PM
  • If the Stored Procedure is FOR XML, you do not use the response schema generated by the Wizard.  You have to create your own schema for the response.

    You can still use the Request message.

    The reason is the Wizard has no way of knowing exactly how the Xml will be formed.

    • Proposed as answer by Angie Xu Friday, August 5, 2016 8:16 AM
    • Marked as answer by Angie Xu Monday, August 8, 2016 2:48 AM
    Wednesday, July 27, 2016 2:37 PM
    Moderator