You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Remy Blaettler <re...@gmx.ch> on 2001/05/07 20:42:56 UTC

Value per reference via Soap and Java

Hello
I have a MS Soap Server and a Java client.
I have a lot of functions which have per reference parameters, but I
couldn't figure out who to receive them in my Java client. I can just
receive the normal return value from the function.
Unfortunately I don't see any changes on the parameters and the server 
runs correct, because I see the changes in a VB Client.

       Vector params = new Vector ();
        Double myDouble = new Double(111);
        Parameter numberOne = new Parameter("NumberOne", 
                                            double.class,
                                            myDouble, null);
        params.addElement (numberOne);
        call.setParams (params);


        Response resp;
        resp = call.invoke
(url,"http://tempuri.org/action/EveryConnectServer.Logout");

        Parameter result = resp.getReturnValue ();
        System.out.println (result.getValue ());
        System.out.println( numberOne.getValue() ); // HERE IS STILL 111

Is there something wrong?

Remy



Re: Value per reference via Soap and Java

Posted by Scott Nichol <sn...@computer.org>.
You must get the output parameters by calling resp.getParams().  Your inout parameters are not automatically updated.

Scott

----- Original Message ----- 
From: "Remy Blaettler" <re...@gmx.ch>
To: <so...@xml.apache.org>
Sent: Monday, May 07, 2001 2:42 PM
Subject: Value per reference via Soap and Java


> Hello
> I have a MS Soap Server and a Java client.
> I have a lot of functions which have per reference parameters, but I
> couldn't figure out who to receive them in my Java client. I can just
> receive the normal return value from the function.
> Unfortunately I don't see any changes on the parameters and the server 
> runs correct, because I see the changes in a VB Client.
> 
>        Vector params = new Vector ();
>         Double myDouble = new Double(111);
>         Parameter numberOne = new Parameter("NumberOne", 
>                                             double.class,
>                                             myDouble, null);
>         params.addElement (numberOne);
>         call.setParams (params);
> 
> 
>         Response resp;
>         resp = call.invoke
> (url,"http://tempuri.org/action/EveryConnectServer.Logout");
> 
>         Parameter result = resp.getReturnValue ();
>         System.out.println (result.getValue ());
>         System.out.println( numberOne.getValue() ); // HERE IS STILL 111
> 
> Is there something wrong?
> 
> Remy
> 
> 
>