Still not getting what I need, but I did find a way around it. Not
sure if I've done something wrong or incomplete with the AXIS classes,
or if that's just the way the webservice works.

The webservice I'm calling has these input and output parts...

<message name="Utils.GetSubaccounts">
<part name="ResellerUsername" type="xsd:string"/>
<part name="ResellerPassword" type="xsd:string"/>
<part name="accountList" type="xsd:string"/>
</message>
<message name="Utils.GetSubaccountsResponse">
<part name="Result" type="xsd:short"/>
<part name="accountList" type="xsd:string"/>
</message>

With "accountList" listed in the input message and the output message,
I take that to be an INOUT parameter, correct?

But when I call this code, I don't get an updated value for that third
paramter...

Object result = call.invoke( new Object[] { user, pass, domains } );
                
System.out.println( "result = " + ((Short)result).shortValue() );
System.out.println( "domains = " + domains );     // <--- not updated


However, if I walk through the output values, I do get to the
"accountList" value...

List outs = call.getOutputValues();
for( int i = 0; i < outs.size(); i++ )
{
        String foo = (String)outs.get( i );
        System.out.println( "val = " + foo );     // <--- value does appear 
here!
}


When I view the message.getSOAPPartAsString() (by calling
call.getResponseMessage()), I see the XML includes the <Response>
stanza and the <accountList> stanza.

So, is this the way I'm supposed to get the INOUT parameter? Or is
there another technique to get the value passed on the invoke() method
updated?

Thanks for the help.





I could use some help with an AXIS 1.3 client class.

The web service I am using appears to use an INOUT parameter (the same
parameter [part] listed in the input message and the output message).

In setting up a simple AXIS client class in java, I am successfully
getting to the web service, but I am not getting that INOUT parameter
updated. Using ethereal I can see the whole HTTP response that does
include the full text I expect to see in the "domains" String below.

The parameter is a String. I have tried using a StringHolder, but get
the "no serializer" exception message.

I'm not sure where to go from here.


---


package jayz.net;

import java.util.Map;

import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.holders.StringHolder;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;


public class WebmailWebserviceClient
{

        /**
         * @param args
         */
        public static void main( String[] args )
        {

                try
                {
                        String user = "[somestring]";
                        String pass = "[someotherstring]";
                        String domains = "";
                        
                        String url = 
"http://admin.webmail.us/excedentsoap/excedentsoap.wsdl";;
                        String method = "GetSubaccounts";
                        
                        QName servQN = new QName(
"http://admin.excedent.com/excedentsoap/wsdl/";, "excedentsoap" );
                        QName portQN = new QName(
"http://admin.excedent.com/excedentsoap/wsdl/";, "UtilsSoapPort" );
                        
                        Service service = new Service( new java.net.URL( url ), 
servQN );

                        Call call = (Call)service.createCall( portQN, method );
        
                        
                        Object result = call.invoke( new Object[] { user, pass, 
domains } );
                        
                        System.out.println( "result = " + 
((Short)result).shortValue() );
                        System.out.println( "domains = " + domains );

                        
                        

                }
                catch( Exception e )
                {
                        System.out.println( "Zoiks! " + e.toString() );
                }

                
                
        }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to