axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Leelarathne" <>
Subject Re: Reconstructing a SOAP reply -- Pls help
Date Sat, 06 Dec 2003 04:05:49 GMT
Hi Mark,

You can do the same thing as we did, when we implemented AxisMora.

Let's call what you return from your web service as "ReturnValue".

Step 1:: Register your result in the "DefaultTypeMappingImpl"

In  "org.apache.axis.encoding.DefaultTypeMappingImpl" you have to register
the your "ResultValue" object.

For example, in our AxisMora, all the web services return values that
implement the  "". We have
written the following code in the DefaultTypeMappingImpl.

    new org.apache.axismora.encoding.SerializableSerializerFactory(),

You can look at the code at;

Step 2:: Set the "ResultValue" to the SOAPBody as below,

         SOAPBodyElement bo = new SOAPBodyElement();

Then you have to set this SOAPBody to SOAPEnvelope and call the
"output(SerializationContext )" method of the SOAP envelope and flush the
writer you have set in the SerializationContext.

You can look at;

There should be slight variations from this mehtod, because we keep
soapHeaders and bodies seprately, but basically Axis keeps them together.
But this method shows you basically that you have to do.

Best Regards,
Lanka Software Foundation

> Hi
> I have a SOAP client which uses my own provider. In the provider I call
> another method - not through the method.invoke but through other means.
> But I want to send the reply through a SOAP msg. So is there a way for
> me to add the return value into the SOAP msg and reconstruct the SOAP
> reply msg? Can I use messageContext for that? Can someon pls point me to
> code samples?
> thanks
> Mark
> ---------------------------------
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now

View raw message