Creating a SOAP message for SharePoint Web Services

Home Page Forums BizTalk 2004 – BizTalk 2010 Creating a SOAP message for SharePoint Web Services

Viewing 1 reply thread
  • Author
    Posts
    • #25823

      I try to create a request for a SharePoint web service.

      I added a Web Reference based on the SharePoint Web service.

      Request messages are based on a multi-part
      Message Type and each part is a .Net primitive.

      In order to create the message I use a Message Assignement.

      Everything works well as long there is no parameters (An empty  Construct Message shape does the work) or when parts are of type string:

      MyMessage.myStringPart = “SomeString”;

      Problems occurs when the primitive is XmlDocument.

      – If no part definition => does not not compile, error “Message part has not been initialized”

      – If MyMessage.myXmlDocumentPart = null; => Error: “The part … of message … contained a null value at the end of the construct block”

      I also tried to define xmlDoc as a variable of type XmlDocument, use xmlDoc.LoadXML(something) and MyMessage.myXmlDocumentPart = xmlDoc:

      If …

      – xmlDoc.LoadXml(“”); => Error “the part contains zero bytes of data”

      – xmlDoc.LoadXml(“<value/>”); => SharePoint SoapServerException

      – xmlDoc.LoadXml(“<soap:query></soap:query>”); => Error about soap namespace (don’t remember the exact message)

      – xmlDoc.LoadXml(“<ns0:query xmlns:ns0=’http://schemas.microsoft.com/sharepoint/soap/’><Value/></ns0:query>&#8221;); => SharePoint SoapServerException

      So, what should I try ?

       

       

       

       

    • #25829

      Hi,

       

       Generate an instance of the web request message, and assign that XML string as the parameter to the LoadXml method of your variable of type XmlDocument, that will initialize your message part.

       

        Daniel.

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.