1 / 7

Web Services: Beyond the Obvious

Web Services: Beyond the Obvious. Communicating with Business Partners and other Providers. Scenario:. We need to consume and work with an Xml document provided by a Business Partner via its proprietary Web Service. The Task….

kolya
Download Presentation

Web Services: Beyond the Obvious

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Services: Beyond the Obvious Communicating with Business Partners and other Providers

  2. Scenario: • We need to consume and work with an Xml document provided by a Business Partner via its proprietary Web Service

  3. The Task… • We will communicate to a Web Service that receives as input a Customer Number • The Web Service will return an Xml document containing Customer header and related sales detail information • The detail information will contain 0 to any number of sales records • We need to be able to process this data on a record by record basis

  4. Let’s look at the Xml we will receive… <Test> <ID>4567</ID> <FirstName>Neil</FirstName> <LastName>Young</LastName> <Sales> <Sale> <ID>4567</ID> <SaleDate>2007-06-01T00:00:00</SaleDate> <Amount>567.12</Amount> </Sale> <Sale> <ID>4567</ID> <SaleDate>2007-06-23T00:00:00</SaleDate> <Amount>78.99</Amount> </Sale> <Sale> <ID>4567</ID> <SaleDate>2007-06-25T00:00:00</SaleDate> <Amount>11.89</Amount> </Sale> <Sale> <ID>4567</ID> <SaleDate>2007-06-30T00:00:00</SaleDate> <Amount>104.01</Amount> </Sale> <Sale> <ID>4567</ID> <SaleDate>2007-07-01T00:00:00</SaleDate> <Amount>789.99</Amount> </Sale> </Sales> </Test>

  5. Consuming the Xml without “parsing” the Xml Document • Receive an XSD (Xml Schema Definition) from the Business Partner • Generate a class that represents the Xml data we are going to receive • De-Serialize the Xml data into classes that we can work with

  6. How can we create an XSD from our Avr.Net Classes? Receive an XSD (Xml Schema Definition) from the Business Partner Generate a class that represents the Xml data we are going to receive De-Serialize the Xml data into classes that we can work with 6

  7. Web Services: Beyond the Obvious Communicating with Business Partners and other Providers 7

More Related