You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Eric Webster (JIRA)" <ax...@ws.apache.org> on 2006/01/27 21:42:42 UTC

[jira] Created: (AXIS-2386) Java2WSDL changes type double array into a single double.

Java2WSDL changes type double array into a single double.
---------------------------------------------------------

         Key: AXIS-2386
         URL: http://issues.apache.org/jira/browse/AXIS-2386
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2.1, 1.3    
 Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
    Reporter: Eric Webster
    Priority: Minor


Java2WSDL changes type double array into a single double.

This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.

Currently to fix this I just manually edit the generated WSDL file and distrobute that.


The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 

Here is the original WSDL file.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
    targetNamespace="dataset.odin.cirg.washington.edu" 
    xmlns:apachesoap="http://xml.apache.org/xml-soap" 
    xmlns:impl="dataset.odin.cirg.washington.edu" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      
      <complexType name="ArrayOf_xsd_double">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
	  </restriction>
	</complexContent>
      </complexType>
      <complexType name="ArrayOf_xsd_string">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
	  </restriction>
	</complexContent>
      </complexType>
      
      <simpleType name="TypeEnum">
	<restriction base="xsd:string">
	  <enumeration value="count"/>
	  <enumeration value="flag"/>
	  <enumeration value="score"/>
	  <enumeration value="blank"/>
	  <enumeration value="error"/>
	  <enumeration value="other"/>
	  <enumeration value="unknown"/>
	</restriction>
      </simpleType>

      <simpleType name="IntervalUnitEnum">
	<restriction base="xsd:string">
	  <enumeration value="second"/>
	  <enumeration value="week"/>
	  <enumeration value="month"/>
	  <enumeration value="year"/>
	</restriction>
      </simpleType>

      <complexType name="Attribute">
	<sequence>
	  <element name="name" type="xsd:string"/>
	  <element name="value" type="xsd:string" nillable="true"/>
	</sequence>
      </complexType>
      <complexType name="ArrayOf_impl_Attribute">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
	  </restriction>
	</complexContent>
      </complexType>

      <complexType name="ValueVector">
	<sequence>
	  <element name="name" type="xsd:string" nillable="true"/>
	  <element name="type" type="impl:TypeEnum"/>
	  <element name="date" type="xsd:string"/>
	  <element name="interval" type="xsd:int"/>
	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
	</sequence>
      </complexType>
      <complexType name="ArrayOf_impl_ValueVector">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
	  </restriction>
	</complexContent>
      </complexType>

      <complexType name="DataSet">
	<sequence>
	  <element name="name" type="xsd:string" nillable="true"/>
	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
	</sequence>
      </complexType>
      <complexType name="ArrayOf_impl_DataSet">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
	  </restriction>
	</complexContent>
      </complexType>
      <complexType name="DataSetArray">
	<sequence>
	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
	</sequence>
      </complexType>

      <complexType name="SurvCol">
	<sequence>
	  <element name="name" type="xsd:string"/>
	  <element name="values" type="impl:ArrayOf_xsd_string"/>
	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
	</sequence>
      </complexType>
      <complexType name="ArrayOf_impl_SurvCol">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
	  </restriction>
	</complexContent>
      </complexType>

      <complexType name="SurvDataSet">
	<sequence>
	  <element name="name" type="xsd:string" nillable="true"/>
	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
	</sequence>
      </complexType>
      <complexType name="ArrayOf_impl_SurvDataSet">
	<complexContent>
	  <restriction base="soapenc:Array">
	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
	  </restriction>
	</complexContent>
      </complexType>
      <complexType name="SurvDataSetArray">
	<sequence>
	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
	</sequence>
      </complexType>

    </schema>
  </wsdl:types>
</wsdl:definitions>


Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.

   <complexType name="ValueVector">
    <sequence>
     <element name="name" nillable="true" type="xsd:string"/>
     <element name="type" type="tns2:TypeEnum"/>
     <element name="date" type="xsd:string"/>
     <element name="interval" type="xsd:int"/>
     <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
     <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
     <element name="values" nillable="true" type="xsd:double"/>
    </sequence>
   </complexType>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (AXIS-2386) Java2WSDL changes type double arrayinto a single double.

Posted by Wes Munsil <mu...@alumni.caltech.edu>.
Yes, and AXIS-1405 appears similar, if not identical, to the problem I
reported earlier today. AXIS-1405, if I am reading things correctly, is a
critical open bug, unassigned since June 21, 2004.

