I exposed web service using http-servicemix:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:test="http://servicemix.apache.org/replaceMeConsumer"
xmlns:impl="http://localhost:8080/axis/services/UnionService">
<http:endpoint service="test:IUnionService"
endpoint="unionconsumer"
targetEndpoint="UnionService"
targetService="impl:IUnionService"
targetInterfaceName="impl:IUnion"
soap="true"
role="consumer"
locationURI="http://0.0.0.0:8192/UnionConsumer"
wsdlResource="http://localhost:8080/axis/services/UnionService?wsdl"
soapVersion="1.1"
/>
<http:endpoint service="impl:IUnionService"
endpoint="UnionService"
interfaceName="impl:IUnion"
soap="true"
role="provider"
locationURI="http://localhost:8080/axis/services/UnionService"
wsdlResource="http://localhost:8080/axis/services/UnionService?wsdl"
soapVersion="1.1"
/>
</beans>
It works good but with one problem. I have a method with input argument and
this argument is a complex type (java bean is serialized into xml). And when
I pass this argument, servicemix omits all information regarding the date of
this complex type.
This is the original SOAP request:
POST /UnionConsumer HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: cliente-91217db:8192
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1145
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><publishProfile
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><arg1
href="#id0"/></publishProfile><multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns1:Profile"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:BeanService"><address
xsi:type="xsd:string">39</address><areasOfEducation
soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"><areasOfEducation
xsi:type="xsd:string">Computer science</areasOfEducation><areasOfEducation
xsi:type="xsd:string">Physics</areasOfEducation></areasOfEducation><education
xsi:type="xsd:string">MSc</education>[EMAIL PROTECTED]<fiscalCode
xsi:type="xsd:string">BYK</fiscalCode><id xsi:type="xsd:long"
xsi:nil="true"/><name
xsi:type="xsd:string">Name</name></multiRef></soapenv:Body></soapenv:Envelope>
but when this request passing through servicemix I got the following SOAP to
the destination service:
POST /axis/services/UnionService HTTP/1.1
Content-Type: text/xml
Content-Length: 416
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.0
Host: localhost:8080
<?xml version='1.0' encoding='UTF-8'?><env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><publishProfile
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><arg1
href="#id0" /></publishProfile></env:Body></env:Envelope>
So It looks that servicemix doesn't understand the multiRef part and simply
doesn't pass it.
Thanks,
Sergey Bykov.
--
View this message in context:
http://www.nabble.com/Problem-with-exposing-web-service-with-complex-type-through-servicemix.-tp14394208s12049p14394208.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.