How can I achieve the following in the SOAP response in AXIS 1.4?

<?xml version="1.0" encoding="ISO-8859-1"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <soapenv:Body>
   
           MY OWN XML HERE   instead of the AXIS generated Response .
  
    </soapenv:Body>
</soapenv:Envelope>

Will using a Custom Serialiazation Class Help ?

Any help would be highly appreciated 


-----Original Message-----
From: Joe Nathan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 9:33 PM
To: [email protected]
Subject: Re: Steps for returning Custom SOAP BODY


I am not sure whether I understand your question correctly.
You can return "String" objects which is XML string contents. 
For example, your POJO service can have the following;

public class MyPoJo {

  public String xmlHello(String v) {
     String xmlstring = "<hello>.....</hello>";
     return xmlstring;
  }
}

>From clinents, you just get XML as String as follows;

  SOAPBody soapBody = sresponse.getSOAPBody();
  SOAPElement node = (SOAPElement)soapBody.getFirstChild().getFirstChild();
  String msg = node.getValue();

Note that you can XML contents as String for arguments as well. The rest
will 
be taken care by service containers!

Hope this helps!










Gagan Sinha wrote:
> 
>  
> 
> Hi 
> 
>  
> 
> I have hosted a simple webservice using AXIS 1.4 .
> 
> The Java Method returns a ArrayList of ProductVO class.
> 
>  
> 
> Can any one help me with the steps for returning my own Custom XML in the
> SOAP body? I.e. I need to replace the Axis generated SOAP body with my
> own.
> 
>  
> 
> The need is urgent and any help would be highly appreciated.
> 
>  
> 
> Thanks & Regards
> 
> Gagan
> 
>  
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Steps-for-returning-Custom-SOAP-BODY-tf3982830.html#a1
1316918
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to