You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Lindsey Hess <li...@yahoo.com> on 2007/01/27 00:25:00 UTC

Axis 1.4 DII & Complex Types...

Hello,
   
  I have a WSDL that expects two parameters for specific operation's request, namely, studentID and studentType.  studentID is an integer, and studentType is a complex type   (one of the many parameters within it is another complex type as well).  
   
  I can't seem to find any documentation on how to dynamically invoke a service that takes a parameter that is a complex type.  My code is as follows (the question marks show where I'm completely puzzled):
   
  // StudentType class was generated by WSDL2java.  StudentType is a complex type 
  StudentType studentType = new StudentType();
  
   
  // Add parameters
  callStudent.addParameter("studentID", XMLType.SOAP_INT, ParameterMode.IN);
  callStudent.addParameter("studentType", ?????, ParameterMode.IN);
   
  // Create an array of parameters
  Object[] opParamsStudent = {studentID, ??????};
   
  // Invoke the service
  callStudent.invoke(opParamsStudent);
   
   
  Can someone please assist me?
   
  Thank you.
   
  Lindsey
  lindseyhess83@yahoo.com

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

Re: Axis 1.4 DII & Complex Types..

Posted by Anne Thomas Manes <at...@gmail.com>.
Your WSDL specifies the XML type definition of studentType. In your
code, you must define a qname for that type and then specify that
qname as the type in the addParameter method.

Anne

On 1/26/07, Lindsey Hess <li...@yahoo.com> wrote:
> Hello,
>
> I have a WSDL that expects two parameters for specific operation's request,
> namely, studentID and studentType.  studentID is an integer, and studentType
> is a complex type   (one of the many parameters within it is another complex
> type as well).
>
> I can't seem to find any documentation on how to dynamically invoke a
> service that takes a parameter that is a complex type.  My code is as
> follows (the question marks show where I'm completely puzzled):
>
> // StudentType class was generated by WSDL2java.  StudentType is a complex
> type
> StudentType studentType = new StudentType();
>
>
> // Add parameters
> callStudent.addParameter("studentID", XMLType.SOAP_INT, ParameterMode.IN);
> callStudent.addParameter("studentType", ?????, ParameterMode.IN);
>
> // Create an array of parameters
> Object[] opParamsStudent = {studentID, ??????};
>
> // Invoke the service
> callStudent.invoke(opParamsStudent);
>
>
> Can someone please assist me?
>
> Thank you.
>
> Lindsey
> lindseyhess83@yahoo.com
>
>  ________________________________
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org