• 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

CXF incorrect WSDL automatically generated ? Please help !

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there. I am fighting the last two days with the same problem and I don't know how to fix this. Even not sure if it is an error or not.

I have a CXF Web Service with something I consider very strange and I would like to fix. This is one of the calls that the Web Service deals with:


As you can see, it receives 4 normal parameters plus 3 extra parameters in the header (callerId, timestamp and signature).

It compiles successfully. Then I deploy it also successfully in a WebLogic server.

Finally, I use SoapUI to test it. I provide SoapUI with the URL that WebLogic is providing me with the WSDL. This is, I am not doing any change in the automatic generated WSDL. This is what I am getting for this getParent in SoupUI:


My question is very clear. I see the 3 parameters in the header section (lines 3, 4 and 5: callerId, timestamp and signature) but why these 3 parameters are AGAIN at the end in the body part (lines 17, 18 and 19) ??? I don't want them in the body part, I want them only in the header.

Any idea why this is happening ? Is that normal ? is it a bug ? Thank you for your help !

thanks
Felix Mercader


 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you should show the wsdl, in particular, the wsdl:binding element? There you would probably get the clue why.
 
Felix Mercader
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi tsuji. Thank you for your answer.

Here the portion of the wsdl:binding related with the getParent call:

 
g tsuji
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your soap extensibility element you should include the attribute "parts" referencing the message part where institutionName, clientNumber etc are wrapped. Check it out, it looks like it is named "getParent" or something. If that is the name, you write it like this.

Look at that message element for the precision.
 
Felix Mercader
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tsuji... thanks a million ! You saved my week. Two days fighting with this issue and now it is fixed thanks to you.

I changed my line

<soap:body use="literal">

for

<soap:body use="literal" parts="parameters"/>

and now it works wonderfully ! Thanks a lot

Anyway, I wonder why I had to write this extra attribute. The WSDL is automatically generated. I don´t like to have to do these manual changes. The default behavior is not to have the parts attribute and that means that everything goes in the body part (also the header parameters) so to avoid it I need to add the parts attribute ? In other words: can I avoid this anyway in the java code of the WebService so this parts attribute will appear so I don´t need to do any manual change to the automatic WSDL ???

thank you very very much !!!
 
g tsuji
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am glad you've got the spirit of it very well.

In other words: can I avoid this anyway in the java code of the WebService so this parts attribute will appear so I don´t need to do any manual change to the automatic WSDL ???


You sure don't... the mapping is designed the best it can bi-directional. In the case where you're doing a bottom-up, you can start by adding the partName element to the @WebParam. That would handle the semantic in the dyn gen wsdl.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic