This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Thank you for reading my post Appologies if it should be in the Java forum.
I am using eclipse to import a jax-rpc encoded webservice from a service provider. This part works well, and Eclipse creates all the classes needed, and I get data back. There are however a few calls that needs additional headers, either a session id, or a username and password, which ever is available.
I dont understand why Eclipse doesnt import the security headers as well, as it is clearly defined in the XML and can be viewed in SOAPUI. I went through my project and it doesn't seem as if Eclipse created it somewhere else.
I have tried the following as well, using bindings, and wscompile, but no luck.
Does anyone have any idea how I had security headers(or message layer headers as I believe they are called) to an outgoing SOAP request using JAX RPC?
I try to stay away from JAX-RPC, but as far as I recall, handlers should be available there too (as they are in JAX-WS).
To add headers, you can write a handler that add them to outgoing SOAP messages. Data to fill in the headers can be stored in the message context (?) and then be inserted in the headers by the handler.
This article may help you: http://www.ibm.com/developerworks/webservices/library/ws-tipjax2/index.html Best wishes!
I will post an update once I get it working - this article looks much more thorough than the ones I have read previously.
Joined: Sep 02, 2011
Got it working, inserting the security headers was no problem in the end, since Eclipse indeed generated everything I needed, it just needed a LOT of searching since the webservices is quite big, and a massive amount of code was generated.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how do I insert security headers in to soap jax-rcp request using Java