Eric Webster (JIRA) said:
>     [
> http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12364268
> ]
>
> Eric Webster commented on AXIS-2386:
> ------------------------------------
>
> This is similar but different then bug AXIS-1405
> https://issues.apache.org/jira/browse/AXIS-1405
>
>> Java2WSDL changes type double array into a single double.
>> ---------------------------------------------------------
>>
>>          Key: AXIS-2386
>>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>>      Project: Apache Axis
>>         Type: Bug
>>   Components: WSDL processing
>>     Versions: 1.2.1, 1.3
>>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>>     Reporter: Eric Webster
>>     Priority: Minor
>>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>>
>> Java2WSDL changes type double array into a single double.
>> This happens when you run Java2WSDL manually on the command line or when
>> a wsdl file is generated from a service_name?wsdl url.
>> Currently to fix this I just manually edit the generated WSDL file and
>> distrobute that.
>> The Java code originally came from a hand made WSDL file. WSDL2Java was
>> used to generate the Java code. The section that is affected by this
>> problem is the 'ValueVector' complexType which contains and element
>> 'values' which is an array of doubles. After converting to Java and then
>> back to WSDL 'values' becomes a single double.
>> Here is the original WSDL file.
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions
>>     targetNamespace="dataset.odin.cirg.washington.edu"
>>     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>>     xmlns:impl="dataset.odin.cirg.washington.edu"
>>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>   <wsdl:types>
>>     <schema targetNamespace="dataset.odin.cirg.washington.edu"
>> xmlns="http://www.w3.org/2001/XMLSchema">
>>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>>
>>       <complexType name="ArrayOf_xsd_double">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="ArrayOf_xsd_string">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>
>>       <simpleType name="TypeEnum">
>> 	<restriction base="xsd:string">
>> 	  <enumeration value="count"/>
>> 	  <enumeration value="flag"/>
>> 	  <enumeration value="score"/>
>> 	  <enumeration value="blank"/>
>> 	  <enumeration value="error"/>
>> 	  <enumeration value="other"/>
>> 	  <enumeration value="unknown"/>
>> 	</restriction>
>>       </simpleType>
>>       <simpleType name="IntervalUnitEnum">
>> 	<restriction base="xsd:string">
>> 	  <enumeration value="second"/>
>> 	  <enumeration value="week"/>
>> 	  <enumeration value="month"/>
>> 	  <enumeration value="year"/>
>> 	</restriction>
>>       </simpleType>
>>       <complexType name="Attribute">
>> 	<sequence>
>> 	  <element name="name" type="xsd:string"/>
>> 	  <element name="value" type="xsd:string" nillable="true"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="ArrayOf_impl_Attribute">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType"
>> wsdl:arrayType="impl:Attribute[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="ValueVector">
>> 	<sequence>
>> 	  <element name="name" type="xsd:string" nillable="true"/>
>> 	  <element name="type" type="impl:TypeEnum"/>
>> 	  <element name="date" type="xsd:string"/>
>> 	  <element name="interval" type="xsd:int"/>
>> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
>> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute"
>> nillable="true"/>
>> 	  <element name="values" type="impl:ArrayOf_xsd_double"
>> nillable="true"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="ArrayOf_impl_ValueVector">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType"
>> wsdl:arrayType="impl:ValueVector[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="DataSet">
>> 	<sequence>
>> 	  <element name="name" type="xsd:string" nillable="true"/>
>> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute"
>> nillable="true"/>
>> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="ArrayOf_impl_DataSet">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType"
>> wsdl:arrayType="impl:DataSet[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="DataSetArray">
>> 	<sequence>
>> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="SurvCol">
>> 	<sequence>
>> 	  <element name="name" type="xsd:string"/>
>> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
>> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute"
>> nillable="true"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="ArrayOf_impl_SurvCol">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType"
>> wsdl:arrayType="impl:SurvCol[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="SurvDataSet">
>> 	<sequence>
>> 	  <element name="name" type="xsd:string" nillable="true"/>
>> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute"
>> nillable="true"/>
>> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
>> 	</sequence>
>>       </complexType>
>>       <complexType name="ArrayOf_impl_SurvDataSet">
>> 	<complexContent>
>> 	  <restriction base="soapenc:Array">
>> 	    <attribute ref="soapenc:arrayType"
>> wsdl:arrayType="impl:SurvDataSet[]"/>
>> 	  </restriction>
>> 	</complexContent>
>>       </complexType>
>>       <complexType name="SurvDataSetArray">
>> 	<sequence>
>> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
>> 	</sequence>
>>       </complexType>
>>     </schema>
>>   </wsdl:types>
>> </wsdl:definitions>
>> Here is what 'ValueVector' turns into after running WSDL2Java (which
>> creates correct java code) and then Java2WSDL.
>>    <complexType name="ValueVector">
>>     <sequence>
>>      <element name="name" nillable="true" type="xsd:string"/>
>>      <element name="type" type="tns2:TypeEnum"/>
>>      <element name="date" type="xsd:string"/>
>>      <element name="interval" type="xsd:int"/>
>>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>>      <element name="attributes" nillable="true"
>> type="impl:ArrayOf_tns1_Attribute"/>
>>      <element name="values" nillable="true" type="xsd:double"/>
>>     </sequence>
>>    </complexType>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lord Halbert updated AXIS-2386:
-------------------------------

    Affects Version/s: 1.4
                       1.2

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lord Halbert updated AXIS-2386:
-------------------------------

    Priority: Blocker  (was: Minor)

THIS NEEDS TO BE FIXED ASAP !!!


> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Christine Chen (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12423906 ] 
            
Christine Chen commented on AXIS-2386:
--------------------------------------

This problem started to manifest after I switched the style (-y) from RPC to WRAPPED when running java2wsdl (Axis 1.4) against my Interface/Impl classes.  My tester classes contain a single method with 2 INOUT params of Holder types:

public void listContexts( ArrayOfStringHolder Contexts, ArrayOfDummyHolder Dummys);

The wsdl generated has the correct complex type definition for ArrayOfDummy, but instead of providing a definition for ArrayOfString, it just has string.

After debugging a bit, the problem seems to be with axis.description.JavaServiceDesc::getTypeQName(), the javaClass being passed in is "[Ljava.lang.String".  Because I used WRAPPED style, it will go to:

            typeQName = tm.getTypeQNameExact(javaClass); 

            if (typeQName == null && javaClass.isArray()) {
                typeQName = tm.getTypeQName(javaClass.getComponentType());
            } 

