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 Rupesh Sharma <ru...@yahoo.com> on 2003/10/07 20:09:22 UTC

Collection Passing from Java to C#

Hi,
    I am having problems passing Collections from Axis Web Service written in Java to a C# client. However when I change my data structure from collection to  an Array of known Object types it goes thrugh. I will apprecite if anybody who had the same problem and resolved it can respond asap.
Thanks
Rupesh



---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Custom Serializer and Deserializer

Posted by Tony Opatha <to...@yahoo.com>.
Is it possible to use with AXIS custom serializer and de-serializer in the
handler framework?
 
E.g. will employing such serializer and de-serializer be portable/interoperable
with multiple client run-times?
 
Thanks


 
Rupesh Sharma wrote:

> Can I modify the BeanSerializer.java 
> used by Axis to do bean serialization to change the collection into an 
> array before converting it into xml.

You can write your own serializer, but it won't be portable, as you 
need a deserializer on the other side.

I just write a method called toArray() in my list class, and it 
creates this for me. It's trivial to do, less work than trying to work 
around the problem.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993



---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Re: Collection Passing from Java to C#

Posted by Rupesh Sharma <ru...@yahoo.com>.
Hi James,
              Can u send me a code snippet of what u did.
Rupesh

James Black <jb...@ieee.org> wrote:
Rupesh Sharma wrote:

> Can I modify the BeanSerializer.java 
> used by Axis to do bean serialization to change the collection into an 
> array before converting it into xml.

You can write your own serializer, but it won't be portable, as you 
need a deserializer on the other side.

I just write a method called toArray() in my list class, and it 
creates this for me. It's trivial to do, less work than trying to work 
around the problem.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993



---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: Collection Passing from Java to C#

Posted by James Black <jb...@ieee.org>.
Rupesh Sharma wrote:

>                                  Can I modify the BeanSerializer.java 
> used by Axis to do bean serialization to change the collection into an 
> array before converting it into xml.

  You can write your own serializer, but it won't be portable, as you 
need a deserializer on the other side.

  I just write a method called toArray() in my list class, and it 
creates this for me. It's trivial to do, less work than trying to work 
around the problem.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993



Re: Collection Passing from Java to C#

Posted by Rupesh Sharma <ru...@yahoo.com>.
Hello James and others,
                                 Can I modify the BeanSerializer.java used by Axis to do bean serialization to change the collection into an array before converting it into xml.
Rupesh

James Black <jb...@ieee.org> wrote:
Rupesh Sharma wrote:

> I am having problems passing Collections from Axis Web Service 
> written in Java to a C# client. However when I change my data 
> structure from collection to an Array of known Object types it goes 
> thrugh. I will apprecite if anybody who had the same problem and 
> resolved it can respond asap.

I find it easier to just pass the collection as an array of javabeans. 
This makes sense since the client can figure out the best way to use the 
results (for example to put it into a TreeView).

AFAIK there is no good way to pass a Collection object to C# from Java.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993



---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Re: Collection Passing from Java to C#

Posted by James Black <jb...@ieee.org>.
Rupesh Sharma wrote:

>     I am having problems passing Collections from Axis Web Service 
> written in Java to a C# client. However when I change my data 
> structure from collection to  an Array of known Object types it goes 
> thrugh. I will apprecite if anybody who had the same problem and 
> resolved it can respond asap.

  I find it easier to just pass the collection as an array of javabeans. 
This makes sense since the client can figure out the best way to use the 
results (for example to put it into a TreeView).

  AFAIK there is no good way to pass a Collection object to C# from Java.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993