axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Felix-Henry" <cfelixhe...@scort.com>
Subject RE: INOUT parameter with user-defined class ?
Date Fri, 18 Jan 2002 18:36:21 GMT
Jack wrote:
> So I tried a number of other possibiliities, and came upon the
> nullpointerexception. I get this exception when trying to implement the
> following service:
> Customer zoekCustomer(String shortname)

> with a client which uses:
>  QName    qn      = new QName( "urn:Willow", "customer" );
>  call.addSerializer(Customer.class, qn,new
> BeanSerializer(Customer.class));
>  call.addDeserializerFactory(qn, Customer.class,
> BeanSerializer.getFactory());
>  Object result;
>  call.setOperationName( "zoekCustomer" );
>  call.setReturnType( new XMLType(qn) );
>  call.addParameter("shortname", XMLType.XSD_STRING,Call.PARAM_MODE_IN);
>  result = call.invoke( new Object[] {"ICL"});

This syntax seems ok. I think 'call.addSerializer' is not needed since
in this case the Customer type is only deserialized on client side.

I have got the same problem with my first tests. I always got the
same exception stack.

To solve the problem I have just replaced on the client side
xerces.jar (v1.4.4) with crimson.jar (v1.1) and jaxp.jar.

I have always the same error with a 01/17/2002 build.
I think this problem should be investigated.

Here is the call stack:

java.lang.NullPointerException
java.lang.NullPointerException
        at
org.xml.sax.helpers.AttributesImpl.getValue(AttributesImpl.java:286)
        at
org.apache.axis.encoding.DeserializationContext.getTypeFromAttributes
(DeserializationContext.java:305)
        at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:164)
        at
org.apache.axis.encoding.DeserializationContext.startElement(Deserial
izationContext.java:631)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:197)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:447)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:118)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:142)
        at org.apache.axis.client.Call.invoke(Call.java:1209)
        at org.apache.axis.client.Call.invoke(Call.java:1128)
        at org.apache.axis.client.Call.invoke(Call.java:753)
        at ClientAO.main(ClientAO.java:41)




Mime
View raw message