Forums Register Login

Pass object from a webservice client to the MessageContext

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
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.
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2413 times.
Similar Threads
Response Contained No Data Exception
How to identify client calls from server side
How to get access to MessageContext in a non-endpoint class?
Destination URI with Axis
SOAPHeader in axis2
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:32:06.