Forum Discussion

UzairBaig's avatar
13 years ago

SoapUI attachment causing problem

Hi,

I am creating webservice which receives an image my WSDL file is.

<definitions name="ManifestB2BWebService"
targetNamespace="http://msgsvr.trips.crownagents.com/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://msgsvr.trips.crownagents.com/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns0="http://msgsvr.trips.crownagents.com/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://msgsvr.trips.crownagents.com/types/"
elementFormDefault="qualified"
xmlns:tns="http://msgsvr.trips.crownagents.com/types/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
<element name="data" type="xsd:base64Binary" nillable="true"/>
<element name="result" type="string" nillable="true"/>
</schema>
</types>
<message name="ManifestB2BWebServicePortType_receiveMessage">
<part name="reqparameters" element="tns0:data"/>
</message>
<message name="ManifestB2BWebServicePortType_receiveMessageResponse">
<part name="resparameters" element="tns0:result"/>
</message>
<portType name="ManifestB2BWebService">
<operation name="receiveMessage">
<input message="tns:ManifestB2BWebServicePortType_receiveMessage"/>
<output message="tns:ManifestB2BWebServicePortType_receiveMessageResponse"/>
</operation>
</portType>
<binding name="ManifestB2BWebServiceSoapHttp"
type="tns:ManifestB2BWebService">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="receiveMessage">
<soap:operation soapAction="http://msgsvr.trips.crownagents.com//receiveMessage"/>
<input>
<mime:multipartRelated>
<mime:part>
<soap:body use="literal"/>
</mime:part>
<mime:part>
<mime:content part="reqparameters" type="image/jpeg"/>
</mime:part>
</mime:multipartRelated>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ManifestB2BWebService">
<port name="ManifestB2BWebServiceSoapHttpPort"
binding="tns:ManifestB2BWebServiceSoapHttp">
<soap:address location="http://172.25.60.132:8888/trips-trips-messaging-service-context-root/ManifestB2BWebServiceSoapHttpPort"/>
</port>
</service>
</definitions>

And the SoapUI's Soap Message is.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://msgsvr.trips.crownagents.com/">
<soapenv:Header/>
<soapenv:Body>
<tns:receivemessage>

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include"
href="cid:Sunset.jpg">
</xop:Include>

</tns:receivemessage>
</soapenv:Body>
</soapenv:Envelope>

But when i try to post request it show me deserialization error.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<env:Fault>
<faultcode>env:Client</faultcode>
<faultstring>Caught exception while handling request: deserialization error: XML reader error: unexpected character content: "/9j/4AAQSkZJRgABAgEAYABgAAD/7Q0YUGhvdG9zaG9wIDMuMAA4QklNA+0KUmVzb2x1dGlvbgAA
AAAQAGAAAAABAAEAYAAAAAEAAThCSU0EDRhGWCBHbG9iYWwgTGlnaHRpbmcgQW5nbGUAAAAABAAA
AHg4QklNBBkSRlggR2xvYmFsIEFsdGl0dWRlAAAAAAQAAAAeOEJJTQPzC1ByaW50IEZsYWdzAAAA
CQAAAAAAAAAAAQA4QklNBAoOQ29weXJpZ2h0IEZsYWcAAAAAAQAAOEJJTScQFEphcGFuZXNlIFBy
aW50IEZsYWdzAAAAAAoAAQAAAAAAAAACOEJJTQP1F0NvbG9yIEhhbGZ0b25lIFNldHRpbmdzAAAA
SAAvZmYAAQBsZmYABgAAAAAAAQAvZmYAAQChmZoABgAAAAAAAQAyAAAAAQBaAAAABgAAAAAAAQA1
AAAAAQAtAAAABgAAAAAAAThCSU0D+BdDb2xvciBUcmFuc2ZlciBTZXR0aW5ncwAAAHAAAP//////
//////////////////////8D6AAAAAD/////////////////////////////A+gAAAAA////////
/////////////////////wPoAAAAAP////////////////////////////8D6AAAOEJJTQQIBkd1
ceq1o0G4xthLHEcm+K03piy4RTVE9sd1Ai792K9K4d2PpD/9k="</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>

Please help me on this issue.

Regards
No RepliesBe the first to reply