Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send custom data when initializing java WebService over soap

 
Ales Mesni
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I have a question about sending additional data over soap to the functions.

My webService function requests only one integer, for example an getDocumentPrivilage(DocumentID).
In another WebService user registered and he got an unique ID, so the other application can see who he is.

So on Service one he registers, gets id and it has to send it to the other webservice tor the privilage. Id dont wish to rewrite the function so that it gets the unique ID (like this getDocumentPrivilage(uniqID,DocumentID)) but, the wish is that i would be able to create a client that sends this data at the initialization or somehow as some sort of parameter behind the function. Is this possible??

I tried the ServiceLifecycle but cant see any setting i've given in.

Im using WebSphere CE for the server and Jax-ws
Creating the webapp in java.

Thank you very much in advance.

lp, Mesni
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Yes, additional data, such as authorization credentials, can be included in a SOAP envelope in the header section, without interfering with the request data (which is contained in the SOAP body).
For an introduction to SOAP headers, take a look at this webpage: http://www.w3schools.com/soap/soap_header.asp
Best wishes!
 
Ales Mesni
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you wery much Ivan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic