axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Carew <>
Subject BeanSerializer bug?
Date Thu, 27 Jun 2002 13:31:15 GMT
I posted this on axis-user yesterday and haven't heard anything so I hoping
that it was the wrong forum.  Here is the issue.  I have a "Bean" that I am
passing to the call object as an argument to my service.  The call never
makes it out of the client VM.  The code is in the main method of a test
client class and looks like this: 
            Options options = new Options(args);
            String message = "Default message";
            if (options.isValueSet('m') != null )
                message = options.isValueSet('m');
            Environment env = new Environment();
            Service service = new Service();
            Call call = (Call) service.createCall();
            QName qn = new QName("echoWSjava", "Environment" );
            call.registerTypeMapping(Environment.class, qn,
            QName sqn = new QName("echoWSjava", "String" );
            String result;
            call.setTargetEndpointAddress( new;
            call.setOperationName( new QName("echoWSjava","echoMessage"));
            result = (String) call.invoke(new Object[] { message,env } );

When Axis tries to get the serializer it falls in the getSerializerAs method
of BaseSerializerFactory and the tests in that method end up trying call
newInstance on the BeanSerializer class.  There is no default constructor in
BeanSerializer and a "java.lang.InstantiationException:
org.apache.axis.encoding.ser.BeanSerializer" exception is thrown (which is
caught at some point and eaten so you never see the error unless you go edit
Axis code and recompile, but that is another issue altogether).  Am I doing
something wrong in my code?  The Environment class I am using works fine
with Apache SOAP 2.3's BeanSerializer.

View raw message