Skip to main content

500 - Cannot find the dispatch method

8 replies [Last post]
steveor
Offline
Joined: 2006-03-02

Hi

When testing with my client using dispatchMsg.invokeOneWay(reqMsg) on Glassfish 41 JEE5

I see the following error message (on client)

30-Mar-2006 23:10:41 com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher checkReturnStatus
SEVERE: HTTP status code for oneway: expected 202 or 200, got 500
30-Mar-2006 23:10:41 com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher checkReturnStatus

and on glassfish GUI message detail)
Cannot find the dispatch method

Doing a search I find bug id 6342025, which says
=========================================================
Detailed investigation of this test shows that the service impl class (StockQuoteImpl) implements StockQuote but the the @WebService annotation in the Impl class does not point back to the SEI using the serviceEndpointInterface attribute. This results in loss of namespace correlation.

Moreover, when using serviceEndpointInterface attribute, you cannot use @WebMethod in impl class
==========================================================

I put the following into my impl class
@WebService(name="NotificationConsumerInterface",endpointInterface="com.xx.server.NotificationConsumerInterface" ,wsdlLocation="WEB-INF/wsdl/NotificationService.wsdl", targetNamespace = "tmf854.v1.ws", serviceName="NotificationService", portName="NotificationConsumerInterface")

and removed web method from the impl class

has something changed or am I missing something?

regards
Steve

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vijaysr
Offline
Joined: 2003-06-11

> I've worked out the pattern for creating these web
> services.

If possible, you can probably share your pattern (post it in GlassFish website) for the benefit of the community - just a thought :)

vijaysr
Offline
Joined: 2003-06-11

> I put the following into my impl class
> @WebService(name="NotificationConsumerInterface",endpo
> intInterface="com.xx.server.NotificationConsumerInterf
> ace"
> ,wsdlLocation="WEB-INF/wsdl/NotificationService.wsdl",
> targetNamespace = "tmf854.v1.ws",
> serviceName="NotificationService",
> portName="NotificationConsumerInterface")
>
> and removed web method from the impl class
>
> has something changed or am I missing something?

The error you are seeing mostly happens because of mismatch in targetNameSpace.

Is this a wsdl-to-java case ? If so, are you packaging the wsdl in the WAR ? And does the targetNamespace specified in impl class match the targetNamespace of service and port in the wsdl ?

steveor
Offline
Joined: 2006-03-02

Vijay

Yes it is wsdl2java via wsimport, the generated SEI interface.

@WebService(name = "NotificationConsumerInterface", targetNamespace = "tmf854.v1.ws")
@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public interface NotificationConsumerInterface {

You are correct the wsdl is in the war, definitions as follows

name="NotificationService"
targetNamespace="tmf854.v1.ws"
xmlns:tmf854WS="tmf854.v1.ws"

This is my impl class

@WebService(
endpointInterface="com.xx.server.NotificationConsumerInterface" ,
wsdlLocation="WEB-INF/wsdl/NotificationService.wsdl",
targetNamespace = "tmf854.v1.ws",
serviceName="NotificationService",
portName="NotificationConsumerInterface")

removing the tns does not resolve the issue.

regards
Steve

vijaysr
Offline
Joined: 2003-06-11

everything looks fine - at least on the surface !!!

Is it possible for you to share the WAR file with us ? If so, can you please open an issue in the issue tracker and attach your WAR file - I will take a look ASAP.

vijaysr
Offline
Joined: 2003-06-11

if not the complete WAR file, if you can at least share the WSDL - I can do the rest and try it out locally

steveor
Offline
Joined: 2006-03-02

Hi Vijay

I posted the file to you and raised issue #527 on
subcomponent web services

regards
steve

steveor
Offline
Joined: 2006-03-02

Just in case anyone else sees this - found what I think was
the problem - the object I was sending was complex and should actually been part of another 2 objects. The XML was
incompletely formed. But error message seems to be misleading considering the actual problem and it was a one way MEP

Having said that, I'm impressed with Jax-ws now that I've worked out the pattern for creating these web services.

regards
Steve

vijaysr
Offline
Joined: 2003-06-11

Thanks for the update, Steve. I will keep this issue open (along with your WAR file) so that the error messages are more friendly