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

How to order the elements in soap message?

 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic