WSDL2 JAVA , generated code has an error when schema has "xsd:anySimpleType"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WSDL2 JAVA , generated code has an error when schema has "xsd:anySimpleType"

Jasintha Dasanayaka
 I am trying to generate java code(using wsdl2java tool) by pointing  a WSDL file. That WSDL file contains a schema import, that schema has following complex element .

-------------------------------------------------
<xsd:element name="QuerySampleResultRow" type="tns:QueryResultRowType"/>
  <xsd:complexType name="QuerySampleResultRowType">
    <xsd:annotation>
      <xsd:documentation>A Sample result.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="value" type="xsd:anySimpleType" nillable="true" maxOccurs="unbounded" >
        <xsd:annotation>
          <xsd:documentation>A value in a row. </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
-------------------------------------------------

There is a compilation error in the generate code. I came across that is due to  "xsd:anySimpleType" element , If use "xsd:string" instead of having this "xsd:anySimpleType" there are no errors in the generated codes , But unfortunately i cannot modify the schema . Can you please suggest a way to  do this without changing the schema.  


Thanks and Regards
/Jasintha

--
Thanks & Regards

Jasintha Dasanayake

mobile +94 (0)71 624 1368 ,

Reply | Threaded
Open this post in threaded view
|

Re: WSDL2 JAVA , generated code has an error when schema has "xsd:anySimpleType"

Kishanthan Thangarajah
What is the axis2 version you are using? 
This has been fixed for upcoming releases. See : https://issues.apache.org/jira/browse/AXIS2-5319


On Tue, Mar 11, 2014 at 10:13 AM, Jasintha Dasanayaka <[hidden email]> wrote:
 I am trying to generate java code(using wsdl2java tool) by pointing  a WSDL file. That WSDL file contains a schema import, that schema has following complex element .

-------------------------------------------------
<xsd:element name="QuerySampleResultRow" type="tns:QueryResultRowType"/>
  <xsd:complexType name="QuerySampleResultRowType">
    <xsd:annotation>
      <xsd:documentation>A Sample result.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="value" type="xsd:anySimpleType" nillable="true" maxOccurs="unbounded" >
        <xsd:annotation>
          <xsd:documentation>A value in a row. </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
-------------------------------------------------

There is a compilation error in the generate code. I came across that is due to  "xsd:anySimpleType" element , If use "xsd:string" instead of having this "xsd:anySimpleType" there are no errors in the generated codes , But unfortunately i cannot modify the schema . Can you please suggest a way to  do this without changing the schema.  


Thanks and Regards
/Jasintha

--
Thanks & Regards

Jasintha Dasanayake

mobile <a href="tel:%2B94%20%280%2971%20624%201368" value="+94716241368" target="_blank">+94 (0)71 624 1368 ,


Reply | Threaded
Open this post in threaded view
|

Re: WSDL2 JAVA , generated code has an error when schema has "xsd:anySimpleType"

Jasintha Dasanayaka
I am using .latest released 1.6.2 in 2012-04-17,  but i noticed this fix come with 1.6.3 but not yet release,  
But within two years no any release , does this mean  axis2 going to dead.?  or am I looking wrong info 

Thanks
/Jasintha


On Tue, Mar 11, 2014 at 11:30 AM, Kishanthan Thangarajah <[hidden email]> wrote:
What is the axis2 version you are using? 
This has been fixed for upcoming releases. See : https://issues.apache.org/jira/browse/AXIS2-5319


On Tue, Mar 11, 2014 at 10:13 AM, Jasintha Dasanayaka <[hidden email]> wrote:
 I am trying to generate java code(using wsdl2java tool) by pointing  a WSDL file. That WSDL file contains a schema import, that schema has following complex element .

-------------------------------------------------
<xsd:element name="QuerySampleResultRow" type="tns:QueryResultRowType"/>
  <xsd:complexType name="QuerySampleResultRowType">
    <xsd:annotation>
      <xsd:documentation>A Sample result.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="value" type="xsd:anySimpleType" nillable="true" maxOccurs="unbounded" >
        <xsd:annotation>
          <xsd:documentation>A value in a row. </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
-------------------------------------------------

There is a compilation error in the generate code. I came across that is due to  "xsd:anySimpleType" element , If use "xsd:string" instead of having this "xsd:anySimpleType" there are no errors in the generated codes , But unfortunately i cannot modify the schema . Can you please suggest a way to  do this without changing the schema.  


Thanks and Regards
/Jasintha

--
Thanks & Regards

Jasintha Dasanayake

mobile <a href="tel:%2B94%20%280%2971%20624%201368" value="+94716241368" target="_blank">+94 (0)71 624 1368 ,





--
Thanks & Regards

Jasintha Dasanayake
WSO2 Inc

mobile +94 (0)71 624 1368 ,