O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.5. Handling XML Documents

While it's easy to return and receive DataSets from Web services, sending and receiving XML documents provides the most control over message format. In this section, I will show you how to return an XML document with a specific structure, perhaps based on a schema, like the SOAP message in Listing 9.15.

Listing 9.15. The desired SOAP message. The payload is an XML document fragment based on a predefined schema.
<soap:Envelope ...>
  <soap:Body>
    <CustomerData xmlns="http://www.LearnXmlWS.com/customerorders">
      <Customers CustomerID="ALFKI"
       CompanyName="Alfreds Futterkiste" />
       ...
      <Customers CustomerID="WOLZA"
                 CompanyName="Wolski  Zajazd" />
    </CustomerData>
  </soap:Body>
</soap:Envelope>

There are several steps you must ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required