You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Gagan Sinha <ga...@gmail.com> on 2007/06/26 16:46:03 UTC
Steps for returning Custom SOAP BODY
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
RE: Steps for returning Custom SOAP BODY--------------URGENT-------------------------
Posted by Gagan Sinha <ga...@gmail.com>.
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:jowen4077@yahoo.com]
Sent: Tuesday, June 26, 2007 9:33 PM
To: axis-user@ws.apache.org
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Steps for returning Custom SOAP BODY
Posted by Gagan Sinha <ga...@gmail.com>.
Thanks for the Response Joe. I am going to try your approach.
Also I was wondering if a Serializer Handler Can be used ?
-----Original Message-----
From: Joe Nathan [mailto:jowen4077@yahoo.com]
Sent: Tuesday, June 26, 2007 9:33 PM
To: axis-user@ws.apache.org
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Steps for returning Custom SOAP BODY
Posted by Joe Nathan <jo...@yahoo.com>.
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#a11316918
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org