We are looking into wrapping a legacy application with a web service. This
application takes a file for input does transformation on file and creates a new
output file. The files we are working on average 25kb to 100kb but can sometimes be
as large as 20Mb - 60Mb. There can be several calls into this service at once.
Ideally I would not like memory and heap size to be a direct limiter to the file size
we can transform. I would like to be able to stream the attachment straight to disk
and pass just a file handle onto my service class.
Here is the first moc up of the WSDL for the service call.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="TranslationService"
targetNamespace="http://www.cardinal.com/TranslationService.wsdl"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.cardinal.com/TranslationService.wsdl"
xmlns:tran="http://www.cardinal.com/TranslationService.xsd"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Descriptor for
Cardinal's Item Translation Service</wsdl:documentation>
<wsdl:types>
<xsd:schema
targetNamespace="http://www.cardinal.com/TranslationService.xsd"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tran="http://www.cardinal.com/TranslationService.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="translationStatus">
<xsd:all>
<xsd:element maxOccurs="1" minOccurs="1" name="callId"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="status"
type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="translateRequest">
<wsdl:part name="mapname" type="xsd:string"/>
<wsdl:part name="data" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:message name="translateResponse">
<wsdl:part name="status" type="tran:translationStatus"/>
<wsdl:part name="translation" type="xsd:base64Binary"/>
<wsdl:part name="exception" type="xsd:base64Binary"/>
<wsdl:part name="messages" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="Translation">
<wsdl:operation name="translate">
<wsdl:input message="tns:translateRequest"/>
<wsdl:output message="tns:translateResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TranslationPortBinding" type="tns:Translation">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="translate">
<soap:operation soapAction="capeconnect::TranslationPort#translate"/>
<wsdl:input>
<mime:multipartRelated>
<mime:part>
<soap:body parts="request" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="data" type="application/octetstream"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
<mime:multipartRelated>
<mime:part>
<soap:body parts="status" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="translation"
type="application/octetstream"/>
</mime:part>
<mime:part>
<mime:content part="exception" type="application/octetstream"/>
</mime:part>
<mime:part>
<mime:content part="messages" type="application/octetstream"/>
</mime:part>
</mime:multipartRelated>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Translation">
<wsdl:port binding="tns:TranslationPortBinding" name="translationPort">
<soap:address
location="http://localhost:8090/axis/services/translationPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Is this possible with Axis? If so should I be looking into a custom serializer or is
this already supported?
Thanks,
Craig Courtney