Hi guys,
I observe a strange thing using my developed work:
I create a WebService from a Spring Pojo bean and I developed it on ServiceMix
using servicemix-jsr181 component.
The strangers come using it: in fact I invoke it using sendsoap an a message
that agree with the wsdl, for example:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Body>
<ns1:cccheck xmlns:ns1="http://localhost:8080/CCCheck">
<c>3</c>
</ns1:cccheck>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
and my return is:
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><cccheckResponse
xmlns="http://localhost:8080/CCCheck"><out
xmlns="http://localhost:8080/CCCheck">false</out></cccheckResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
That disagrees with the wsdl in fact I was waiting for a <app> tag into
<cccheckResponse> one: here is the wsdl
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:smix="http://servicemix.org/wsdl/jbi/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://localhost:8080/CCCheck"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
targetNamespace="http://localhost:8080/CCCheck">
<wsdl:message name="cccheckRequestMessage">
<wsdl:part name="c" type="xsd:integer"/>
</wsdl:message>
<wsdl:message name="cccheckResponseMessage">
<wsdl:part name="app" type="xsd:boolean"/>
</wsdl:message>
<wsdl:portType name="cccheckPortType">
<wsdl:operation name="cccheck">
<wsdl:input message="tns:cccheckRequestMessage"
name="cccheckRequest"/>
<wsdl:output message="tns:cccheckResponseMessage"
name="cccheckResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="cccheckSOAPBinding"
type="tns:cccheckPortType"><soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="cccheck">
<soap:operation name="cccheck" soapAction=""
style="rpc"/>
<wsdl:input>
<soap:body
namespace="http://localhost:8080/CCCheck" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body
namespace="http://localhost:8080/CCCheck" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CCCheckService">
<wsdl:port binding="tns:cccheckSOAPBinding" name="cccheckPort">
<soap:address location="http://localhost:8080/CCCheck"/>
<smix:endpoint defaultMep="in-out" role="consumer"/>
</wsdl:port>
</wsdl:service>
<plnk:partnerLinkType name="CCCheckPartnerLinkType">
<plnk:role name="CCCheckRole" portType="tns:cccheckPortType"/>
</plnk:partnerLinkType>
</wsdl:definitions>
Using it directly may seems a silliness but I invoke this ws from a BPEL and
reading the response fails for this problem!!!
To be clearest I attach here the xbean.xml too:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><beans
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:wsdl="http://localhost:8080/CCCheck">
<jsr181:endpoint annotations="none" service="wsdl:CCCheckService"
serviceInterface="CCCheckInterface" endpoint="CCCheckPort">
<jsr181:pojo>
<bean class="CCCheck" id="cccheckService"/>
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="cccheck"
readOnly="true"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut
expression="excecution(*CCCheck.*(...))" id="cccheckServiceOperation"/>
<aop:advisor advice-ref="txAdvice"
pointcut-ref="cccheckServiceOperation"/>
</aop:config>
</jsr181:pojo>
</jsr181:endpoint>
</beans>
There is someone may give me an explanation and a way to bypass this problem?
Thank you all in advance guys,
regards
Simone