This is an old one, but I've finally gotten around to playing with this, and
I was hoping I could some more details.  Currently, I am returning data
(inventory items) as a string holding an XML document I create.  A nicer
interface would be to return a typed array that the client code (C#. ick)
can handle with a minimum of fuss (I'm assuming this based on what I've read
here).  The problem I'm having is that I can't get Axis to create the WSDL;
it gets java.lang.NullPointerException.  I have attached what I've done (I
know this looks bad.  I'm still fairly green at Java, so I'm making a lot of
guesses.  I also realize that public members are anathema in OO, but I
wasn't sure how the addition of getters and setters would affect the C#
client.  Lots of guessing going on here :) The commented-out main method was
to make sure things were working like I thought they ought to.

Thanks!

-- 
Jason Lee - Programmer 
405.745.1789 
Hobby Lobby Stores, Inc. 



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 8:52 AM
To: [EMAIL PROTECTED]
Subject: RE: Solving .NET desrialization problem by simple soap arrays


best solution as far as i know is to use typed arrays. 
Axis can serialize them to XML and .NET can read them.

e.g.

    public Dashboard[] getDashboards() {
        Collection result = new ArrayList();
        result.add( new Dashboard("personal") );
        return (Dashboard[]) result.toArray();
    }

Stephan

-----Original Message-----
From: Vishal Batra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 2:11 PM
To: [EMAIL PROTECTED]
Subject: Solving .NET desrialization problem by simple soap arrays


We are exposing our Java application as a web service using AXIS on Tomcat
and trying to access it thru GUI build in .NET but are getting problems in
deserialization of Collection classes.

Would I be going in wrong direction in trying to solve this problem by
creating custom serializers/deserializers for Java Collection classes and
changing the output to SOAP Body to simple Soap arrays.

Thank you,

Vishal

Attachment: deploy.wsdd
Description: Binary data

Attachment: TypedArrayServer.java
Description: Binary data

Attachment: Item.java
Description: Binary data

Reply via email to