Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » SOAP generated for Vector
SOAP generated for Vector [message #171534] Fri, 16 June 2006 17:15 Go to next message
Eclipse UserFriend
Originally posted by: yitzchok.rentmagic.ca

Hi.
I'm returning a vector and getting the following SOAP:
------------------------------------------------------------
<soapenv:Body>
<lookUpResponse xmlns="http://ksoap2">
<lookUpReturn>
<contactItem>
<age>0</age>
<birthdate/>
<firstName/>
<lastName/>
<phone1/>
<salary>0</salary>
</contactItem>
<message/>
<vector xmlns:ns1="http://ksoap2" xsi:type="ns1:ContactItem">
<ns1:age>16</ns1:age>
<ns1:birthdate>1999-23-05</ns1:birthdate>
<ns1:firstName>Joe</ns1:firstName>
<ns1:lastName>Doe</ns1:lastName>
<ns1:phone1/>
<ns1:salary>1000</ns1:salary>
</vector>
<vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
<ns2:age>16</ns2:age>
<ns2:birthdate>1999-23-05</ns2:birthdate>
<ns2:firstName>Joe</ns2:firstName>
<ns2:lastName>Doe</ns2:lastName>
<ns2:phone1/>
<ns2:salary>1000</ns2:salary>
</vector>
</lookUpReturn>
</lookUpResponse>
</soapenv:Body>
------------------------------------------------------------
The vector itself looks like:

<vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
</vector>
<vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
</vector>

The complete vector is not wrapped in its own tag, i.e.

<Vector>
<vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
</vector>
<vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
</vector>
</Vector>

Is there a way to have the vector be wrapped in one tag?
Re: SOAP generated for Vector [message #171822 is a reply to message #171534] Wed, 21 June 2006 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Isaac,
assuming your deploying against Apache Axis 1.x, your best bet is to
post this question to the Apache Axis mailing list [1].

That said, Axis allows you to customize the serialization rules,
however, there are two issues to be aware of. First, changing the
serialization for Java Vector may break interoperability with other
as-is Axis components. Second, vectors and Java collections in general
are an interoperability hazard because they get mapped to WSDL messages
using types that are not formally defined in any schema.

Cheers - CB.

[1] http://ws.apache.org/axis/mail.html

Isaac Good wrote:

> Hi.
> I'm returning a vector and getting the following SOAP:
> ------------------------------------------------------------
> <soapenv:Body>
> <lookUpResponse xmlns="http://ksoap2">
> <lookUpReturn>
> <contactItem>
> <age>0</age>
> <birthdate/>
> <firstName/>
> <lastName/>
> <phone1/>
> <salary>0</salary>
> </contactItem>
> <message/>
> <vector xmlns:ns1="http://ksoap2" xsi:type="ns1:ContactItem">
> <ns1:age>16</ns1:age>
> <ns1:birthdate>1999-23-05</ns1:birthdate>
> <ns1:firstName>Joe</ns1:firstName>
> <ns1:lastName>Doe</ns1:lastName>
> <ns1:phone1/>
> <ns1:salary>1000</ns1:salary>
> </vector>
> <vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
> <ns2:age>16</ns2:age>
> <ns2:birthdate>1999-23-05</ns2:birthdate>
> <ns2:firstName>Joe</ns2:firstName>
> <ns2:lastName>Doe</ns2:lastName>
> <ns2:phone1/>
> <ns2:salary>1000</ns2:salary>
> </vector>
> </lookUpReturn>
> </lookUpResponse>
> </soapenv:Body>
> ------------------------------------------------------------
> The vector itself looks like:
>
> <vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
> </vector>
> <vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
> </vector>
>
> The complete vector is not wrapped in its own tag, i.e.
>
> <Vector>
> <vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
> </vector>
> <vector xmlns:ns2="http://ksoap2" xsi:type="ns2:ContactItem">
> </vector>
> </Vector>
>
> Is there a way to have the vector be wrapped in one tag?
Re: SOAP generated for Vector [message #172287 is a reply to message #171822] Fri, 23 June 2006 12:58 Go to previous message
Eclipse UserFriend
Originally posted by: yitzchok.rentmagic.ca

Can I get details on how I would customize the Axis serialization rules?
Previous Topic:Formatting SOAP structure of Arrays
Next Topic:Problem saving: "Character encoding not supported by this platform"
Goto Forum:
  


Current Time: Tue Jul 01 11:00:56 EDT 2025

Powered by FUDForum. Page generated in 1.52658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top