Dear all,

I am developing SOAP web service using netbeans.
As i have got preferred SOAP request and SOAP response,now i want to add security information like username and/or password in my SOAP header Request.

Please tell me how can i modify or add username in my SOAP header Request and same i can get in SOAP Response using netbeans or in which file.

Please help me.

Thank you.

Recommended Answers

All 5 Replies

This is actually a very rarely used feature, so finding documentation on it is difficult. I, for one, believe that sending a username and a password this way is risky, but, if you really need to do so, you can modify the SOAP header request.

The trick is to create a handler for this, there's excellent documentation at this site : http://www.javadb.com/using-a-message-handler-to-alter-the-soap-header-in-a-web-service-client/

My only question is, are you sure this is what you need to do?

i just to check with particular username specific page has to be open.
means with given username particular page is displayed or not.

i have to pass username in SOAP request.

you were given 2 ways to do that, which one is appropriate for your scenario and the implementation details are up to you to figure out.

I rather prefer sending the details in the HTTP headers, just the username, of course.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.