[ 
https://issues.apache.org/jira/browse/AXIS2-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ravi sekhar mikkilineni resolved AXIS2-4532.
--------------------------------------------

    Resolution: Fixed

the issue got resolved ..

java2wsdl generates anyType type "<xsd:anyType>."  Instead of specific  object 
type like List, Set, and Map because there is no xsd:linkedList. , no 
xsd:hashMap, no xsd:treeSet, no xsd:vector and no xsd:stack 

They're not part of XML Schema, and thus can't be used by WSDL. They're also 
not cross-platform compatible, which is a major point of WS. Use arrays instead 
of collections.

Solution:
                Use arrays instead of collections.

                Below is the approach I followed to support HashMap.
                <xs:complexType name="ArrayOfKeyValues">
                   <xs:sequence>
                     <xs:element maxOccurs="unbounded" minOccurs="0" 
name="keyValue" nillable="true" type="ax215:KeyValue" /> 
                </xs:sequence>
</xs:complexType>
<xs:complexType name="KeyValue">
                 <xs:sequence>
                      <xs:element minOccurs="0" name="key" nillable="true" 
type="xs:string" /> 
                     <xs:element minOccurs="0" name="value" nillable="true" 
type="xs:string" /> 
  </xs:sequence>
</xs:complexType>


it is working now !!!

> How to get rid of anyType (I want to convert to HashMap)
> --------------------------------------------------------
>
>                 Key: AXIS2-4532
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4532
>             Project: Axis2
>          Issue Type: Improvement
>         Environment: Unix
>            Reporter: ravi sekhar mikkilineni
>
> Hi,
> I am using the latest version axis2.1.5 and following code first approach.
> I am having HashMap (orderStatusMap) a class and  when I generated java2wsdl 
> it gives me the following in wsdl
> - <xs:complexType name="OrderSubmissionMap">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="orderStatusMap" nillable="true" 
> type="xs:anyType" /> 
>   </xs:sequence>
>   </xs:complexType>
> I deployed the service and while invoking from the clientt I am getting the 
> following exception
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Can 
> not invoke the getTypeObject method in the extension mapper class 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to