The first line returns null because "[Ljava.lang.String" is not in the typemappings (which I think do not contain any array types).  Realising the class is an array type,  it will try to look up the QName for the component type. which is string.  Thus getTypeQName() returns 'string' as the QName for my ArrayOfStringHolder type.

In the RPC style case, it will just call the following and return null.
if (style == Style.RPC) {
            typeQName = tm.getTypeQName(javaClass);
        }

Looks to me a paramDesc with null QName will prompt java2wsdl to generate a complex type as expected.

For my case, perhaps the fix can be put in axis.description.JavaServiceDesc::createOperationForMethod():
 Class heldClass = JavaUtils.getHolderValueType(type);
		System.out.println("heldClass: " + heldClass.getName());
                if (heldClass != null) {
                    paramDesc.setMode(ParameterDesc.INOUT);
                   QName qname = getTypeQName(heldClass); ....

if the class was a Holder type, call some overloaded class of getTypeQName() that does not look up the QName for the array's component type.

For now, I'm thinking of wrapping String inside a class, say MyString, and declare a holder with MyString[] to work around the problem until the bug is fixed. 

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: http://issues.apache.org/jira/browse/AXIS-2386
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Minor
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513752 ] 

Lord Halbert edited comment on AXIS-2386 at 7/18/07 4:35 PM:
-------------------------------------------------------------

One way to fix it is by changing the following class:

org.apache.axis.wsdl.toJava.JavaBeanHelperWriter

You'll see at line 329 (Apache Axis 1.4 source):

                    // Some special handling for arrays.
                    TypeEntry elemType = elem.getType();
                    QName xmlType = null;

                    if ((elemType.getDimensions().length() > 1)
                            && (elemType.getClass() == DefinedType.class)) {

                        // If we have a DefinedType with dimensions, it must
                        // be a SOAP array derived type.  In this case, use
                        // the refType's QName for the metadata.
                                                
                        // I COMMENTED OUT THIS LINE TO FIX THE ISSUE
                        // elemType = elemType.getRefType();


I commented out the line at the end.

That seems to have fixed the issue but it's unclear what other problems this "hack" of mine created.

Don't worry, I did not commit any changes :)

The author(s) obviously created that code for a reason even though it created a problem.

Thanks for the quick reply Glen Daniels. I'll try out your changes you made to see if it works.






 was:
One way to fix it is by changing the following class:

org.apache.axis.wsdl.toJava.JavaBeanHelperWriter

You'll see at line 329 (Apache Axis 1.4 source):

                    // Some special handling for arrays.
                    TypeEntry elemType = elem.getType();
                    QName xmlType = null;

                    if ((elemType.getDimensions().length() > 1)
                            && (elemType.getClass() == DefinedType.class)) {

                        // If we have a DefinedType with dimensions, it must
                        // be a SOAP array derived type.  In this case, use
                        // the refType's QName for the metadata.
                                                
                        // I COMMENTED OUT THIS LINE TO FIX THE ISSUE
                        // elemType = elemType.getRefType();


I commented out the line at the end.

That seems to have fixed the issue but it's unclear what other problems this "hack" of mine created.

Don't worry, I did not commit any changes :)

The author(s) obviously created that code for a reason even though it created a problem.

Thanks for the quick reply (the previous poster) and I'll try out your changes you made to see if it works.





> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Eric Webster (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12364268 ] 

Eric Webster commented on AXIS-2386:
------------------------------------

This is similar but different then bug AXIS-1405 https://issues.apache.org/jira/browse/AXIS-1405

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Keith Mashinter (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12428219 ] 
            
Keith Mashinter commented on AXIS-2386:
---------------------------------------

I've commented out code from JavaBeanHelperWriter and retested and the change below seems to fix the problem for arrayType declarations.  The problem was that an element with Dimensions (e.g. long[] has Dimensions "[]") was handled by throwing away the arrayType and just using the inner refType.

	// if (elemType.getDimensions().length () > 1) { System.out.println(this +": elemType " + elemType ); }
	// 
	// 2006-08-15 kmashint@yahoo.com removed special check for getDimensions() since it corrupted the output.
	//if ((elemType.getDimensions().length() > 1)
	//    && (elemType.getClass() == DefinedType.class)) {
	// If we have a DefinedType with dimensions, it must
	// be a SOAP array derived type.  In this case, use
	// the refType's QName for the metadata.
	//elemType = elemType.getRefType(); 
	//} else


> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: http://issues.apache.org/jira/browse/AXIS-2386
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Minor
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514020 ] 

Lord Halbert edited comment on AXIS-2386 at 7/19/07 3:07 PM:
-------------------------------------------------------------

Ok, it's me again.

Here's a WSDL you can try to test this bug:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:test.company.com" xmlns:intf="urn:test.company.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test.company.com">
	<wsdl:types>
		<schema targetNamespace="urn:test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="ArrayOf_xsd_int">
				<complexContent>
					<restriction base="soapenc:Array">
						<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
					</restriction>
				</complexContent>
			</complexType>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>
	</wsdl:types>
	<wsdl:message name="doSomethingRequest">
		<wsdl:part name="testParams" type="impl:TestParams"/>
	</wsdl:message>
	<wsdl:message name="doSomethingResponse">
		<wsdl:part name="doSomethingReturn" type="xsd:int"/>
	</wsdl:message>
	<wsdl:portType name="TestService">
		<wsdl:operation name="doSomething" parameterOrder="testParams">
			<wsdl:input name="doSomethingRequest" message="impl:doSomethingRequest"/>
			<wsdl:output name="doSomethingResponse" message="impl:doSomethingResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="TestServicePortSoapBinding" type="impl:TestService">
		<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="doSomething">
			<wsdlsoap:operation/>
			<wsdl:input name="doSomethingRequest">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:input>
			<wsdl:output name="doSomethingResponse">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="TestService">
		<wsdl:port name="TestServicePort" binding="impl:TestServicePortSoapBinding">
			<wsdlsoap:address location="http://localhost:8600/services/test"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


Note the int[] array in the wsdl.

Generate the Java source code for this by doing a wsdl2java.

You'll notice in the generated TestParams.java file the following:

   static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
    }

