Hello,
I've been following your discussion, I'm new on that, and I don't
undestand,.My problem is that I receive a SOAP response and the body is an
object, and I know which kind of object is it, I want to rebuild the object.
how I do?
thanks
montse
> Stefan,
>
> Thanks for your help. In case you need them, here are the overriding
> methods (not tested):
> public void writeBody (AbstractXmlWriter writer)
> throws IOException
> {
> if (body instanceof Element)
> ((Element) body).write(writer);
> else
> super.writeBody(writer);
> }
>
> public void parseBody (AbstractXmlParser parser)
> throws IOException
> {
> Element el = new Element();
> el.parse(parser);
> body = el;
> }
>
> Thank you,
> Daniel Feygin
>
> > -----Original Message-----
> > From: ksoap-admin@enhydra.org [mailto:ksoap-admin@enhydra.org]On
> > Behalf Of Stefan Haustein
> > Sent: Monday, July 09, 2001 5:15 PM
> > To: ksoap@enhydra.org
> > Subject: Re: Ksoap: Sending and receiving Elements
> >
> >
> > Daniel Feygin wrote:
> > >
> > > Stefan,
> > >
> > > Thank you for your response. I extended SoapEnvelope per your
> > suggestion,
> > > but I also need a way of parsing the server's XML response and
> > getting it
> > > out of a SoapEnvelope. Both request and response can be arbitrary XML
> > > elements, so I need a generic method for sending and receiving
> > them. Are
> > > kXML and kSOAP presently capable of handling this requirement?
> >
> > Yes, for receiving arbitrary XML elements, exend the
> > parseBody method of the SoapEnvelope. You will need to create
> > an Node object and call its parse method with the XmlParser
> > handed to the parseBody method. The parsed Node object provides
> > access to the kDOM read.
> >
> > Best,
> > Stefan
> >
> > --
> > Stefan Haustein
> > Univ. Dortmund, FB 4, LS 8 tel: +49 231 755 2499
> > Baroper Str. 301 fax: +49 231 755 5105
> > D-44221 Dortmund (Germany) www-ai.cs.uni-dortmund.de
> > _______________________________________________
> > Ksoap mailing list
> > Ksoap@enhydra.org
> > http://www.enhydra.org/mailman/listinfo.cgi/ksoap
>
> _______________________________________________
> Ksoap mailing list
> Ksoap@enhydra.org
> http://www.enhydra.org/mailman/listinfo.cgi/ksoap
|