Hi All,
i'm new to
Java Web Services, i had deployed sample hello world service on
Tomcat server and trying to access from client application, i'm getting following error ...
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Cannot find dispatch method for {http://localhost:8088/SimpleSOA/HelloWorldImplPort}getHelloWorldAsString
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Cannot find dispatch method for {http://localhost:8088/SimpleSOA/HelloWorldImplPort}getHelloWorldAsString
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
Cannot find dispatch method for {http://localhost:8088/SimpleSOA/HelloWorldImplPort}getHelloWorldAsString
Here is the WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-hudson-390-. -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.com/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorldImplService" targetNamespace="http://service.com/">
<types/>
<message name="getHelloWorldAsString">
<part name="arg0" type="xsd:string"/>
</message>
<message name="getHelloWorldAsStringResponse">
<part name="return" type="xsd:string"/>
</message>
<portType name="HelloWorld">
<operation name="getHelloWorldAsString">
<input message="tns:getHelloWorldAsString"/>
<output message="tns:getHelloWorldAsStringResponse"/>
</operation>
</portType>
<binding name="HelloWorldImplPortBinding" type="tns:HelloWorld">
<
soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getHelloWorldAsString">
<soap:operation soapAction=""/>
<input>
<soap:body namespace="http://service.com/" use="literal"/>
</input>
<output>
<soap:body namespace="http://service.com/" use="literal"/>
</output>
</operation>
</binding>
<service name="HelloWorldImplService">
<port binding="tns:HelloWorldImplPortBinding" name="HelloWorldImplPort">
<soap:address location="http://localhost:8088/SimpleSOA/HelloWorldImplPort"/>
</port>
</service>
</definitions>
Here is my client call
Service service = new org.apache.axis.client.Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress("http://localhost:8088/SimpleSOA/HelloWorldImplPort?wsdl");
call.setOperationName( new QName("http://localhost:8088/SimpleSOA/HelloWorldImplPort", "getHelloWorldAsString") );
String ret = (String) call.invoke( new Object[] {"some kind of message"} );
System.out.println(ret);
Service name -- HelloWorld.java
ServiceImpl -- HelloWorldImpl.java
Could you let me know what was the issue ...