Young, Wayne wrote:

If I create an OM element as below in my client & invoke the
"getTreeviewXML" method, how do I read the "location" I passed in using
my Axis2 service?

       OMFactory fac = OMAbstractFactory.getOMFactory();
       OMNamespace omNs =
fac.createOMNamespace("http://metasolv.com/rv3d";, "rv3d");
       OMElement method = fac.createOMElement("getTreeviewXML", omNs);
       OMElement value = fac.createOMElement("location", omNs);
       value.addChild(fac.createText(value, "12345"));
       method.addChild(value);

I copied this from the echo client, but the echo service just does a
"detach" and doesn't actually read the value.

Thanks in advance.
Axis2 service will give you full liberty to access SOAP body's first clild.

Let say you have a operation "public OMElement operation1(OMElement ele){}" in your service, and you have to get the location as you mentioned prior.

"ele" will be "getTreeviewXML"... so
"location" is ele.getFirstChild() .... to extract text ....ele.getFirstChild().getText() ... simple as that :)

Saminda

Reply via email to