You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tog <gu...@gmail.com> on 2009/04/02 03:35:44 UTC
RPL/Lit problem using cxf
Hi cxf gurus,
I know that this problem has been discussed in several threads and is due to
the fact that the underlying framework on the server side is not following
the standard (WS-I Profile) but I would like to get guidance on how to solve
it
Using the following wsdl (in groovyws) -
proxy = new WSClient( "
http://wsdl.eu.clickandbuy.com/EMS/1.0/EMSbinding.wsdl?wsdl
", this.class.classLoader)
def result = proxy.getEventsByIDAsXML( "Secret1", "Secret2", 0, 99 )
one get the following error:
org.apache.cxf.interceptor. Fault: Found element return but could not
find matching RPC/Literal part
According to daniel (and probably others) this can be solved by modifying
the wsdl. Could someone guide me in this process:
wdsl looks like this ...
<wsdl:definitions targetNamespace="https://clickandbuy.com/EMS/">
<wsdl:import namespace="https://clickandbuy.com/EMS/" location="
http://wsdl.eu.clickandbuy.com/EMS/1.0/EMS.wsdl"/>
...
<wsdl:operation name="getEventsByIDAsXML">
<soap:operation soapAction="EMS.PullService#getEventsByIDAsXML"/>
<wsdl:input>
<soap:body namespace="EMS.PullService" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body namespace="EMS.PullService" use="literal"/>
</wsdl:output>
<wsdl:fault name="exception">
<soap:fault namespace="EMS.PullService" use="literal"/>
</wsdl:fault>
</wsdl:operation>
...
In the imported file I have:
...
<wsdl:message name="EMS.PullService.getEventsByIDAsXML">
<wsdl:part name="sellerID" type="xs:long"/>
<wsdl:part name="tmPassword" type="xs:string"/>
<wsdl:part name="fromID" type="xs:long"/>
<wsdl:part name="toID" type="xs:long"/>
</wsdl:message>
<wsdl:message name="EMS.PullService.getEventsByIDAsXMLResponse">
<wsdl:part name="_return" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="EMS.PullService">
....
<wsdl:operation name="getEventsByIDAsXML">
<wsdl:input message="tns:EMS.PullService.getEventsByIDAsXML"/>
<wsdl:output
message="tns:EMS.PullService.getEventsByIDAsXMLResponse"/>
<wsdl:fault
message="tns:_exception.EMS.PullService.EventMessagingException"
name="exception"/>
</wsdl:operation>
....
</wsdl:portType>
Thanks for your help !
Regards
--
PGP KeyID: 1024D/47172155
FingerPrint: C739 8B3C 5ABF 127F CCFA 5835 F673 370B 4717 2155
http://cheztog.blogspot.com
Re: RPL/Lit problem using cxf
Posted by Daniel Kulp <dk...@apache.org>.
On Wed April 1 2009 9:35:44 pm tog wrote:
> <wsdl:message name="EMS.PullService.getEventsByIDAsXMLResponse">
> <wsdl:part name="_return" type="xs:string"/>
> </wsdl:message>
Just change the _return to return. That should do it.
Dan
On Wed April 1 2009 9:35:44 pm tog wrote:
> Hi cxf gurus,
>
> I know that this problem has been discussed in several threads and is due
> to the fact that the underlying framework on the server side is not
> following the standard (WS-I Profile) but I would like to get guidance on
> how to solve it
>
> Using the following wsdl (in groovyws) -
> proxy = new WSClient( "
> http://wsdl.eu.clickandbuy.com/EMS/1.0/EMSbinding.wsdl?wsdl
> ", this.class.classLoader)
> def result = proxy.getEventsByIDAsXML( "Secret1", "Secret2", 0, 99 )
>
> one get the following error:
> org.apache.cxf.interceptor. Fault: Found element return but could not
> find matching RPC/Literal part
>
> According to daniel (and probably others) this can be solved by modifying
> the wsdl. Could someone guide me in this process:
>
> wdsl looks like this ...
>
> <wsdl:definitions targetNamespace="https://clickandbuy.com/EMS/">
> <wsdl:import namespace="https://clickandbuy.com/EMS/" location="
> http://wsdl.eu.clickandbuy.com/EMS/1.0/EMS.wsdl"/>
> ...
> <wsdl:operation name="getEventsByIDAsXML">
> <soap:operation soapAction="EMS.PullService#getEventsByIDAsXML"/>
> <wsdl:input>
> <soap:body namespace="EMS.PullService" use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body namespace="EMS.PullService" use="literal"/>
> </wsdl:output>
> <wsdl:fault name="exception">
> <soap:fault namespace="EMS.PullService" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> ...
> In the imported file I have:
>
> ...
> <wsdl:message name="EMS.PullService.getEventsByIDAsXML">
> <wsdl:part name="sellerID" type="xs:long"/>
> <wsdl:part name="tmPassword" type="xs:string"/>
> <wsdl:part name="fromID" type="xs:long"/>
> <wsdl:part name="toID" type="xs:long"/>
> </wsdl:message>
> <wsdl:message name="EMS.PullService.getEventsByIDAsXMLResponse">
> <wsdl:part name="_return" type="xs:string"/>
> </wsdl:message>
>
> <wsdl:portType name="EMS.PullService">
> ....
> <wsdl:operation name="getEventsByIDAsXML">
> <wsdl:input message="tns:EMS.PullService.getEventsByIDAsXML"/>
> <wsdl:output
> message="tns:EMS.PullService.getEventsByIDAsXMLResponse"/>
> <wsdl:fault
> message="tns:_exception.EMS.PullService.EventMessagingException"
> name="exception"/>
> </wsdl:operation>
> ....
> </wsdl:portType>
>
> Thanks for your help !
>
> Regards
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog