Hi ,
When I debug Axis2 with your scenario I found an issue in Axis2 , so I
have fixed that and committed the change , you may try with nightly
builds or wait for Axis2 1.4
Thanks
Deepal
Hi all,
i have define a new class that has an member which is an array of
KeyValuePair. Where KeyValuePair has two member of type object (key and value).
WSDL is genereated as follows:
<xs:complexType name="Hashtable">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="keyValuePairs" nillable="true"
type="ns2:KeyValuePair"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KeyValuePair">
<xs:sequence>
<xs:element minOccurs="0" name="key" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="value" nillable="true"
type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
Service class method:
public Hashtable testHashtable2() {
KeyValuePair[] keyValuePairs = new KeyValuePair[] {
new KeyValuePair("TestStringKey", "TestStringValue"),
new KeyValuePair(new Integer(1), new Integer(2)),
new KeyValuePair("StringKayForinteger", new Integer(2)),
new KeyValuePair(new Integer(1), "StringValueForInteger"),
new KeyValuePair(new Integer(1), new String("StringValueForInteger"))
};
return new Hashtable(keyValuePairs);
}
and SOAP Response:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:testHashtable2Response xmlns:ns="http://coaching.de">
<ns:return type="de.coaching.Hashtable" xmlns:ax22="http://vo.coaching.de/xsd"
xmlns:ax23="http://io.java/xsd" xmlns:ax21="http://coaching.de/xsd">
<ax21:keyValuePairs type="de.coaching.KeyValuePair">
<ax21:key>TestStringKey</ax21:key>
<ax21:value>TestStringValue</ax21:value>
</ax21:keyValuePairs>
<ax21:keyValuePairs type="de.coaching.KeyValuePair">
<ax21:key type="java.lang.Integer"/>
<ax21:value type="java.lang.Integer"/>
</ax21:keyValuePairs>
<ax21:keyValuePairs type="de.coaching.KeyValuePair">
<ax21:key>StringKayForinteger</ax21:key>
<ax21:value type="java.lang.Integer"/>
</ax21:keyValuePairs>
<ax21:keyValuePairs type="de.coaching.KeyValuePair">
<ax21:key type="java.lang.Integer"/>
<ax21:value>StringValueForInteger</ax21:value>
</ax21:keyValuePairs>
<ax21:keyValuePairs type="de.coaching.KeyValuePair">
<ax21:key type="java.lang.Integer"/>
<ax21:value>StringValueForInteger</ax21:value>
</ax21:keyValuePairs>
</ns:return>
</ns:testHashtable2Response>
</soapenv:Body>
</soapenv:Envelope>
So for String there are the values but not type and for Integer there are no
values but the type. Why is this?
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]