You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/18 00:52:31 UTC

DO NOT REPLY [Bug 12753] New: - problem while deserializing output params based on WSDL (3 in params, 2 out params) in the client; org.xml.sax.SAXException: Bad types (double -> class java.lang.String)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12753>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12753

problem while deserializing output params based on WSDL (3 in params, 2 out params) in the client; org.xml.sax.SAXException: Bad types (double -> class java.lang.String)

           Summary: problem while deserializing output params based on WSDL
                    (3 in params, 2 out params) in the client;
                    org.xml.sax.SAXException: Bad types (double -> class
                    java.lang.String)
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: mikhail.shekhtman@ssmb.com


Hi!

I already posted under bug #12636 about a similiar issue with other builds 
(beta-3, rc1). Now, however, I tested a similiar(and more realistic scenario 
based on my framework) with nightly build dated Sep. 17, 2002 (tested with beta-
3, rc1, and the mentioned nightly build on both client and the server).

In this case, I have a void method that has 3 input parameters and 2 output 
parameters. Axis client fails while deserializing the last output parameter.
When I have just one input parameter, problem does not seem to appear.

The problem occurs when I am trying to use WSDL file to drive SOAP calls.

My new client looks like this:
================================================
//setting up the call
javax.xml.rpc.Service svc = 
	new org.apache.axis.client.Service(
		  new java.io.FileInputStream(wsdlLocation),
		  new javax.xml.namespace.QName("urn:esr.wsdl.test",
						"EsrTestService")
		  );
			
javax.xml.rpc.Call call = svc.createCall(
		 new javax.xml.namespace.QName("urn:esr.wsdl.test",
					   "EsrTest"),
		"esrInOut"
		 );
			
//init in params
Object[] soapInParams = new Object[] { 
                               "token1",
                               "token2",
                               new Short((short)5) };
	
//calling soap service
Object ret = call.invoke(soapInParams);
			
//printing output params
java.util.Map outParams = call.getOutputParams();
....
================================================

The error that I get is this:
================================================
org.xml.sax.SAXException: Bad types (double -> class java.lang.String)
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:280)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextIm
pl.java:896)
================================================

I am attaching the complete test case in my follow-up posting.

Files zipped:
-----------------------------------------------------

req_resp_envelopes.txt   ---   contains request and response SOAP envelopes    
being transmitted.

error_on_client.txt      ---   contains the stack trace for the client side 
error.

EsrTestBindingImpl.java  ---   contains implementation for the file generated 
by WSDL2Java tool (based on esr.wsdl, also included).

EsrTestServiceTestCase.java --- contains test client driven by WSDL; 
NOTE: location for the esr.WSDL is hardcoded there and should be modified to 
whatever location on the drive you'll be placing esr.WSDL.

other files generated by WSDL2Java tool.
-----------------------------------------------------

Please take a look at it as it is very important for our library to be flexible 
enough to call any service based on a WSDL file provided at run-time.


Thanks for you help.

Mikhail Shekhtman
Salomon Smith Barney
mikhail.shekhtman@ssmb.com