uCosminexus Application Server, Web Service Development Guide
To handle attachments in WSDL, code using the wsi:swaRef type. The wsi:swaRef type is defined in the WS-I Attachments Profile - Version 1.0 as the type for handling attachments in WSDL
The following is an example of WSDL coded with the wsi:swaRef type on the basis of the type defined in WS-I Attachments Profile - Version 1.0:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://localhost" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" ...> <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://localhost" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://ws-i.org/profiles/basic/1.1/xsd"/> <element name="getUserData"> <complexType> <sequence> <element name="in0" type="xsd:string"/> <element name="in1" type="wsi:swaRef"/> </sequence> </complexType> </element> ... </schema> </wsdl:types> <wsdl:message name="getUserDataRequest"> <wsdl:part element="intf:getUserData" name="parameters"/> </wsdl:message> ... <wsdl:portType name="UserInfo"> <wsdl:operation name="getUserData"> <wsdl:input message="intf:getUserDataRequest" name="getUserDataRequest"/> ... </wsdl:operation> </wsdl:portType> ... </wsdl:definitions> |
In this example, the wsi:swaRef type, indicating an attachment, is specified in the getUserData method argument (type of the element element in the schema definition).
Table 28-3 Type and usability of the schemaLocation attribute of the xsd:import element (when swaRef type is used)
| No. | schemaLocation attributes | Usability |
|---|---|---|
| 1 | Not specified | Can be used. #1 |
| 2 | http://wsi.org/profiles/basic/1.1/swaref.xsd | Can be used. #1 |
| 3 | Other than No.1 and No.2 | Cannot be used. #2 |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.