• 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

Pass object from a webservice client to the MessageContext

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

I'm trying to pass an object to the MessageContext from a Weblogic webservice client (Weblogic 9.2). The problem is that the MessageContext does not yet exist prior to invoking the send method on the client, thus it's not possible to retrieve a MessageContext and pass any objects to it using its setProperty(String, Object) method. I want to pass an object to the MessageContext so I can later on retrieve this object in the client's MessageHandler.

Any thoughts on how to achieve this?

Kind regards,
Simon
 
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 am not familiar with Weblogic servers, but if the web service stack is JAX-WS compatible, here is what you can do:
Proxy classes implements and Dispatch interfaces extends the BindingProvider interface. In this interface, there is a method getRequestContext, which allows you to retrieve a map that is used to initialize the message context for outgoing requests from the client.
References: JAX-WS 2.1 Specification, section 4.2.1.
Best wishes!
 
Simon Jensen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,

Thanks for your input. Unfortunately Weblogic 9.2 uses JAX-RPC and not JAX-WS, so the BindingProvider tip is not applicable.
Any other ideas? I'm thinking ThreadLocal as an alternative hack to pass properties from the client to the MessageHandler, but it sure would be nice if there was a less hacky way to do this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic