Thanks for the info, Venkatesh.
I have another question now. About a void.
The service method I am writing takes in a void and returns a Vector. I want to know how this is handled in the client. (I mean, what should the addParameter() and setReturnType() be, exactly?).
I read somewhere that these two calls need not be explicitly called before call.invoke() if the data types are specified. Can anyone tell me where I should do it, if not in the client?
 
I am giving my code fragment here, for ease:
 
Thanks a lot!
Sam
------
Vector retVector = new Vector();
   
   String serviceURL = http://localhost:8080/axis/services/SamService;
   
   Service  service = new Service();
   Call     call    = (Call) service.createCall();
   call.setTargetEndpointAddress( new java.net.URL(serviceURL) );
   call.setOperationName( new QName("SamService", "serviceMethod") );
// HOW SHOULD THIS BE???   
  // QName qVoid=new QName("samNS","void");
    //        call.addParameter( "arg1", qVoid, ParameterMode.IN);

   QName qVec=new QName("samNS","Vector");
   call.setReturnType( qVec );
            retVector = (Vector) call.invoke();
 
------
 
My corresponding deploy.wsdd file is
------
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="SamService" provider="java:RPC">
  <parameter name="className" value="myPackage.SamClass"/>
  <parameter name="allowedMethods" value="*"/>
  <beanMapping qname="samNS:Order" xmlns:samNS="urn:OrderService" languageSpecificType="myPackage.Order"/>
 </service>
</deployment>
/* I have another method that takes in an Order object that I have provided to the BeanSerializer, and it works fine. */
-----
Venkatesh Kancharla <[EMAIL PROTECTED]> wrote:
Create QName for Vector and set return type as that..

Add these 2 statements in the client
QName qVec=new QName("somenamespace","Vector");
call.setReturnType(qVec);

regards
-------------------
Venkatesh Kancharla
---------------------------------------------------------------------
If Necessity Is the Mother of Invention,
then frustration Is Its Father
-unknown
---------------------------------------------------------------------

On Mon, 9 Feb 2004, Sam wrote:

> Hi,
>
> I am writing a web service (in Java) that has a method returning a Vector. Can anyone let me know how this can be handled in the client?
> Specifically, how do I call the call.setReturnType() method? Also, does it matter what the Vector has? (I think it does not, but just to confirm). And do we need to do anything extra in the deploy.wsdd file for this?
>
>
> Thanks,
> Sam
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Reply via email to