Home

 

Creating a Web service project and import the WSDL

To create a Web service project, do these steps:

Select File Æ New Æ Dynamic Web Project.

Project Name: RAD75WSMTOM
EAR Project Name: RAD75WSMTOMEAR
Click Finish.

Import the c:\7672code\webservice\mtom\ProcessDocumentService.wsdl file into the RAD75WSMTOM/WebContent folder.

Open the ProcessDocumentService.wsdl and take a look at the source. You will see some interesting attributes, highlighted in Example | 8-22.

Example 18-22 Extract of ProcessDocument.wsdl

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
				xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
				xmlns:tns="http://mtom.rad7.ibm.com/"
				targetNamespace="http://mtom.rad7.ibm.com/" version="1.0">
<xs:complexType name="sendPDFFile">
	<xs:sequence>
		<xs:element minOccurs="0" name="arg0" type="xs:base64Binary"
												xmime:expectedContentTypes="*/*"/>
	</xs:sequence>
</xs:complexType>
<xs:complexType name="sendWordFile">
	<xs:sequence>
		<xs:element minOccurs="0" name="arg0" type="xs:base64Binary"/>
	</xs:sequence>
</xs:complexType>
<xs:complexType name="sendImage">
	<xs:sequence>
		<xs:element minOccurs="0" name="arg0" type="xs:base64Binary"
										xmime:expectedContentTypes="image/jpeg"/>
	</xs:sequence>
</xs:complexType>

ibm.com/redbooks