This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Send custom data when initializing java WebService over soap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Send custom data when initializing java WebService over soap" Watch "Send custom data when initializing java WebService over soap" New topic
Author

Send custom data when initializing java WebService over soap

Ales Mesni
Greenhorn

Joined: Dec 16, 2009
Posts: 14
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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

Joined: Dec 16, 2009
Posts: 14
Thank you wery much Ivan
 
 
subject: Send custom data when initializing java WebService over soap
 
Similar Threads
JSP include
Why SOAP? Why not HTTP?
HttpConnectionURL
Axis fault
Webservices using XML Over HTTP