Do you see the "int" definition of "someArray" - that's wrong, very wrong.
The array has been converted into a simple "int" instead of "int[]".

This is the source of the problem.

If you generate a WSDL file from the class (Java2WSDL) or have it autogenerated (?wsdl), you'll see that "someArray" has been converted into an "int". If you're relying on your client to generate operable code from WSDL in this manner, it won't work !!

It's totally broken - borked would be the right word to use here.

If version Axis 1.4.1 has only ONE fix, this is the one to put in it !!!!!!

Sorry for ranting but i've wasted many hours on this bug.








 was:
Ok, it's me again.

Here's a WSDL you can try to test this bug:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:test.company.com" xmlns:intf="urn:test.company.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test.company.com">
	<wsdl:types>
		<schema targetNamespace="urn:test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="ArrayOf_xsd_int">
				<complexContent>
					<restriction base="soapenc:Array">
						<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
					</restriction>
				</complexContent>
			</complexType>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>
	</wsdl:types>
	<wsdl:message name="doSomethingRequest">
		<wsdl:part name="testParams" type="impl:TestParams"/>
	</wsdl:message>
	<wsdl:message name="doSomethingResponse">
		<wsdl:part name="doSomethingReturn" type="xsd:int"/>
	</wsdl:message>
	<wsdl:portType name="TestService">
		<wsdl:operation name="doSomething" parameterOrder="testParams">
			<wsdl:input name="doSomethingRequest" message="impl:doSomethingRequest"/>
			<wsdl:output name="doSomethingResponse" message="impl:doSomethingResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="TestServicePortSoapBinding" type="impl:TestService">
		<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="doSomething">
			<wsdlsoap:operation/>
			<wsdl:input name="doSomethingRequest">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:input>
			<wsdl:output name="doSomethingResponse">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="TestService">
		<wsdl:port name="TestServicePort" binding="impl:TestServicePortSoapBinding">
			<wsdlsoap:address location="http://localhost:8600/services/test"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


Not the int[] array in the wsdl.

Generate the Java source code for this by doing a wsdl2java.

You'll notice in the TestParams.java file the following:

   static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
    }

Do you see the "int" definition of "someArray" - that's wrong, very wrong.
The array has been converted into a simple "int" instead of "int[]".

This is the source of the problem.

If you generate a WSDL file from the class (Java2WSDL) or have it autogenerated (?wsdl), you'll see that "someArray" has been converted into an "int". If you're relying on your client to generate operable code from WSDL in this manner, it won't work !!

It's totally broken - borked would be the right word to use here.

If version Axis 1.4.1 has only ONE fix, this is the one to put in it !!!!!!

Sorry for ranting but i've wasted many hours on this bug.







> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lord Halbert updated AXIS-2386:
-------------------------------

    Attachment: test.wsdl

Use this WSDL to test.



> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513024 ] 

Lord Halbert edited comment on AXIS-2386 at 7/16/07 1:38 PM:
-------------------------------------------------------------

THIS NEEDS TO BE FIXED ASAP !!!

I changed the priority to BLOCKER - the highest I could select.

I can't stress enough that this is a SEVERE problem requiring a real fix..


 was:
THIS NEEDS TO BE FIXED ASAP !!!


> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Andrew Teirney (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12367143 ] 

Andrew Teirney commented on AXIS-2386:
--------------------------------------

I myself have just come across this problem, i saw it a while back but didn't take any notice of it. I have been doing a bit of research today axis 1.1 seems to be fine, however 1.2.1 and 1.3 are both affected, and what is in the latest snapshot to the best of my knowledge. I don't know the exact logic that is used to generate the wsdl, but from what i can see it looks at the XmlType and depending on whether that type has already been defined it will take extra action such as defining the array of the objects. From a java class that has associated metadata through the wsdl2java process i get the following...

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Glen Daniels (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513734 ] 

Glen Daniels commented on AXIS-2386:
------------------------------------

Think someone could include an actual test case?  The WSDL referenced above is obviously incomplete.

I just made a change which might also solve this problem.  Grab the latest CVS HEAD and try it?  If you can't do that try the new dists in http://people.apache.org/~gdaniels/axis/

A test case (i.e. a minimal but complete WSDL and a small JUnit test which fails with the generated code) would really be helpful here.


> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lord Halbert updated AXIS-2386:
-------------------------------

    Environment: Not specific to an environment. It's only specific to the Axis version used.  (was: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5)

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513022 ] 

Lord Halbert edited comment on AXIS-2386 at 7/16/07 1:35 PM:
-------------------------------------------------------------

This is the same issue as https://issues.apache.org/jira/browse/AXIS-2519

