Skip to main content

"Cannot find dispatch method" problem

8 replies [Last post]
furkae
Offline
Joined: 2009-02-10
Points: 0

Hi,

I have implemented a dummy SOAP service based on a predefined WSDL file (s. attachment) using JAX-WS 2.1.5 in order to test my SOAP client. When I invoke the operation 'read' on this service I get the following SOAPFaultException:

Cannot find dispatch method for {http://www.telekom.at/eai/WSToCramerCSIRead}CSIRead

What am I doing wrong?

Some hints:
- We use rpc/literal.
- I use the Endpoint.create/publish methods to publish my service.
- My runtime environment is jdk1.6.0_06 and jaxws-2.1.5.
- As the original names in the WSDL file are terrible I use customization to generate more user friendly Java classes and methods (s. attachment too).

Thx in advance,
Elemér

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
furkae
Offline
Joined: 2009-02-10
Points: 0

Sorry,

the correct error message must be:

Cannot find dispatch method for {http://www.hugo.at/eai/WSToCramerCSIRead}CSIRead

Elemér

ramapulavarthi
Offline
Joined: 2004-06-01
Points: 0

Please log the SOAP messages. On the server-side, dispatching to the web method is based on the payload QName unless you enabled WS-Addressing, in which case it uses wsa:Action for dispatching.

Your SOAP request should provide some details about why you are getting that error.

furkae
Offline
Joined: 2009-02-10
Points: 0

Hi,

thx for helping me.

The SOAP request:





TDP-Tool


furkae
nopass
PlsqlPSTNDatenXML
TDP-Tool


KZ
2260


FNR
4920000





The corresponding SOAP fault message:





ns2:Client
Cannot find dispatch method for {http://www.hugo.at/eai/WSToCramerCSIRead}CSIRead


Elemér

furkae
Offline
Joined: 2009-02-10
Points: 0

... I've found something: if I change the namespace attribute in the soap:body element to the targetNamespace of the WSDL definition the error message disappears.

Is there a rule/requirement the namespace attribute of the soap:body element must be equal to the WSDL target namespace?!?

If NOT: can it be a bug in wsimport?

Although I've managed to communicate to the server I do not really understand why I got the error message using the original WSDL file. Has anybody an answer to this problem?

ramapulavarthi
Offline
Joined: 2004-06-01
Points: 0

There used to be some bug in RI which got fixed in recent versions.
Which version of JAX-WS are you using?

WS-I BP 1.1 clarifies about the usage of namespace from the wsdl description.

furkae
Offline
Joined: 2009-02-10
Points: 0

I'm using the latest one, 2.1.5.

I'm also going to read the suggested specification...

furkae
Offline
Joined: 2009-02-10
Points: 0

The specification BP 1.1 states nothing about the content of the namespace; it only sais it must be present.

It seems to me that the client creates the correct SOAP message (using the correct namespace specified in the soap:body element) but the server does not accept it since it expects the corresponding element in the namespace defined in the root element of the WSDL.

furkae
Offline
Joined: 2009-02-10
Points: 0

... and I have found a workaround to this problem: I programmatically change the namespace of the only SOAP body element in the SOAP request...

I think this is a missing feature in the current JAX-WS implementation but it only affects SOAP messages using rcp/literal.