axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suzy Fynes" <suzanne.fy...@sentenial.ie>
Subject Adding objects as parameters
Date Wed, 02 Feb 2005 15:52:45 GMT
 
 
Hey,
 
I'm calling a service that has objects as its parameters, how do I use
it in the client? Do I enter each attribute as a string or do I create
an object of the required type? 
(this is all in axis with a java client)
 
e.g.
 
if it was just wsdl with string parameters I do the following
.
 call.addParameter("customerAccountName" , XMLType.XSD_STRING,
ParameterMode.IN);
            call.addParameter("customerAccountNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("customerEmailAddress" ,
XMLType.XSD_STRING, ParameterMode.IN);      
            call.addParameter("customerFaxNumber" , XMLType.XSD_STRING,
ParameterMode.IN);
            call.addParameter("customerHomeTelephoneNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("customerMobileNumber" ,
XMLType.XSD_STRING, ParameterMode.IN);
 
    . Object[] params = new Object[] {"Joan
McDonald","00217096","mc@yahoo.com","","0744552224","074455613"}
 
.. String valid = (String) call.invoke(params);
                                    
now if the service requires a customer object, which has the above
parameters as attributes do I create a customer object and
call.invoke(.)
 
thanks

Mime
View raw message