That should be, System.out.println(myOMElement.toStringWithConsume());
Most probably you have a response element as the top element.
Upul
On 10/8/07, Upul Godage <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> You can print out the OMElement and see how you get the element at that
> moment in your code.
> System.out.println(myOMElement);
>
> Upul
>
>
> On 10/8/07, jerome.mariette <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi everybody,
> > I have a little probleme reading messages I got back from my web
> > service:
> > This is the OMElement I'm sending back
> > OMFactory fac = OMAbstractFactory.getOMFactory();
> > OMNamespace omNs =
> > fac.createOMNamespace("http://server.webservice.aved.mbari.org", "ns1");
> > OMElement job_info = fac.createOMElement("AVEDJob", omNs);
> > OMElement cluster_id = fac.createOMElement("cluster", omNs);
> > OMElement job_id = fac.createOMElement("job", omNs);
> > cluster_id.setText(Integer.toString(45));
> > job_id.setText( Integer.toString(0));
> > job_info.addChild(cluster_id);
> > job_info.addChild(job_id);
> > return job_info;
> >
> > To read it I do like that:
> > Iterator childElements = myOMElement.getChildElements();
> > String s = ((OMElement)childElements.next()).getText();
> > String s1 = ((OMElement)childElements.next()).getText();
> > System.out.println("s " + s);
> > System.out.println("s1 " + s1);
> >
> > If I do that outside a web service it's working (create the OMElement in
> > a
> > main and read it into the same main) ... but when I'm trying to read the
> > OMElement coming back from my web service, it's not working!!!
> > I guess it's because of the SOAP layer added to wrape the message, but I
> > have no idea how to take it away to be able to work on my OMElement
> > directly
> > !!!
> >
> > thx for your help!
> > --
> > View this message in context:
> > http://www.nabble.com/OMElement-problem-tf4585272.html#a13088866
> > Sent from the Axis - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>