This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Problem with the missing namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with the missing namespace" Watch "Problem with the missing namespace" New topic

Problem with the missing namespace

N Tiwa

Joined: Aug 23, 2010
Posts: 14


I am trying to access a web service using the WSDL url. I am able to get all the related classes from that wsdl using wsdl2java emitter. I am able to create a client that can basically call the methods of the web service. Now, the problem is I cannot access the public methods of the web service. When I try to access a method called login, I get the error saying "cannot find the dispatch method for {null}x". I tried to figure out the problem with this error message and found that it generally occurs when there is a mismatch in the target namespace. I tried to log the SOAP request that were sent out from the web client that I have created using network sniffer like wireshark. Then I extracted the SOAP messages out of the request that were sent to the IP I was interested in. Also, I used a SOAP Ui to capture the SOAP request(which were generated from the wsdl).Then I tried to compare the 2 SOAP requests and found there is a missing namespace (which is the only major difference in the 2 messages).The following are the SOAP messages:
Generated from the SOAP Ui using the wsdl file (This one works):
RSS, Web Services and SOAP Syntax


Generated from the web client (captured using wireshark)(This one DOES NOT work)
RSS, Web Services and SOAP Syntax

<auth xmlns="">

I tried testing the the SOAP request by putting xmlns="" in the WORKING soap REQUEST and it went through fine. SO, the only problem is due to <met:login> tag which is absent in the second SOAP request.

The problem is I am not able to understand what should I do in order to generated a similar SOAP request with my web client. I am using axis2 and wsdl2java emitter for generation on the classes as well as the SOAP messages. I mean they are automatically generated and I am not sure how should I change the SOAP request so that I get a response instead of the error message cannot find dispatch method.
Can anyone help me out with this matter. I need some guidance on how to resolve this issue. Can anyone tell me what I am doing wrong that is actually leading to this problem? Any help is appreciated!!!
I agree. Here's the link:
subject: Problem with the missing namespace
Similar Threads
web service explorer testing Web service gets right return value, java client gets wrong value
namespace problem in request soap message
wsdl2java and namespace declarations
Help needed to call a web service after TAM authentication - (401)Unauthorized