The priority on this bug is not correct - it should be SHOWSTOPPER or ULTRA CRITICAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why has this bug remained for 3 major versions (1.2, 1.3, 1.4)  ?????????????????

Some body change the priority.

This should be fixed ASAP in either 1.4.1 or 1.5







 was:
This is the issue as https://issues.apache.org/jira/browse/AXIS-2519

The priority on this bug is not correct - it should be SHOWSTOPPER or ULTRA CRITICAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why has this bug remained for 3 major versions (1.2, 1.3, 1.4)  ?????????????????

Some body change the priority.

This should be fixed ASAP in either 1.4.1 or 1.5






> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Minor
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513022 ] 

Lord Halbert commented on AXIS-2386:
------------------------------------

This is the issue as https://issues.apache.org/jira/browse/AXIS-2519

The priority on this bug is not correct - it should be SHOWSTOPPER or ULTRA CRITICAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why has this bug remained for 3 major versions (1.2, 1.3, 1.4)  ?????????????????

Some body change the priority.

This should be fixed ASAP in either 1.4.1 or 1.5






> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Minor
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lord Halbert updated AXIS-2386:
-------------------------------


One way to fix it is by changing the following class:

org.apache.axis.wsdl.toJava.JavaBeanHelperWriter

You'll see at line 329 (Apache Axis 1.4 source):

                    // Some special handling for arrays.
                    TypeEntry elemType = elem.getType();
                    QName xmlType = null;

                    if ((elemType.getDimensions().length() > 1)
                            && (elemType.getClass() == DefinedType.class)) {

                        // If we have a DefinedType with dimensions, it must
                        // be a SOAP array derived type.  In this case, use
                        // the refType's QName for the metadata.
                                                
                        // I COMMENTED OUT THIS LINE TO FIX THE ISSUE
                        // elemType = elemType.getRefType();


I commented out the line at the end.

That seems to have fixed the issue but it's unclear what other problems this "hack" of mine created.

Don't worry, I did not commit any changes :)

The author(s) obviously created that code for a reason even though it created a problem.

Thanks for the quick reply (the previous poster) and I'll try out your changes you made to see if it works.





> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Eric Webster (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2386?page=all ]

Eric Webster updated AXIS-2386:
-------------------------------

    Attachment: IncorrectDataSet.wsdl

wsdl file generated by Java2WSDL. Contains incorrect 'ValueVector' 'values' section.

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515382 ] 

Lord Halbert edited comment on AXIS-2386 at 7/25/07 11:58 AM:
--------------------------------------------------------------

Use the attached WSDL file "test.wsdl" to test this bug.

Do a WSDL2Java on that wsdl file.

Then do a Java2WSDL on the compiled classes of the generated source files (from WSDL2Java).

Look at the output WSDL from Java2WSDL and find the definition for "TestParams".

This is what it should look like:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>


This is what it looks like with Axis 1.4, 1.3, and 1.2:

		<schema targetNamespace="http://test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="xsd:int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>

Do you see how the array has been converted into a single primitive?

This is NOT a minor bug folks. It needs to be fixed.





 was:
Use the attached WSDL filed "test.wsdl" to test this bug.

Do a WSDL2Java on that wsdl file.

Then do a Java2WSDL on the compiled classes of the generated source files (from WSDL2Java).

Look at the output WSDL from Java2WSDL and find the definition for "TestParams".

This is what it should look like:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>


This is what it looks like with Axis 1.4, 1.3, and 1.2:

		<schema targetNamespace="http://test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="xsd:int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>

Do you see how the array has been converted into a single primitive?

This is NOT a minor bug folks. It needs to be fixed.




> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513022 ] 

Lord Halbert edited comment on AXIS-2386 at 7/16/07 1:36 PM:
-------------------------------------------------------------

This is the same bug as https://issues.apache.org/jira/browse/AXIS-2519

The priority on this bug is not correct - it should be SHOWSTOPPER or ULTRA CRITICAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why has this bug remained for 3 major versions (1.2, 1.3, 1.4)  ?????????????????

Some body change the priority.

This should be fixed ASAP in either 1.4.1 or 1.5







 was:
This is the same issue as https://issues.apache.org/jira/browse/AXIS-2519

The priority on this bug is not correct - it should be SHOWSTOPPER or ULTRA CRITICAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Why has this bug remained for 3 major versions (1.2, 1.3, 1.4)  ?????????????????

Some body change the priority.

This should be fixed ASAP in either 1.4.1 or 1.5






> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2.1, 1.3
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Minor
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Kommentiert: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Sebastian Mittelstädt (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12364458 ] 

Sebastian Mittelstädt commented on AXIS-2386:
---------------------------------------------

I can confirm this bug regarding the WSDL that is generated from the serviceName?wsdl URl.

My original WSDL was generated by java2wsdl and is correct (RPC/encoded).

But when the service is deployed, and the wsdl is generated by serviceName?wsdl, all occurences of double arrays are converted into single double.

Original WSDL:
<element name="valueX" nillable="true" type="impl:ArrayOf_xsd_double"/>

Generated WSDL by serviceName?wsdl :
<element name="valueX" nillable="true" type="xsd:double" /> 

I also saw this happen with other primitives.


This impacts pruductive systems where wsdl is published to third party vendors and should be fixes ASAP.
I suggest to increase the priority of this bug.

 

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515433 ] 

Lord Halbert commented on AXIS-2386:
------------------------------------

I've tried the fix by Glen Daniel and I can confirm it has fixed this issue.

