Webservice returning Vector containing objects

Hi,

I’m creating a webservice (in Java) to read/update a persons calendar from a java app. I’m consuming the webservice with axis1.2.

All is going well until the point I’m trying to retrieve a list of entries (returns a java.util.Vector).

A simple testfunction

–>public java.util.Vector vectorTest()

returns a vector like this

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>

soapenv:Body

  <vectorTestReturn xmlns="urn:DefaultNamespace">

     <item xmlns="">

        <id>2E473B04C49D9980C12574CD004BE5AA</id>

        <startDateTime>0108-09-02T15:00:00.271Z</startDateTime>

        <endDateTime>0108-09-02T15:30:00.271Z</endDateTime>

        <title>Updated title</title>

        <location>testLocation</location>

     </item>

     <item xmlns="">

        <id>2E473B04C49D9980C12574CD004BE5AA</id>

        <startDateTime>0108-09-02T15:00:00.271Z</startDateTime>

        <endDateTime>0108-09-02T15:30:00.271Z</endDateTime>

        <title>Updated title</title>

        <location>testLocation</location>

     </item>

  </vectorTestReturn>

</soapenv:Body>

</soapenv:Envelope>

Note: ---->item xmlns=“”<---- empty namespace!!

When consuming the service, this results in:

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

Is returning a vector unsupported in this version? Or is is just unsupported if the vector contains custom classes? Or am I just doing something wrong?

If needed, I’ll post the WSDL…

Any light on this would be very nice…

Thanks in advance…

Subject: Domino 8.0.1 web services

Ken, Does your Web Service design note point to class that has more than one public service operation? If so, I have had unpredictable behavior with the Domino 8.0.1 as the web service provider - any time I add a second service operation to the web service design note, only one service operation works, and they all appear to map to the same function implementation. If I copy and paste the smae code to a Domino 7.0.3 server it works fine.

You should be able to add a Namespace to your Java based Domino web service wsdl by defining a package name in you code.

I have returned Vectors of strings, which worked. I have not tried Vectors of custom objects.

Regards,

Stephen

Subject: Yes it does…

But that doesn’t seem to be causing any problems.

I am also able to return a Vector of Strings but that’s not good enough.

Also tried returning an array containing Strings or custom Classes, but that always returns a ClassCastException in Xsd_StringArray in axis…

I’m thinking about creating a ListOfCalendarEntries class right now and have that returned…

If there is an easier way, please let me know!