|
Hi, I am trying to convert our web service application from axis to axis2. The sample axis code is the following: ---------------------------------------------------------------- void doService(MessageContext ctxt){ // retrieve the soap envelope // retrieve the soap
envelope SOAPEnvelope requestEnv =
null; Vector bodyElements = null; Enumeration e0 = null;
requestEnv =
ctxt.getRequestMessage().getSOAPEnvelope(); bodyElements = requestEnv.getBodyElements(); e0 =
bodyElements.elements(); while (e0.hasMoreElements())
{
// recurse through the soap body and retrieve the
// rpc elements, the rpc elements contain the
// embeded objects which were returned from the service
RPCElement rpcElement = (RPCElement) e0.nextElement();
Vector params = rpcElement.getParams();
Enumeration e1 = params.elements();
while (e1.hasMoreElements()) {
RPCParam rpcParam = (RPCParam) e1.nextElement();
Object param = null;
param = rpcParam.getObjectValue();
// perform some service
// ...... } } } -------------------------------------------------------- In axis, there is an RPCElement class can be used to pull out SOAP
input object’s information, but in axis2, it seems that RPCElement can
not be used anymore. Question is which class in axis2 can be used as substitute
for RPCElement. I found “RPCRequestElement” and
“RPCRespondElement” classes in axis2 web site, but not sure they
are the right answer, if yes, which axis2 jar they belong to? How to replace above highlighted code by using axis2? Is there any
examples I can look at? Any help is highly appreciated! Liping
|
- convert from axis to axis2 Liping Guo
- Re: convert from axis to axis2 robert lazarski