His fix is at: http://people.apache.org/~gdaniels/axis/ 

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515382 ] 

Lord Halbert edited comment on AXIS-2386 at 7/25/07 11:58 AM:
--------------------------------------------------------------

Use the attached WSDL filed "test.wsdl" to test this bug.

Do a WSDL2Java on that wsdl file.

Then do a Java2WSDL on the compiled classes of the generated source files (from WSDL2Java).

Look at the output WSDL from Java2WSDL and find the definition for "TestParams".

This is what it should look like:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>


This is what it looks like with Axis 1.4, 1.3, and 1.2:

		<schema targetNamespace="http://test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="xsd:int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>

Do you see how the array has been converted into a single primitive?

This is NOT a minor bug folks. It needs to be fixed.





 was:
Use this WSDL to test.



> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Eric Webster (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2386?page=all ]

Eric Webster updated AXIS-2386:
-------------------------------

    Attachment: DataSet.wsdl

Original hand made wsdl file.

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520708 ] 

lordhalbert edited comment on AXIS-2386 at 8/17/07 4:30 PM:
-------------------------------------------------------------

Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}




I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}

      was (Author: lordhalbert):
    Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

[code]
static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}
[/code]

I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}
  
> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514020 ] 

Lord Halbert edited comment on AXIS-2386 at 7/25/07 3:57 PM:
-------------------------------------------------------------

Ok, it's me again.

I've attached a test WSDL file:  test.wsdl

Note the int[] array in the wsdl.

Generate the Java source code for this by doing a wsdl2java.

You'll notice in the generated TestParams.java file the following:

   static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
    }

Do you see the "int" definition of "someArray" - that's wrong, very wrong.
The array has been converted into a simple "int" instead of "int[]".

This is the source of the problem.

If you generate a WSDL file from the class (Java2WSDL) or have it autogenerated (?wsdl), you'll see that "someArray" has been converted into an "int". If you're relying on your client to generate operable code from WSDL in this manner, it won't work !!

It's totally broken - borked would be the right word to use here.

If version Axis 1.4.1 has only ONE fix, this is the one to put in it !!!!!!

Sorry for ranting but i've wasted many hours on this bug.








 was:
Ok, it's me again.

Here's a WSDL you can try to test this bug:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:test.company.com" xmlns:intf="urn:test.company.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test.company.com">
	<wsdl:types>
		<schema targetNamespace="urn:test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="ArrayOf_xsd_int">
				<complexContent>
					<restriction base="soapenc:Array">
						<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
					</restriction>
				</complexContent>
			</complexType>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>
	</wsdl:types>
	<wsdl:message name="doSomethingRequest">
		<wsdl:part name="testParams" type="impl:TestParams"/>
	</wsdl:message>
	<wsdl:message name="doSomethingResponse">
		<wsdl:part name="doSomethingReturn" type="xsd:int"/>
	</wsdl:message>
	<wsdl:portType name="TestService">
		<wsdl:operation name="doSomething" parameterOrder="testParams">
			<wsdl:input name="doSomethingRequest" message="impl:doSomethingRequest"/>
			<wsdl:output name="doSomethingResponse" message="impl:doSomethingResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="TestServicePortSoapBinding" type="impl:TestService">
		<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="doSomething">
			<wsdlsoap:operation/>
			<wsdl:input name="doSomethingRequest">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:input>
			<wsdl:output name="doSomethingResponse">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="TestService">
		<wsdl:port name="TestServicePort" binding="impl:TestServicePortSoapBinding">
			<wsdlsoap:address location="http://localhost:8600/services/test"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


Note the int[] array in the wsdl.

Generate the Java source code for this by doing a wsdl2java.

You'll notice in the generated TestParams.java file the following:

   static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
    }

Do you see the "int" definition of "someArray" - that's wrong, very wrong.
The array has been converted into a simple "int" instead of "int[]".

This is the source of the problem.

If you generate a WSDL file from the class (Java2WSDL) or have it autogenerated (?wsdl), you'll see that "someArray" has been converted into an "int". If you're relying on your client to generate operable code from WSDL in this manner, it won't work !!

It's totally broken - borked would be the right word to use here.

If version Axis 1.4.1 has only ONE fix, this is the one to put in it !!!!!!

Sorry for ranting but i've wasted many hours on this bug.







> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Andrew Teirney (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12367144 ] 

Andrew Teirney commented on AXIS-2386:
--------------------------------------

Sorry about the duplicate, hit the enter button by accident.

I myself have just come across this problem, i saw it a while back but didn't take any notice of it. I have been doing a bit of research today axis 1.1 seems to be fine, however 1.2.1 and 1.3 are both affected, and what is in the latest snapshot to the best of my knowledge. I don't know the exact logic that is used to generate the wsdl, but from what i can see it looks at the XmlType and depending on whether that type has already been defined it will take extra action such as defining the array of the objects. From a java class that has associated metadata through the wsdl2java process i get the following...

    elemField.setFieldName("array");
    elemField.setXmlName(new javax.xml.namespace.QName("http://bug", "array"));
    elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));

`array' is actually a boolean array, if i change the XmlType to something different the wsdl is generated correctly, this seemed to be tracked down to the fact that boolean is a primitive type and as such has no other behaviour. although this works under axis 1.1 i question where ther xml type of `array' is infact what is generated, i decided to delve into things a little more. instead i focused on the wsdl2java side of things. I found the actual source code emitting coming from JavaBeanHelperWriter.java in the org.apache.axis.wsdl.toJava package. Through lines 327->346 i noticed that there was special behaviour for arrays which ultimately gave the refType. I decided to replace these lines with the following.

    QName xmlType = elem.getType().getQName();
    
