• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unexpected XML tag in JAX-WS client

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have fought today with a trully strange problem.

So I am trying to consume a web service using a jax-ws client. i do not have access to the web serviceimplementation because it is a third party.

My client code looks like this:



the following error appears:


i used soap-ui to test the the web service and it works like a charm.
also i used wireshark to see what xml messages are transmitted throught the wire and the messages are:
Request:


and response:



i could not figure out the problem. but a hint tells me that the problem is that the namespace ns2="http://www.onepoint-project.com/webService" is on the user tag and not on the signOnResponse tag.
i used wsimport to generate the necessary classes on the client.
if this is the problem are there any workarounds on it, something to do on the client (because i do not have access to the web service implementation)?
what is stranger is that the code works when using Axis 2

Thank you for your answers.
Vlad
 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Turian,

what is stranger is that the code works when using Axis 2


Why do you want to use JAX-WS if it is already working with Axis2?

It looks like WSDL provided to you was modified since your service provider created web service, owing to the fact that signOnResponse namespace is not appearing in the response but is expeceted by your JAX-WS client. Can you try to tweak your WSDL by removing the namespace for signOnResponse and regenerate the client?
 
Turian Vlad
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Naren,

Thank you for your answer. Yes...i've tried to eliminate the namespace occurence from the wsdl and to generate the client code again. Unfortunately the problem still remains.

The wsdl generated by wsimport I presume, from the url that my web service provider gave me is:



attemting to remove the namespace from the top did not solved the problem.

if let's say i go over the generated classes and i remove all namespace occurences the problem is not solved either: it is just transformed into:



It is starting to drive me crazy. As i see things there are 2 things i could do:
1. modify the client so that it would not expect a certain namespace(i wasn't able to do that) and i don't believe it is a smart thing to do because when running wsimport again all the modifications will be lost
2. altering somehow the incoming soap message in order the add the namespace on the signOnResponse tag. i don't know how to do this either.

Any help will be appreciated.

Thank you all,
Vlad
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic