I need send an image to a webservice (document/literal) using SwA and
not base64 enconding because of performance problems.
I have defined the next WSDL following the WS-I Profile:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
<types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
elementFormDefault="qualified">
<xsd:import
namespace="http://ws-i.org/profiles/basic/1.1/xsd"
schemaLocation="http://ws-i.org/profiles/basic/1.1/xsd"/>
<xsd:element name="emptyResponse">
<xsd:complexType/>
</xsd:element>
<xsd:element name="enqueueImage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="meta-info"
type="xsd:string"/>
<xsd:element name="image-attachment"
type="wsi:swaRef"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="enqueueImageRequest">
<part name="image" element="enqueueImage"/>
</message>
<message name="emptyResponse"/>
<portType name="XXXPortType">
<operation name="enqueue_image">
<input name="image" message="tns:enqueueImageRequest"/>
<output name="empty" message="tns:emptyResponse"/>
</operation>
</portType>
<binding name="XXXBinding" type="XXXPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="enqueue_image">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="XXXSwA">
<port name="XXXPortType" binding="XXXBinding">
<soap:address location="http://"/>
</port>
</service>
</definitions>
When I run WSDL2Java (xmlbeans data binding) it's generated a
EnqueueImage object with a method waiting for a SwaRef object and I don´t know
what to do with it:
void xsetImageAttachment(org.ws_i.profiles.basic._1_1.xsd.SwaRef
imageAttachment)
I don´t know where to add the image that I want to send to the
WebService.
Thanks and Regards.
Fran.