Hi Scott, I tried as u suggested. But now, it is not generating the expected request XML. It's omitting the child tags of "Restrictions" and "Properties" tags. Do u think it has got something to do with QName(nameSpaceURI, localPart)?
Following is my java code (as suggested by u)... ////////// Start Java Code //////////////// URL url = new URL ("http://localhost/xmla/msxisapi.dll"); SOAPMappingRegistry smr = new SOAPMappingRegistry (); StringDeserializer sd = new StringDeserializer (); BeanSerializer beanSer = new BeanSerializer(); smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "Result"), null, null, sd); smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName("urn:schemas-microsoft-com:xml-analysis", "Restrictions"), TRestrictions.class, beanSer, beanSer); smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName("urn:schemas-microsoft-com:xml-analysis", "Properties"), TProperties.class, beanSer, beanSer); // create the transport and set parameters SOAPHTTPConnection st = new SOAPHTTPConnection(); // build the call. Call call = new Call (); call.setSOAPTransport(st); call.setSOAPMappingRegistry (smr); call.setTargetObjectURI ("urn:schemas-microsoft-com:xml-analysis"); call.setMethodName("Discover"); call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/"); Vector params = new Vector(); TRestrictions restrictions = new TRestrictions(); restrictions.RestrictionList.CATALOG_NAME = "FoodMart 2000"; TProperties properties = new TProperties(); properties.PropertyList.DataSourceInfo = "Provider=MSOLAP;Data Source=s152969;"; properties.PropertyList.Format = "Tabular"; properties.PropertyList.Catalog = "FoodMart 2000"; params.addElement(new Parameter("RequestType", String.class, "MDSCHEMA_CUBES", null)); params.addElement(new Parameter("Restrictions", TRestrictions.class, restrictions, null)); params.addElement(new Parameter("Properties", TProperties.class, properties, null)); call.setParams(params); ///////// End Java Code ///////////// The following is request XML as observed on TCPMonitor ////////////REQUEST XML /////////////// <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:Discover xmlns:ns1="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestType xsi:type="xsd:string">MDSCHEMA_CUBES</RequestType> <Restrictions xmlns:ns2="" xsi:type="ns2:Restrictions"> </Restrictions> <Properties xsi:type="ns1:Properties"> </Properties> </ns1:Discover> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ////////End XML/////////////// Can u tell me if i am missing something.... BTW, does it have something to do with WSDL? Thanks, Vasu -----Original Message----- From: Scott Nichol [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 6:24 AM To: [EMAIL PROTECTED] Subject: Re: Connecting to MS OLAP Server using Java-Soap Client Your attempt to send XML as a string parameter will not work. The XML in the string will be "escaped", e.g. the '<' will be converted to '<'. A simple way to get the correct format is to create Java beans for the parameter data and map the class to the BeanSerializer. For example, class TRestrictionList { public String CATALOG_NAME; } class TRestrictions { public TRestrictionList RestrictionList; } class TPropertyList { public String DataSourceInfo; public String Format; public String Catalog; } class TProperties { public TPropertyList PropertyList; } ... BeanSerializer beanSer = new BeanSerializer(); smr.mapTypes(Constants.NS_URI_SOAP_ENC, // maybe leave out the namespace in QName? new QName("urn:schemas-microsoft-com:xml-analysis", "Restrictions"), TRestrictions.class, beanSer, beanSer); ... TRestrictions restrictions = new TRestrictions(); restrictions.RestrictionList.CATALOG_NAME = "FoodMart 2000"; params.addElement(new Parameter("Restrictions", Restrictions.class, restrictions, null)); Scott ----- Original Message ----- From: "Yalavarthi, Vasu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 2:41 AM Subject: Connecting to MS OLAP Server using Java-Soap Client > Hi, > My Java-Apache Soap client is trying to connect to Microsoft OLAP > Server 2000(Provider) using their XML for Analysis > (<http://msdn.microsoft.com/library/default.asp?> > URL=/library/techart/xmlanalysis.htm). > > The Provider is returning the following fault code... > > //////////////////////////////// > Generated fault: > Fault Code = XMLAnalysisError.88BA0500 > Fault String = Unable to process the request, because the > DataSourceInfo property was missing or not correctly specifie > d. > ///////////////// > > The required Input (as per Microsoft is).... > > //////////////REQUEST//////////////// > <SOAP-ENV:Envelope xmlns:SOAP- > ENV="<http://schemas.xmlsoap.org/soap/envelope/>" > xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" > xmlns:xsd="<http://www.w3.org/2001/XMLSchema>"> > <SOAP-ENV:Body> > <Discover xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP- > ENV:encodingStyle="<http://schemas.xmlsoap.org/soap/encoding/>"> > <RequestType>MDSCHEMA_CUBES</RequestType> > <Restrictions> > <RestrictionList> > <CATALOG_NAME>FoodMart 2000</CATALOG_NAME> > </RestrictionList> > </Restrictions> > <Properties> > <PropertyList> > <DataSourceInfo>Provider=MSOLAP;Data > Source=s152969</DataSourceInfo> > <Format>Tabular</Format> > <Catalog>FoodMart 2000</Catalog> > </PropertyList> > </Properties> > </Discover> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > ///////////////// End Request /////////// > > > > The following is my java client code......... > > /////////////JAVA client code //////////// > URL url = new URL > ("<http://localhost/xmla/msxisapi.dll>"); > > SOAPMappingRegistry smr = new SOAPMappingRegistry (); > StringDeserializer sd = new StringDeserializer (); > smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName > ("", "Result"), null, null, sd); > > // create the transport and set parameters > SOAPHTTPConnection st = new SOAPHTTPConnection(); > > // build the call. > Call call = new Call (); > call.setSOAPTransport(st); > call.setSOAPMappingRegistry (smr); > > call.setTargetObjectURI ("urn:schemas-microsoft- > com:xml-analysis"); > call.setMethodName("Discover"); > call.setEncodingStyleURI > ("<http://schemas.xmlsoap.org/soap/encoding/>"); > > Vector params = new Vector(); > params.addElement(new Parameter("RequestType", > String.class, "MDSCHEMA_CUBES", null)); > params.addElement(new Parameter("Restrictions", > String.class, "<RestrictionList><CATALOG_NAME>FoodMart > 2000</CATALOG_NAME></RestrictionList>", null )); > params.addElement(new Parameter("Properties", > String.class, "<PropertyList><DataSourceInfo>Data > Source=s152969;Provider=msolap;</DataSourceInfo><Catalog>Foodmart > 2000</Catalog></PropertyList>", null )); > > call.setParams(params); > > Response resp = null; > try { > resp = call.invoke (url, "urn:schemas-microsoft- > com:xml-analysis:Discover"); > } > catch (SOAPException e) { > System.err.println("Caught SOAPException (" + > e.getFaultCode () + "): " + e.getMessage ()); > return; > } > //////////////////////End Client Code //////////////// > > Any help from gurus on this interoperability...? > > Thanks in advance, > Vasu > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com