Normally, with Apache SOAP you would write a Java class into which the rowset,
defined as a sequence of rows, can be de-serialized.  The case below would be a
bit trickier, since the return parameter XML includes the schema, so I doubt
Apache SOAP would successfully parse it, but perhaps Axis could.

Scott

----- Original Message -----
From: "Yalavarthi, Vasu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 09, 2002 2:43 AM
Subject: How to get value(s) from Response XML


> Hi,
>  My Apache Java-Soap client os sending XML request to Microsoft Analysis
> Server which supports XML for Analysis.
> The Response object's getReturnValue(), return's Parameter, from which i can
>
> get the value.
> This will be useful if the method returns a single value (like account
> balance etc).
>
> But my respose is an XML (provided below) as provided below (especially the
> "<row>" node and its children).
> How do i retrieve those values from the Response object or some other Soap
> API?
>
>
>
> Thanks,
> Vasu
>
>
>
> ///////////////////RESPONSE XML taken from Axis TCPMonitor utlity
> ///////////////////////////
>     <?xml version="1.0" ?>
>     <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>     <SOAP-ENV:Body>
>     <m:DiscoverResponse xmlns:m="urn:schemas-microsoft-com:xml-analysis">
>     <return
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>     <root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>     <xsd:schema xmlns="urn:schemas-microsoft-com:xml-analysis:rowset"
> targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:sql="urn:schemas-microsoft-com:xml-sql"
> elementFormDefault="qualified">
>     <xsd:element name="root">
>     <xsd:complexType>
>     <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>     <xsd:element name="row" type="row" />
>     </xsd:sequence>
>     </xsd:complexType>
>     </xsd:element>
>     <xsd:complexType name="row">
>     <xsd:choice maxOccurs="unbounded" minOccurs="0">
>     <xsd:element name="DataSourceName" type="xsd:string"
> sql:field="DataSourceName" />
>     <xsd:element name="DataSourceDescription" type="xsd:string"
> sql:field="DataSourceDescription" />
>     <xsd:element name="URL" type="xsd:string" sql:field="URL" />
>     <xsd:element name="DataSourceInfo" type="xsd:string"
> sql:field="DataSourceInfo" />
>     <xsd:element name="ProviderName" type="xsd:string"
> sql:field="ProviderName" />
>     <xsd:element name="ProviderType" sql:field="ProviderType">
>     <xsd:complexType>
>     <xsd:sequence maxOccurs="unbounded" minOccurs="0">
>     <xsd:any processContents="lax" maxOccurs="unbounded" />
>     </xsd:sequence>
>     </xsd:complexType>
>     </xsd:element>
>     <xsd:element name="AuthenticationMode" sql:type="xsd:string"
> sql:field="AuthenticationMode" />
>     </xsd:choice>
>     </xsd:complexType>
>     </xsd:schema>
>     <row>
>     <DataSourceName>s152969</DataSourceName>
>     <DataSourceDescription>Microsoft Analysis Server 2000 on local
> machine</DataSourceDescription>
>     <URL>http://localhost/xmla/msxisapi.dll</URL>
>     <DataSourceInfo>Provider=MSOLAP;Data Source=s152969</DataSourceInfo>
>     <ProviderName>Microsoft XML for Analysis</ProviderName>
>     <ProviderType>
>     <TDP />
>     <MDP />
>     <DMP />
>     </ProviderType>
>     <AuthenticationMode>Unauthenticated</AuthenticationMode>
>     </row>
>     </root>
>     </return>
>     </m:DiscoverResponse>
>     </SOAP-ENV:Body>
>   </SOAP-ENV:Envelope>
> /////////////////////////////////////END Response XML
> ////////////////////////////


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to