I'm using Axis to connect to M.S.'s XML/A and I can connect fine but Axis keeps blowing up with the response that XML/A is returning.
Looking at what is happening I can see that XML/A is returning well formatted XML (show below) but for some reason my code keeps causing a: [java] org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. error. I've been at this for over two days now. Can someone please help me out? Thanks! --- XML returned from XML/A ---- <?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>Local Analysis Server</DataSourceName> <DataSourceDescription>Microsoft Analysis Server 2000 on local machine</DataSourceDescription> <URL>http://localhost/xmla/msxisapi.dll</URL> <DataSourceInfo>Provider=MSOLAP;Data Source=local</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> ---- MY CODE ---- package com.symbol.pps.analysis.test; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.Constants; import javax.xml.namespace.QName; import org.apache.log4j.PropertyConfigurator; public class TestClient { public static void main(String [] args) { try { PropertyConfigurator.configure(args[1]); Service service = new Service(); Call call = (Call) service.createCall(); System.out.println("Adding Parameters"); call.addParameter("RequestType", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter("Properties", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter("Restrictions", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter("Result", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.OUT); call.setReturnType(org.apache.axis.Constants.XSD_STRING); l.setTargetEndpointAddress( new java.net.URL(args[0]) ); call.setOperationName( new QName("urn:schemas-microsoft-com:xml-analysis","Discover") ); System.out.println("Setting Properties"); call.setProperty(call.SOAPACTION_USE_PROPERTY, Boolean.TRUE); call.setProperty(call.SOAPACTION_URI_PROPERTY, "urn:schemas-microsoft-com:xml-analysis:Discover"); System.out.println("Invoking"); Object obj = call.invoke( new Object[] { "DISCOVER_DATASOURCES", "", "" } ); System.out.println("Sent msg', got '" + obj.toString() + "'"); } catch (Exception e) { System.err.println(e.toString()); } } }