logo       

Re: Parsing SOAP messages using kXML: msg#00010

java.enhydra.kxml

Subject: Re: Parsing SOAP messages using kXML

Now I am trying to parse it using the kXML APIs. It seems that when you parse using kXML it accepts XML elements with only one word. that is it will parse <SOAP-ENV> but not <SOAP-ENV: Envelope>

(...)

> parser.read(Xml.START_TAG, "","SOAP-ENV:Envelope

Hi,

parser.read expects the type, the namespace and the tag name (null for
any). You may need to switch on namespace support. Please try

String SOAP_ENV = "http://schemas/xmlsoap.org/soap/envelope/";;
parser.read(Xml.START_TAG, SOAP_ENV, "Envelope");

you may want to take a look at the ksoap Envelope implementation which performs similar parsing steps.

if(name.equals("PatientName xmlns=\"\" xsi:type=\"xsd:string\"")){

This will not work: the xml element name is only "PatientName", please use the attribute access methods to access the attributes (xsi:type).

Best,
Stefan


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise