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 hitMySet <jo...@hotmail.com> on 2006/05/24 21:45:28 UTC
No such operation error
Hi,
Im new to using web services and I was able to get my web service deployed
on axis properly...it seems to be working fine. I came across a strange
error today and I cant seem to be able to find an answer....
i created a simple client class just to test out my web service before i
proceed any further, but when i try to run it, I get an error that says:
No such operation "statusIsOk"...which is strange because I used the
java2WSDL to make the WSDL and the used the WSDL2java to make my WSDD file,
and they both look fine to me.
here is my client class:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
import java.net.*;
public class ClientTest
{
public static void main(String [] args) throws Exception
{
String result;
String input = "test1";
String endpoint =
"http://localhost:8080/axis/services/MonitorWSInterface";
Service service = new Service();
Call call = (Call)service.createCall();
//calls web service to check if service is OK
call.setTargetEndpointAddress(new URL(endpoint));
call.setOperationName(new QName("isStatusOk"));
result =
(String)call.invoke(new Object [] {new String(input)});
System.out.println(result);
}
}
And here is my WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:monitor"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:monitor"
xmlns:intf="urn:monitor"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema targetNamespace="urn:monitor"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_soapenc_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="stopScanOfServicesReportedResponse">
</wsdl:message>
<wsdl:message name="saveStatusResponse">
</wsdl:message>
<wsdl:message name="stopScanOfServicesReportedRequest">
</wsdl:message>
<wsdl:message name="saveStatusRequest">
<wsdl:part name="in0" type="soapenc:string"/>
<wsdl:part name="in1" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="mainRequest">
<wsdl:part name="in0" type="impl:ArrayOf_soapenc_string"/>
</wsdl:message>
<wsdl:message name="isServiceOkResponse">
<wsdl:part name="isServiceOkReturn" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="mainResponse">
</wsdl:message>
<wsdl:message name="isServiceOkRequest">
<wsdl:part name="in0" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="startScanToEnsureServicesHaveReportedRequest">
</wsdl:message>
<wsdl:message name="areAllServicesOkResponse">
<wsdl:part name="areAllServicesOkReturn" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="areAllServicesOkRequest">
</wsdl:message>
<wsdl:message name="startScanToEnsureServicesHaveReportedResponse">
</wsdl:message>
<wsdl:portType name="MonitorWSInterface">
<wsdl:operation name="isServiceOk" parameterOrder="in0">
<wsdl:input message="impl:isServiceOkRequest"
name="isServiceOkRequest"/>
<wsdl:output message="impl:isServiceOkResponse"
name="isServiceOkResponse"/>
</wsdl:operation>
<wsdl:operation name="areAllServicesOk">
<wsdl:input message="impl:areAllServicesOkRequest"
name="areAllServicesOkRequest"/>
<wsdl:output message="impl:areAllServicesOkResponse"
name="areAllServicesOkResponse"/>
</wsdl:operation>
<wsdl:operation name="saveStatus" parameterOrder="in0 in1">
<wsdl:input message="impl:saveStatusRequest"
name="saveStatusRequest"/>
<wsdl:output message="impl:saveStatusResponse"
name="saveStatusResponse"/>
</wsdl:operation>
<wsdl:operation name="startScanToEnsureServicesHaveReported">
<wsdl:input
message="impl:startScanToEnsureServicesHaveReportedRequest"
name="startScanToEnsureServicesHaveReportedRequest"/>
<wsdl:output
message="impl:startScanToEnsureServicesHaveReportedResponse"
name="startScanToEnsureServicesHaveReportedResponse"/>
</wsdl:operation>
<wsdl:operation name="stopScanOfServicesReported">
<wsdl:input message="impl:stopScanOfServicesReportedRequest"
name="stopScanOfServicesReportedRequest"/>
<wsdl:output message="impl:stopScanOfServicesReportedResponse"
name="stopScanOfServicesReportedResponse"/>
</wsdl:operation>
<wsdl:operation name="main" parameterOrder="in0">
<wsdl:input message="impl:mainRequest" name="mainRequest"/>
<wsdl:output message="impl:mainResponse" name="mainResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MonitorWSInterfaceSoapBinding"
type="impl:MonitorWSInterface">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="isServiceOk">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="isServiceOkRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="isServiceOkResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="areAllServicesOk">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="areAllServicesOkRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="areAllServicesOkResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="saveStatus">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="saveStatusRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="saveStatusResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="startScanToEnsureServicesHaveReported">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="startScanToEnsureServicesHaveReportedRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="startScanToEnsureServicesHaveReportedResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="stopScanOfServicesReported">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="stopScanOfServicesReportedRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="stopScanOfServicesReportedResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="main">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="mainRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:input>
<wsdl:output name="mainResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:monitor" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MonitorWSInterfaceService">
<wsdl:port binding="impl:MonitorWSInterfaceSoapBinding"
name="MonitorWSInterface">
<wsdlsoap:address
location="http://localhost:8080/axis/services/MonitorWSInterface"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Any help with this would be GREATLY appreciated...its driving me
nuts...Thanks in advance
-Josh
--
View this message in context: http://www.nabble.com/No+such+operation+error-t1677257.html#a4548055
Sent from the Axis - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
WSDD and JMS transport
Posted by Stanley Stanev <su...@stanev.com>.
is there any way to specify in the WSDD at the server that WSDL is
generated with JMS binding instead of HTTP ?
I would like to give to my consumers a WSDL that uses JMS and I prefer
AXIS to be able to generate that as I am using it already and do not
want to have any manual transformations of the generated WSDLs
thanks,
Stanley Stanev
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: No such operation error
Posted by Anne Thomas Manes <at...@gmail.com>.
You don't have an operation called "isStatusOk" in your WSDL. Perhaps you
meant "isServiceOk"? You must specify an existing operation name in
call.setOperationName.
Anne
On 5/24/06, hitMySet <jo...@hotmail.com> wrote:
>
>
> Hi,
> Im new to using web services and I was able to get my web service deployed
> on axis properly...it seems to be working fine. I came across a strange
> error today and I cant seem to be able to find an answer....
>
> i created a simple client class just to test out my web service before i
> proceed any further, but when i try to run it, I get an error that says:
>
> No such operation "statusIsOk"...which is strange because I used the
> java2WSDL to make the WSDL and the used the WSDL2java to make my WSDD
> file,
> and they both look fine to me.
>
>
> here is my client class:
>
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> import javax.xml.namespace.QName;
>
> import java.net.*;
>
>
> public class ClientTest
> {
>
>
> public static void main(String [] args) throws Exception
> {
> String result;
> String input = "test1";
> String endpoint =
> "http://localhost:8080/axis/services/MonitorWSInterface";
>
> Service service = new Service();
> Call call = (Call)service.createCall();
>
> //calls web service to check if service is OK
> call.setTargetEndpointAddress(new URL(endpoint));
> call.setOperationName(new QName("isStatusOk"));
> result =
> (String)call.invoke(new Object [] {new String(input)});
> System.out.println(result);
>
> }
> }
>
>
>
> And here is my WSDL:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:monitor"
> xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:monitor"
> xmlns:intf="urn:monitor"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.3
> Built on Oct 05, 2005 (05:23:37 EDT)-->
> <wsdl:types>
> <schema targetNamespace="urn:monitor"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="ArrayOf_soapenc_string">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType"
> wsdl:arrayType="soapenc:string[]"/>
> </restriction>
> </complexContent>
> </complexType>
> </schema>
> </wsdl:types>
>
> <wsdl:message name="stopScanOfServicesReportedResponse">
>
> </wsdl:message>
>
> <wsdl:message name="saveStatusResponse">
>
> </wsdl:message>
>
> <wsdl:message name="stopScanOfServicesReportedRequest">
>
> </wsdl:message>
>
> <wsdl:message name="saveStatusRequest">
>
> <wsdl:part name="in0" type="soapenc:string"/>
>
> <wsdl:part name="in1" type="xsd:boolean"/>
>
> </wsdl:message>
>
> <wsdl:message name="mainRequest">
>
> <wsdl:part name="in0" type="impl:ArrayOf_soapenc_string"/>
>
> </wsdl:message>
>
> <wsdl:message name="isServiceOkResponse">
>
> <wsdl:part name="isServiceOkReturn" type="xsd:boolean"/>
>
> </wsdl:message>
>
> <wsdl:message name="mainResponse">
>
> </wsdl:message>
>
> <wsdl:message name="isServiceOkRequest">
>
> <wsdl:part name="in0" type="soapenc:string"/>
>
> </wsdl:message>
>
> <wsdl:message name="startScanToEnsureServicesHaveReportedRequest">
>
> </wsdl:message>
>
> <wsdl:message name="areAllServicesOkResponse">
>
> <wsdl:part name="areAllServicesOkReturn" type="xsd:boolean"/>
>
> </wsdl:message>
>
> <wsdl:message name="areAllServicesOkRequest">
>
> </wsdl:message>
>
> <wsdl:message name="startScanToEnsureServicesHaveReportedResponse">
>
> </wsdl:message>
>
> <wsdl:portType name="MonitorWSInterface">
>
> <wsdl:operation name="isServiceOk" parameterOrder="in0">
>
> <wsdl:input message="impl:isServiceOkRequest"
> name="isServiceOkRequest"/>
>
> <wsdl:output message="impl:isServiceOkResponse"
> name="isServiceOkResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="areAllServicesOk">
>
> <wsdl:input message="impl:areAllServicesOkRequest"
> name="areAllServicesOkRequest"/>
>
> <wsdl:output message="impl:areAllServicesOkResponse"
> name="areAllServicesOkResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="saveStatus" parameterOrder="in0 in1">
>
> <wsdl:input message="impl:saveStatusRequest"
> name="saveStatusRequest"/>
>
> <wsdl:output message="impl:saveStatusResponse"
> name="saveStatusResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="startScanToEnsureServicesHaveReported">
>
> <wsdl:input
> message="impl:startScanToEnsureServicesHaveReportedRequest"
> name="startScanToEnsureServicesHaveReportedRequest"/>
>
> <wsdl:output
> message="impl:startScanToEnsureServicesHaveReportedResponse"
> name="startScanToEnsureServicesHaveReportedResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="stopScanOfServicesReported">
>
> <wsdl:input message="impl:stopScanOfServicesReportedRequest"
> name="stopScanOfServicesReportedRequest"/>
>
> <wsdl:output message="impl:stopScanOfServicesReportedResponse"
> name="stopScanOfServicesReportedResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="main" parameterOrder="in0">
>
> <wsdl:input message="impl:mainRequest" name="mainRequest"/>
>
> <wsdl:output message="impl:mainResponse" name="mainResponse"/>
>
> </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="MonitorWSInterfaceSoapBinding"
> type="impl:MonitorWSInterface">
>
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
> <wsdl:operation name="isServiceOk">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="isServiceOkRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output name="isServiceOkResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="areAllServicesOk">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="areAllServicesOkRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output name="areAllServicesOkResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="saveStatus">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="saveStatusRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output name="saveStatusResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="startScanToEnsureServicesHaveReported">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="startScanToEnsureServicesHaveReportedRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output
> name="startScanToEnsureServicesHaveReportedResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="stopScanOfServicesReported">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="stopScanOfServicesReportedRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output name="stopScanOfServicesReportedResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="main">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="mainRequest">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:input>
>
> <wsdl:output name="mainResponse">
>
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:monitor" use="encoded"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="MonitorWSInterfaceService">
>
> <wsdl:port binding="impl:MonitorWSInterfaceSoapBinding"
> name="MonitorWSInterface">
>
> <wsdlsoap:address
> location="http://localhost:8080/axis/services/MonitorWSInterface"/>
>
> </wsdl:port>
>
> </wsdl:service>
>
> </wsdl:definitions>
>
>
> Any help with this would be GREATLY appreciated...its driving me
> nuts...Thanks in advance
> -Josh
> --
> View this message in context:
> http://www.nabble.com/No+such+operation+error-t1677257.html#a4548055
> Sent from the Axis - User forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>