You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jabali Putrevu <ja...@hotmail.com> on 2002/05/09 23:50:18 UTC

Accessing avalysis services using Axis beta 2

Hello,

I wrote the small program using latest Axis beta 2 to find datasources in OLAP server. I am able to compile, but when I run I get Deserializer exceptions. 

import java.io.*;
import java.util.*;
import java.net.*;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import org.apache.axis.*;
import org.apache.axis.client.*;
import org.apache.axis.encoding.*;

public class FindDSN 
{
    public static void main(String[] args) throws Exception 
    {
        URL url = new URL ("http://localhost/XMLForAnalysisProvider/msxisapi.dll");
        Service service = new Service();
        Call call = (Call)service.createCall ();
        call.setTargetEndpointAddress (url);
        call.setSOAPActionURI("urn:schemas-microsoft-com:xml-analysis:Discover");
        call.setOperationName(new QName("urn:schemas-microsoft-com:xml-analysis", "Discover") ); 
        call.setEncodingStyle ("http://schemas.xmlsoap.org/soap/encoding/");
        call.addParameter( "RequestType", XMLType.XSD_STRING, ParameterMode.IN );
        call.addParameter( "Restrictions", XMLType.XSD_STRING, ParameterMode.IN );
        call.addParameter( "Properties", XMLType.XSD_STRING, ParameterMode.IN );
        call.setReturnType(org.apache.axis.Constants.XSD_STRING);
        
        String sResponse;
        try 
        {
            Object [] obj =  new Object[] { "DISCOVER_DATASOURCES","","" };
            sResponse = (String) call.invoke ( obj);
        }
        catch (AxisFault e) 
        {
            System.err.println("AxisFault (" + e.getFaultCode () + "): " + e.getMessage ());
            return;
        }
        if (sResponse != null)
        {
            System.out.println("Response is:" + sResponse);
        }
    }
}

Can someone help me what is wrong in the above code?


- Exception:
org.xml.sax.SAXException: SimpleDeser cannot handle structured data!
        at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(Simp    
serializer.java:155)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement(
rializationContextImpl.java:831)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorde
va:199)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageEl
t.java:589)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:22
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:248)
        at org.apache.axis.client.Call.invoke(Call.java:1701)
        at org.apache.axis.client.Call.invoke(Call.java:1608)
        at org.apache.axis.client.Call.invoke(Call.java:1169)
        at FindDSN.main(FindDSN.java:40)
AxisFault (http://xml.apache.org/axis/:Server.userException): ; nested excep
 is:
        org.xml.sax.SAXException: SimpleDeser cannot handle structured data!


Thanks