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 Doug McMaster <dm...@vbi.vt.edu> on 2002/06/28 19:56:59 UTC

client command line args and text file passing

Hi all,

I'm still a web services newbie, so hopefully someone can help me out.  I'm 
able to communicate between web service and client using basic types (ints, 
strings, etc.), but I'm not sure how to handle the following:

1.  When I invoke my client app how do I send the command line arguments 
array "args[]" to my deployed service?  I would like to be able to keep it 
varying length (ie. one time I run my client I have 3 args the next time 7).

2.  How do I send a text file from my client app to my service?

and 3.  How can I return a text file to my client from my service?

Thanks

Doug McMaster


Re: client command line args and text file passing

Posted by Rogerio Saran <rs...@organox.com.br>.

Doug McMaster wrote:
> Hi all,
> 
> I'm still a web services newbie, so hopefully someone can help me out.  
> I'm able to communicate between web service and client using basic types 
> (ints, strings, etc.), but I'm not sure how to handle the following:
> 
> 1.  When I invoke my client app how do I send the command line arguments 
> array "args[]" to my deployed service?  I would like to be able to keep 
> it varying length (ie. one time I run my client I have 3 args the next 
> time 7).
> 
> 2.  How do I send a text file from my client app to my service?
Use a SOAP attachment.

Take a look at the sample code in the folder samples/attachments/ (axis 
distribution.)

> 
> and 3.  How can I return a text file to my client from my service?
Same as above.

> 
> Thanks
> 
> Doug McMaster
> 
> 



Re: client command line args and text file passing

Posted by Andrew Vardeman <an...@iastate.edu>.
At 01:56 PM 6/28/2002 -0400, you wrote:
>Hi all,
>
>I'm still a web services newbie, so hopefully someone can help me 
>out.  I'm able to communicate between web service and client using basic 
>types (ints, strings, etc.), but I'm not sure how to handle the following:
>
>1.  When I invoke my client app how do I send the command line arguments 
>array "args[]" to my deployed service?  I would like to be able to keep it 
>varying length (ie. one time I run my client I have 3 args the next time 7).

write a service that expects a java.util.Vector and convert your array to a 
Vector before sending it
(if you plan to interop with .NET, this may be a bad idea since people have 
reported problems with .NET's deserialization of whatever it is that a 
Vector gets serialized to)

>2.  How do I send a text file from my client app to my service?

Base64 encode it and pass it as a string

>and 3.  How can I return a text file to my client from my service?

see above

Andrew