• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Cannot find dispatch method for {http://localhost:8088/SimpleSOA/HelloWorldImplPort}

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ...
 
Ranch Hand
Posts: 733
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

call.setOperationName( new QName("http://localhost:8088/SimpleSOA/HelloWorldImplPort", "getHelloWorldAsString") );


The naming of namespace of the operation is a priori quite decoupled from the addressing of the endpoint. Here, the namespace is what the targetNamespace is in the wsdl, that is "http://service.com/".
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic