axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <>
Subject Re: INOUT parameter with user-defined class ?
Date Fri, 18 Jan 2002 16:16:10 GMT
Look at the operation in rpc-style pseudo-code:

Customer zoekCustomer(IN String shortname, INOUT Customer customer);

Is this really what you want?  Is this method supposed to have both a
returned Customer AND an inout Customer?  I suspect you really want

void zoekCustomer(IN String shortname, INOUT Customer customer);

If this is true, then you don't want to call setReturnType (or you call it
with a null).

If I guessed wrong and you really do want the return, then could you
provide the NullPointerException stack trace?

Russell Butek

Beukering Jack <> on 01/18/2002 08:43:17 AM

Please respond to

To:   "Axis-User (E-mail)" <>
Subject:  INOUT parameter with user-defined class ?

I'm trying to serialize a self-made class with the beanserializer. As an
input parameter it function's fine, but used for the return type or as an
INOUT type I get a nullpointer exception. Can anyone please help me, what
I doing wrong?

My service has the following signature:
    public Customer zoekCustomer ( Customer c) throws Exception {

This is what I do in the client using an INOUT parameter:

        Customer c = new Customer();
        Service  service = new Service();
        Call     call    = (Call) service.createCall();
        QName    qn      = new QName( "urn:Willow", "customer" );
        call.addSerializer(Customer.class, qn,new
        call.addDeserializerFactory(qn, Customer.class,
        Object result;
        try {
            call.setTargetEndpointAddress(  new
URL("http://localhost:4040/axis/services/willow-service") );
            call.setProperty( Call.NAMESPACE, "willow-service" );
            call.setOperationName( "zoekCustomer" );
            call.setReturnType( new XMLType(qn) );

            result = call.invoke( new Object[] {c});

> * Email:
> * Tel:          +31(0)346 598477
> * Mobile:    +31(0)6 53492931
> * Fax:         +31(0)346 598

View raw message