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

how do I insert security headers in to soap jax-rcp request using Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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?

Thank you very much,

Nico
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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!
 
Nicolaas Loubser
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ivan

I will post an update once I get it working - this article looks much more thorough than the ones I have read previously.




 
Nicolaas Loubser
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic