Today my dynamic provider extends RPCProvider and overrides processMessage. It can generate WSDL for interfaces of running JMX MBeans as well as routing requests to MBean instances.

Looking at MsgProvider, I noticed that the SOAPEnvelope is a processMessage parameter.
It seems to me that, when processMessage is called, the message has already been deserialized?
If it is the case, I will have the same problem. I have the feeling that I have something wrong here.




Davanum Srinivas wrote:

This is definitely a hack, i don't recommend using it this way. Do you
want to experiment a bit with MsgProvider? It's designed specifically
for delivering the DOM to your service.

-- dims

On Tue, 27 Jul 2004 15:03:20 +0200, Jean-Francois Denise - Sun
Microsystems <[EMAIL PROTECTED]> wrote:


I found a problem when accessing header.

Context : webservices exposed dynamicaly (WSDL and implementation).

In order to define which service is in the scope of a received request,
I need to access an Header.

I access the header when Axis calls my own instance of
EngineConfiguration.getService(QName name).

I use Message.getSOAPEnvelope().getHeaderByName(...) I noticed that
calling getSOAPEnvelope launches the full message deserialization. The
body is also deserialized.

In case of WRAPPED/LITERAL this is a problem. The metadata (mainly types
of the service operations) used to create the service ServiceDesc
are not known when this deserialization occurs. Axis is deserializing
the literal values in "best effort" (String for simple types, ...)

I perhaps access the header in the wrong place. This could sound strange
but I need to access the header in order to findout what is the service.

I found a way to do it but it smells the hack... I create a new Message
from the received one. Call getSOAPEnvelope() on the newly created one.
The deserialization is done twice...

Message msg = msgContext.getRequestMessage();
Message msg2 = new Message(msg.getSOAPPartAsString());
SOAPEnvelope env = msg2.getSOAPEnvelope();

Regards.

--
----------------------------------------------------------------------
Jean-Francois Denise            Sun Microsystems
Sun ONE/Java Web Services
email: [EMAIL PROTECTED]
Internal home page : http://icncweb.france/~jfdenise
-------------------------------------------------------------------










--
----------------------------------------------------------------------
Jean-Francois Denise Sun Microsystems
Sun ONE/Java Web Services
email: [EMAIL PROTECTED] Internal home page : http://icncweb.france/~jfdenise
-------------------------------------------------------------------




Reply via email to