The end result is the code emmited changed to:

    elemField.setFieldName("array");
    elemField.setXmlName(new javax.xml.namespace.QName("http://bug", "array"));
    elemField.setXmlType(new javax.xml.namespace.QName("http://bug", "ArrayOf_xsd_boolean"));

I am no expert, but to myself this does look more like what one wants, after all the type of array is an array of xsd:boolean.

One thing i am having an issue with grasping is why a wsdl2java followed by a java2wsdl produces a different wsdl, not in terms of the ordering of the elements, but it appears as though the wsdl2java wraps up the inputs into a class rather than passing as parameters, this in turn results in a different wsdl when java2wsdl is run. This maybe was is intended, just more an observation than anything. The primary problem i have is with the array handling of primitive types, whether this affects other types i am not sure.

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520708 ] 

lordhalbert edited comment on AXIS-2386 at 8/17/07 4:30 PM:
-------------------------------------------------------------

Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

[code]
static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}
[/code]

I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}

      was (Author: lordhalbert):
    Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}

I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}
  
> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520708 ] 

lordhalbert edited comment on AXIS-2386 at 8/17/07 4:30 PM:
-------------------------------------------------------------

Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did notice in the generated source file the type is still incorrect:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}




I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}

      was (Author: lordhalbert):
    Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}




I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}
  
> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514020 ] 

Lord Halbert commented on AXIS-2386:
------------------------------------

Ok, it's me again.

Here's a WSDL you can try to test this bug:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:test.company.com" xmlns:intf="urn:test.company.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test.company.com">
	<wsdl:types>
		<schema targetNamespace="urn:test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="ArrayOf_xsd_int">
				<complexContent>
					<restriction base="soapenc:Array">
						<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
					</restriction>
				</complexContent>
			</complexType>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>
	</wsdl:types>
	<wsdl:message name="doSomethingRequest">
		<wsdl:part name="testParams" type="impl:TestParams"/>
	</wsdl:message>
	<wsdl:message name="doSomethingResponse">
		<wsdl:part name="doSomethingReturn" type="xsd:int"/>
	</wsdl:message>
	<wsdl:portType name="TestService">
		<wsdl:operation name="doSomething" parameterOrder="testParams">
			<wsdl:input name="doSomethingRequest" message="impl:doSomethingRequest"/>
			<wsdl:output name="doSomethingResponse" message="impl:doSomethingResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="TestServicePortSoapBinding" type="impl:TestService">
		<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="doSomething">
			<wsdlsoap:operation/>
			<wsdl:input name="doSomethingRequest">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:input>
			<wsdl:output name="doSomethingResponse">
				<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:test.company.com"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="TestService">
		<wsdl:port name="TestServicePort" binding="impl:TestServicePortSoapBinding">
			<wsdlsoap:address location="http://localhost:8600/services/test"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


Not the int[] array in the wsdl.

Generate the Java source code for this by doing a wsdl2java.

You'll notice in the TestParams.java file the following:

   static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
    }

Do you see the "int" definition of "someArray" - that's wrong, very wrong.
The array has been converted into a simple "int" instead of "int[]".

This is the source of the problem.

If you generate a WSDL file from the class (Java2WSDL) or have it autogenerated (?wsdl), you'll see that "someArray" has been converted into an "int". If you're relying on your client to generate operable code from WSDL in this manner, it won't work !!

It's totally broken - borked would be the right word to use here.

If version Axis 1.4.1 has only ONE fix, this is the one to put in it !!!!!!

Sorry for ranting but i've wasted many hours on this bug.







> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515382 ] 

Lord Halbert edited comment on AXIS-2386 at 7/25/07 11:59 AM:
--------------------------------------------------------------

Use the attached WSDL file "test.wsdl" to test this bug.

Do a WSDL2Java on that wsdl file.

Then do a Java2WSDL on the compiled classes of the generated source files (from WSDL2Java).

Look at the output WSDL from Java2WSDL and find the definition for "TestParams".

This is what it should look like:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>


This is what it looks like with Axis 1.4, 1.3, and 1.2:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="xsd:int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>

Do you see how the array has been converted into a single primitive?

This is NOT a minor bug folks. It needs to be fixed.





 was:
Use the attached WSDL file "test.wsdl" to test this bug.

Do a WSDL2Java on that wsdl file.

Then do a Java2WSDL on the compiled classes of the generated source files (from WSDL2Java).

Look at the output WSDL from Java2WSDL and find the definition for "TestParams".

This is what it should look like:

			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="impl:ArrayOf_xsd_int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>


This is what it looks like with Axis 1.4, 1.3, and 1.2:

		<schema targetNamespace="http://test.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="TestParams">
				<sequence>
					<element name="someArray" nillable="true" type="xsd:int"/>
					<element name="someStringValue" nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
		</schema>

Do you see how the array has been converted into a single primitive?

This is NOT a minor bug folks. It needs to be fixed.




> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Lord Halbert (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520708 ] 

Lord Halbert commented on AXIS-2386:
------------------------------------

Well, I take back what I said about this being fixed.

I thought it was fixed because the generated WSDL looked fined, however, upon an actual testing using a test client, it failed.

So, in other words, THIS IS NOT FIXED YET !!

I did noticed in the generated source file the type is still incorrect:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        ....
}

I believe it should be:

