• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to order the elements in soap message?

 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a web service provider on AXIS1.3 and when am sending below response to the consumer:



But instead of above soap message I want to send below and want to order the elements.




Is there any tweaking reqired in the generated AXIS server-config.wsdd file. Please suggest.
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, how do you generate the xml currently? Using saaj?
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Java2WSDL and deployed my service using server-config.wsdd and Axis generated SOAP message for me while sending the web service response.
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are open to changing the wsdl, and possibly the java items involved (complex return object or helper class/interface) that you use, you can change the wsdl accordingly (to the order of the xml items you prefer), and use wsdl2java to generate the interface.
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am following bottom up approach for developing and deploying my web service using AXIS. I first hava POJO that needs to be exposed as web service and then I did java2wsdl and then I have created the server-config.wsdd and deployed the service and generated finally the wsdl. If I change wsdl then it is not going effect the way I send the *response* soap message and chaging the wsdl will effect the client and the way he sends his *request* soap message since client side stubs will determine the request soap message which are generated from wsdl.

Please correct me if my understanding is wrong.
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct.

I havent tried, but, have you tried rearranging the variables in your return object?...just in case the xml elements gets rearranged too
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep, I dont want to rearrange the elements in an return object but want to rearrange the return objects themselves...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic