You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Paul Stevens <st...@tivo.com> on 2005/01/31 20:41:40 UTC
document style yields "No such operation"
I'm having difficulty getting my 1.2 RC2 release of Axis to support my
service in document style. I have distilled the problem down to a very
simple example.
I use this java file as input to java2wsdl:
package com.tivo.cds;
public interface EchoService {
public String echo(String request);
}
I then use java2wsdl to create the .wsdl file and wsdl2java to create
the java stubs. All is good, when I do this for rpc style. But, when I
create the .wsdl using --style DOCUMENT I get the error "No such
operation 'in0'". I've been quite careful to verify that I undeploy the
rcp service, rebuild and reload the .jar file for the new service.
I've hunted the archives and found some indications of problems with
using java2wsdl and document style in Axis version 1.1. Has this been
resolved in 1.2?
Here is the .wsdl file Axis creates:
<!--WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="urn:TiVoCds"
xmlns="http://ww\w.w3.org/2001/XMLSchema">
<element name="in0" type="xsd:string"/>
<element name="echoReturn" type="xsd:string"/>
</schema>
</wsdl:types>
<wsdl:message name="echoRequest">
<wsdl:part element="impl:in0" name="in0"/>
</wsdl:message>
<wsdl:message name="echoResponse">
<wsdl:part element="impl:echoReturn" name="echoReturn"/>
</wsdl:message>
<wsdl:portType name="EchoService">
<wsdl:operation name="echo" parameterOrder="in0">
<wsdl:input message="impl:echoRequest" name="echoRequest"/>
<wsdl:output message="impl:echoResponse" name="echoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EchoServiceSoapBinding" type="impl:EchoService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/htt\p"/>
<wsdl:operation name="echo">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EchoServiceService">
<wsdl:port binding="impl:EchoServiceSoapBinding" name="EchoService">
<wsdlsoap:address
location="http://localhost:8080/axis/services/EchoService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--
Paul Stevens stevens@tivo.com
Tivo, Inc. http://www.tivo.com
2160 Gold St. 408-519-9194
Alviso, CA 95002 Fax: 408-519-5339
Re: document style yields "No such operation"
Posted by Bill Keese <bi...@tech.beacon-it.co.jp>.
"in0" is the parameter name, not the operation name, so why is the error
message "No such operation 'in0'"? It sounds like a confusion between
document/literal vs. wrapped literal. You have to decide whether the
client sends a message that looks like
<EchoService>
<in0>hello world</in0>
</EchoService>
or just like this:
<in0>hello world</in0>
Your WSDL file is currently setup to support #2, but maybe your client
is sending #1?
Paul Stevens wrote:
>
> I'm having difficulty getting my 1.2 RC2 release of Axis to support my
> service in document style. I have distilled the problem down to a very
> simple example.
>
> I use this java file as input to java2wsdl:
>
> package com.tivo.cds;
>
> public interface EchoService {
> public String echo(String request);
> }
>
> I then use java2wsdl to create the .wsdl file and wsdl2java to create
> the java stubs. All is good, when I do this for rpc style. But, when I
> create the .wsdl using --style DOCUMENT I get the error "No such
> operation 'in0'". I've been quite careful to verify that I undeploy
> the rcp service, rebuild and reload the .jar file for the new service.
>
> I've hunted the archives and found some indications of problems with
> using java2wsdl and document style in Axis version 1.1. Has this been
> resolved in 1.2?
>
> Here is the .wsdl file Axis creates:
>
> <!--WSDL created by Apache Axis version: 1.2RC2
> Built on Nov 16, 2004 (12:19:44 EST)-->
> <wsdl:types>
> <schema elementFormDefault="qualified" targetNamespace="urn:TiVoCds"
> xmlns="http://ww\w.w3.org/2001/XMLSchema">
> <element name="in0" type="xsd:string"/>
> <element name="echoReturn" type="xsd:string"/>
> </schema>
> </wsdl:types>
>
> <wsdl:message name="echoRequest">
>
> <wsdl:part element="impl:in0" name="in0"/>
>
> </wsdl:message>
>
> <wsdl:message name="echoResponse">
>
> <wsdl:part element="impl:echoReturn" name="echoReturn"/>
>
> </wsdl:message>
>
> <wsdl:portType name="EchoService">
>
> <wsdl:operation name="echo" parameterOrder="in0">
>
> <wsdl:input message="impl:echoRequest" name="echoRequest"/>
>
> <wsdl:output message="impl:echoResponse" name="echoResponse"/>
>
> </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="EchoServiceSoapBinding" type="impl:EchoService">
>
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/htt\p"/>
>
> <wsdl:operation name="echo">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="echoRequest">
>
> <wsdlsoap:body use="literal"/>
>
> </wsdl:input>
>
> <wsdl:output name="echoResponse">
>
> <wsdlsoap:body use="literal"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="EchoServiceService">
>
> <wsdl:port binding="impl:EchoServiceSoapBinding"
> name="EchoService">
>
> <wsdlsoap:address
> location="http://localhost:8080/axis/services/EchoService"/>
>
> </wsdl:port>
>
> </wsdl:service>
>
> </wsdl:definitions>
>