static {
        ...
        elemField.setXmlName(new javax.xml.namespace.QName("", "someArray"));
        elemField.setXmlType(new javax.xml.namespace.QName("urn:test.company.com", "ArrayOf_xsd_int"));
        ...
}

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>                 Key: AXIS-2386
>                 URL: https://issues.apache.org/jira/browse/AXIS-2386
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2, 1.2.1, 1.3, 1.4
>         Environment: Not specific to an environment. It's only specific to the Axis version used.
>            Reporter: Eric Webster
>            Priority: Blocker
>         Attachments: DataSet.wsdl, IncorrectDataSet.wsdl, test.wsdl
>
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2386) Java2WSDL changes type double array into a single double.

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2386?page=comments#action_12365642 ] 

Tom Jordahl commented on AXIS-2386:
-----------------------------------

The code is the same for ?WSDL generation and Java2WSDL.  So if one works and the other doesn't, it would be interesting to know why.  Configuration?

Why is this bug appearing now?  Is there a test case in the Axis test suite?  Did ths ever work (in 1.1 or 1.2)?

In summary, you will probably have to do more digging and possibly provide a patch yourself.

> Java2WSDL changes type double array into a single double.
> ---------------------------------------------------------
>
>          Key: AXIS-2386
>          URL: http://issues.apache.org/jira/browse/AXIS-2386
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1, 1.3
>  Environment: Linux 2.4.26, java version "1.5.0_04", Tomcat 5.5
>     Reporter: Eric Webster
>     Priority: Minor
>  Attachments: DataSet.wsdl, IncorrectDataSet.wsdl
>
> Java2WSDL changes type double array into a single double.
> This happens when you run Java2WSDL manually on the command line or when a wsdl file is generated from a service_name?wsdl url.
> Currently to fix this I just manually edit the generated WSDL file and distrobute that.
> The Java code originally came from a hand made WSDL file. WSDL2Java was used to generate the Java code. The section that is affected by this problem is the 'ValueVector' complexType which contains and element 'values' which is an array of doubles. After converting to Java and then back to WSDL 'values' becomes a single double. 
> Here is the original WSDL file.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
>     targetNamespace="dataset.odin.cirg.washington.edu" 
>     xmlns:apachesoap="http://xml.apache.org/xml-soap" 
>     xmlns:impl="dataset.odin.cirg.washington.edu" 
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <wsdl:types>
>     <schema targetNamespace="dataset.odin.cirg.washington.edu" xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       
>       <complexType name="ArrayOf_xsd_double">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ArrayOf_xsd_string">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       
>       <simpleType name="TypeEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="count"/>
> 	  <enumeration value="flag"/>
> 	  <enumeration value="score"/>
> 	  <enumeration value="blank"/>
> 	  <enumeration value="error"/>
> 	  <enumeration value="other"/>
> 	  <enumeration value="unknown"/>
> 	</restriction>
>       </simpleType>
>       <simpleType name="IntervalUnitEnum">
> 	<restriction base="xsd:string">
> 	  <enumeration value="second"/>
> 	  <enumeration value="week"/>
> 	  <enumeration value="month"/>
> 	  <enumeration value="year"/>
> 	</restriction>
>       </simpleType>
>       <complexType name="Attribute">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="value" type="xsd:string" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_Attribute">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Attribute[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="ValueVector">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="type" type="impl:TypeEnum"/>
> 	  <element name="date" type="xsd:string"/>
> 	  <element name="interval" type="xsd:int"/>
> 	  <element name="intervalUnit" type="impl:IntervalUnitEnum"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_double" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_ValueVector">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ValueVector[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_ValueVector"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_DataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:DataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="DataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_DataSet"/>
> 	</sequence>
>       </complexType>
>       <complexType name="SurvCol">
> 	<sequence>
> 	  <element name="name" type="xsd:string"/>
> 	  <element name="values" type="impl:ArrayOf_xsd_string"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvCol">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvCol[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSet">
> 	<sequence>
> 	  <element name="name" type="xsd:string" nillable="true"/>
> 	  <element name="attributes" type="impl:ArrayOf_impl_Attribute" nillable="true"/>
> 	  <element name="vectors" type="impl:ArrayOf_impl_SurvCol"/>
> 	</sequence>
>       </complexType>
>       <complexType name="ArrayOf_impl_SurvDataSet">
> 	<complexContent>
> 	  <restriction base="soapenc:Array">
> 	    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SurvDataSet[]"/>
> 	  </restriction>
> 	</complexContent>
>       </complexType>
>       <complexType name="SurvDataSetArray">
> 	<sequence>
> 	  <element name="array" type="impl:ArrayOf_impl_SurvDataSet"/>
> 	</sequence>
>       </complexType>
>     </schema>
>   </wsdl:types>
> </wsdl:definitions>
> Here is what 'ValueVector' turns into after running WSDL2Java (which creates correct java code) and then Java2WSDL.
>    <complexType name="ValueVector">
>     <sequence>
>      <element name="name" nillable="true" type="xsd:string"/>
>      <element name="type" type="tns2:TypeEnum"/>
>      <element name="date" type="xsd:string"/>
>      <element name="interval" type="xsd:int"/>
>      <element name="intervalUnit" type="tns2:IntervalUnitEnum"/>
>      <element name="attributes" nillable="true" type="impl:ArrayOf_tns1_Attribute"/>
>      <element name="values" nillable="true" type="xsd:double"/>
>     </sequence>
>    </complexType>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira