Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic