<e:Customer> <CName>John Jones</CName> <Address>100 Main Street</Address> <ID>4</ID> </e:Customer>
This structure would be defined as follows:
<element name=Customer> <element name="CName" type="xsd:string"/> <element name="Address" type="xsd:string"/> <element name="ID" type="xsd:string"/> </element>
Arrays will have an additional attribute, type="SOAP-ENC:Array", to define an element as an array. The SOAP-ENC namespace is defined as http://schemas.xmlsoap.org/soap/encoding
. An array could look as follows:
<CustomerIDs SOAP-ENC:arrayType="xsd:int[3]"> <number>345</number> <number>354</number> <number>399</number> </CustomerIDs>
The schema would look as follows:
<element name="CustomerIDs" type="SOAP-ENC:Array"/>
In this example, the array CustomerIDs contains three members; each member has a value of type xsd:int.
Summary
This chapter has introduced the basic principles of SOAP. Using these basic principles, you can pass the values for parameters of methods to and from a server using XML and HTTP. As the SOAP specification evolves, it's likely that SOAP will allow tightly bound messages to be sent to and from components on virtually any operating system.
In Chapter 9, we will discuss the BizTalk framework. The BizTalk framework builds on the concepts in SOAP, and allows companies to exchange business documents using XML schemas and industry standards for sharing information.