• 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

JAX-WS generated client request missing SOAP body

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I generated a Web Service client from a WSDL using JAX-WS. The generated code is placing the the Web Service pararameter into the Header of the SOAP envelope and not in the SOAP Body when the request is being instantiated. Can anyone tell me what JAX-WS embedded binding declarations that I might place into the WSDL file to get the Web Service parameter to be included in the SOAP Body. Thanks much!
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"carStuffCoder", please check your private messages regarding an important administrative matter.

Thank you.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Would it be possible to have a look at the WSDL, or an equivalent WSDL?
Best wishes!
 
Roger Irvin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RatingService WSDL

As you can see from the WSDL mark up, this service was created with .NET. I have always had to customize a .NET WSDL to get wsimport to generate acceptable java code, but this one really has me befuddled! The oXygen SOAP analyser tool, generates an appropriate request message from this WSDL and it utilizes Java APIs to do so. It may not be using JAX-WS though.

Thank you, again.

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sad to say, I cannot seem to access the WSDL using the link you provided. I tried with both soapUI and Firefox, but with no luck.
 
Roger Irvin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even with SOAP UI, generated SOAP envelope is having request param in header. Problem is with your wsdl. Remove all four header element from the binding.

<soap:header message="tns:Get_Termsevent" part="event" use="literal"/>
<soap:header message="tns:Get_TermsseResults" part="seResults" use="literal"/>
<soap12:header message="tns:Get_Termsevent" part="event" use="literal"/>
<soap12:header message="tns:Get_TermsseResults" part="seResults" use="literal"/>
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Thanks, I got it now!
After having had a quick look, it looks as if request parameter and response data can either be located in the SOAP Body OR in a SOAP Header.
For instance the Get_Terms operation:
The data type of the input data that can be enclosed in the SOAP Body is Get_TermsSoapIn, which is of this type:

All elements in the above data structure are, as you can see, optional.
In the binding for the same operation, you can see that the header can contain data of the type Get_Termsevent.
This data structure is an <event> element - the same as the data that can be in the SOAP Body.
Again, all elements in the data structure are optional.

Have you tried to issue requests enclosing request data only in the SOAP body?
Can the WSDL be changed or is that beyond your control?
I'll try to run the WSDL through wsimport tomorrow and see what fun stuff comes out...
Best wishes!
 
reply
    Bookmark Topic Watch Topic
  • New Topic