axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Johnston" <paul.johns...@tm-ltd.co.uk>
Subject Re: Retrieving data from a SOAP packet
Date Thu, 06 Jun 2002 14:41:27 GMT
Here is the code I am using:

        Service  service = new Service();
        Call     call    = (Call) service.createCall();
        
        // create the endpoint URL
        String endpoint = "http://localhost:8900/Soap-Control";
        
        // set up the call information
        call.setTargetEndpointAddress( new URL(endpoint) );
        call.setOperationStyle("rpc");
        
        RPCParam a1 = new RPCParam("hostSessionID", new String("ABC12345")); 
        RPCParam a2 = new RPCParam("source", new String("/localstore/Partner.eps")); 
        RPCParam a2a = new RPCParam("platform", new String("WinNT")); 
        RPCParam a3 = new RPCParam("sessionType", new String("viewer")); 
        RPCParam a4 = new RPCParam("userID", new String("1")); 
        RPCParam a5 = new RPCParam("firstName", new String("Paul")); 
        RPCParam a6 = new RPCParam("lastName", new String("Johnston"));

        String obj = "";
        
        // actually do the call
        try {
            obj = (String) call.invoke("CreateSession2", new Object[] { a1, a2, a2a, a3, a4,
a5, a6 });
        } catch(AxisFault af) {
            System.err.println("FAULT:\n" + af.getFaultString());
        }

The error occurs when we hit the try{} block. The SOAP Packet returned looks like this:

<?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>   
        <CreateSession2Response>    
            <sessionReference>http://test.tm-ltd.co.uk:85/digest/3431393336323033323338313933363230333234360000000000000000000000</sessionReference>
   
            <launch>
                <viewer>    
                    <version>3.0</version>    
                    <URL>http://test.tm-ltd.co.uk:85/digest/3431393336323033323338313933363230333234360000000000000000000000</URL>
   
                    <versionURL>http://www.rtimage.com/client-version</versionURL>
                </viewer> 
            </launch>   
        </CreateSession2Response>  
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

And I get this error:

     [java] - Exception:
     [java]  org.xml.sax.SAXException: SimpleDeser cannot handle structured data!
    [java] FAULT:
      [java]    at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:155)
    [java] org.xml.sax.SAXException: SimpleDeser cannot handle structured data!
     [java]     at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:831)

     [java]     at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:199)
     [java]     at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:589)
     [java]     at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:224)
     [java]     at org.apache.axis.message.RPCElement.getParams(RPCElement.java:248)
     [java]     at org.apache.axis.client.Call.invoke(Call.java:1701)
     [java]     at org.apache.axis.client.Call.invoke(Call.java:1608)
     [java]     at org.apache.axis.client.Call.invoke(Call.java:1634)
     [java]     at uk.co.tm.rtp.cfx_axis.processRequest(cfx_axis.java:57)
     [java]     at uk.co.tm.rtp.cfx_axis.main(cfx_axis.java:101)
     [java]

Basically, I have no idea why it isn't getting into Java.

Any more ideas?

Paul

PS Anna, I didn't really understand that code.  No comments, so I didn't see where I could
put it in.  Thanks anyway.

Mime
View raw message