Chapter 3 Service Endpoint Design
109
E
There may be a performance drawback to sending an XML document as a 
String
 object: As the document size grows, the 
String
 equivalent size of the 
document grows as well. As a result, the payload size of the message you send 
also grows. In addition, the XML document loses its original format since 
sending a document as a 
String
 object sends it in a canonical format.
The third option is to exchange the XML document as a SOAP document
fragment. With this option, you map the XML document to 
xsd:anyType
 in the
service's WSDL file.
E
It is recommended that Web services exchange XML documents as SOAP doc 
ument fragments because passing XML documents in this manner is both por 
table across J2EE implementations and interoperable with all platforms.
E
To pass SOAP document fragments, you must implement your service using 
the WSDL to Java approach. 
For example, the travel agency service receives an XML document represent 
ing a purchase order that contains all details about the customer's preferred travel
plans. To implement this service, you define the WSDL for the service and, in the
WSDL, you map the XML document type as 
xsd:anyType
. See Code Example
3.19.
name="PurchaseOrderService_submitPurchaseOrderResponse">
parameterOrder="PurchaseOrderXMLDoc">
message="tns:PurchaseOrderService_submitPurchaseOrder"/>






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

 

Our web partners: Inexpensive Web Hosting Java Web Hosting personal webspace webspace php  linux webhost

 html web templates DreamweaverQuality Web Templates PSD Web Templates

cheap webhost j2ee web Hosting buy webspace ftp webspace adult webspace

frontpage WebHosting webspace hosting cheap webhost

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved

webhosting