• 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
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problem with the missing namespace

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

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

<soapenv:Header/>
<soapenv:Body>
<met:login>
<auth>
<id>X</id>
<password>XY</password>
</auth>
</met:login>
</soapenv:Body>
</soapenv:Envelope>

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

<soapenv:Body>
<auth xmlns="">
<id>X</id>
<password>XY</password>
</auth>
</soapenv:Body>
</soapenv:Envelope>

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!!!
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic