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 "Vaduz (JIRA)" <ax...@ws.apache.org> on 2006/02/01 18:24:05 UTC

[jira] Created: (AXIS-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence 
-----------------------------------------------------------------------------------------------------------

         Key: AXIS-2391
         URL: http://issues.apache.org/jira/browse/AXIS-2391
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.3    
 Environment: Axis for Java v1.3

java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

Windows XP Professional, SP2
    Reporter: Vaduz


WSDL2Java generates wrong source code for the complex type of the following structure:

	<xs:complexType name="SomeListType">
		<xs:sequence>
			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="attr1" type="xs:string" />
		<xs:attribute name="attr2" type="xs:string" />
	</xs:complexType>

The complex type should be a sequence with only element, which has maxOccurs="unbounded".
In this case all atributes are ignored and not included to the resulting type.

Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.

The sample WSDL used for test:

--------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<definitions  name ="DayOfWeek" 
  targetNamespace="http://www/bug/DayOfWeek.wsdl"
  xmlns:tns="http://www/bug/DayOfWeek.wsdl"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://schemas.xmlsoap.org/wsdl/"> 

<types>
<xsd:schema>
	<xsd:complexType name="ReplyType">
		<xsd:sequence>
			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="attr1" type="xsd:string" />
		<xsd:attribute name="attr2" type="xsd:string" />
	</xsd:complexType>
</xsd:schema>
</types>

  <message name="DayOfWeekInput">
    <part name="date" type="xsd:date"/>
  </message>
  <message name="DayOfWeekResponse">
    <part name="dayOfWeek" type="tns:ReplyType"/>
  </message>

  <portType name="DayOfWeekPortType">
    <operation name="GetDayOfWeek">
      <input message="tns:DayOfWeekInput"/>
      <output message="tns:DayOfWeekResponse"/>
    </operation>
  </portType>

  <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
    <soap:binding style="document" 
      transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetDayOfWeek">
      <soap:operation soapAction="getdayofweek"/>
      <input>
        <soap:body use="encoded" 
          namespace="http://www/bug" 
          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" 
          namespace="http://www/bug"  
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>

  <service name="DayOfWeekService" >
    <documentation>
      Returns the day-of-week name for a given date
    </documentation>
    <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
      <soap:address location="http://www/dayofweek/DayOfWeek"/>
    </port>
  </service>

</definitions>

--------------------------------------------------


For this WSDL Axis 1.2 generates the correct code:
...
public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
...

Where reply type includes attributes attr1 and attr2 as well as Item array.

Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:

public java.lang.String[] getDayOfWeek(java.util.Date date)...

which is obviosly wrong.



 


-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Jim Redman (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12366734 ] 

Jim Redman commented on AXIS-2391:
----------------------------------

I'd really like the priority promoted to "Blocker" since this kills any progress for us on a project.  Who can do that to this bug?  If me, how?  If we can't do it to this bug, should I duplicate the bug with that priority? I'd hate to have to do that, but this is something of a killer bug, and since the interface (http://opcfoundation.org/webservices/XMLDA/1.0/) in question fails in 1.1, 1.2 and Axis2, without a bug fix or workaround, we're totoally blocked. Thanks.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

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

Tom Jordahl updated AXIS-2391:
------------------------------

    Priority: Blocker  (was: Major)

Upgrading to a blocker as requested.

Note that you may have to provide the fix for this yourself, as this priority doesn't imply that someone is working on it.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz
>     Priority: Blocker

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Jim Redman (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12367109 ] 

Jim Redman commented on AXIS-2391:
----------------------------------

Karen:  In this case, the WSDL interface is defined by a third party, so I don't have the luxury of changing it.
Tom: Thanks, and yes I realize that there's no promises that any bug will be fixed, but I figure that upping the priority can't hurt.  My personal hope is that someone will recognise that this interface has caused, and is continuing to cause, problems with every release of Axis and that it will become a test interface, thereby improving the quality of Axis for all users.  --wrapArrays is also looking hopeful as a work-around.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz
>     Priority: Blocker

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Jim Redman (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12366392 ] 

Jim Redman commented on AXIS-2391:
----------------------------------

I think that this is the same bug in a slightly different incarnation:

eg browse from http://opcfoundation.org/webservices/XMLDA/1.0/
generates this:

 public BrowseResponse browse(javax.xml.namespace.QName[] parameters) throws RemoteException {

which is missing the attributes.  Without a fix or workaround, I'd also like to suggest that this bug gets promoted to critical since no progress can be made without a fix.

In the same WSDL it seems that "SubscriptionPolledRefresh" also misgenerates code.

<s:element name="Browse">
-
	<s:complexType>
-
	<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="PropertyNames" type="s:QName"/>
</s:sequence>
<s:attribute name="LocaleID" type="s:string"/>
<s:attribute name="ClientRequestHandle" type="s:string"/>
<s:attribute name="ItemPath" type="s:string"/>
<s:attribute name="ItemName" type="s:string"/>
<s:attribute name="ContinuationPoint" type="s:string"/>
<s:attribute default="0" name="MaxElementsReturned" type="s:int"/>
<s:attribute default="all" name="BrowseFilter" type="s0:browseFilter"/>
<s:attribute name="ElementNameFilter" type="s:string"/>
<s:attribute name="VendorFilter" type="s:string"/>
<s:attribute default="false" name="ReturnAllProperties" type="s:boolean"/>
<s:attribute default="false" name="ReturnPropertyValues" type="s:boolean"/>
<s:attribute default="false" name="ReturnErrorText" type="s:boolean"/>
</s:complexType>
</s:element>

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Karen Lease (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12367091 ] 

Karen Lease commented on AXIS-2391:
-----------------------------------

I've also got this problem. I only had one attribute and I worked around it by using an extra element instead of the attribute.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz
>     Priority: Blocker

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Dies Koper (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12366735 ] 

Dies Koper commented on AXIS-2391:
----------------------------------

I think there is a bug in the code that determines whether arrays should be wrapped or not (see --wrapArrays option). It seems to ignore your attributes. I think setting the WSDL2Java option --wrapArrays should solve your problem. Please comment here if it works.


> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

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

Nathan Lipke updated AXIS-2391:
-------------------------------

    Attachment: axis-2391.zip

Patch to fix this bug.

I noticed this is still broken in Axis 1.4.

Also, this bug causes bad type generation for WSRP 2.0 schema:
http://www.oasis-open.org/apps/org/workgroup/wsrp/download.php/20061/wsrp_v2_types.xsd

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2391
>                 URL: http://issues.apache.org/jira/browse/AXIS-2391
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.3
>         Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>            Reporter: Vaduz
>            Priority: Blocker
>         Attachments: axis-2391.zip
>
>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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] Commented: (AXIS-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Sören-Helge Zaschke (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493661 ] 

Sören-Helge Zaschke commented on AXIS-2391:
-------------------------------------------

It looks like the same bug as I have observed:
AXIS can not handle the following type definition:
	<xsd:complexType name="SomeName">
		<xsd:sequence>
			<xsd:element name="N1" type="Type1" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="N2" type="Type2" use="required"/>
	</xsd:complexType>

Fix 1:
Change the xsd by adding another element (that is not used), e.g.
	<xsd:complexType name="SomeName">
		<xsd:sequence>
			<xsd:element name="N1" type="Type1" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="N2" type="Type2" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="N2" type="Type2" use="required"/>
	</xsd:complexType>

Fix 2:
Correct the AXIS source code, SchemaUtils.java:
------------------------------------------------------------
    public static QName getCollectionComponentQName(Node node,
                                                    QNameHolder itemQName,
                                                    BooleanHolder forElement,
                                                    SymbolTable symbolTable) {
        // If we're going to turn "wrapped" arrays into types such that
...
            }
            if (element == null) {
                return null;
            }
            
            // OK, exactly one element child of <sequence>,
            // now check if there is no attribute
            if (SchemaUtils.getChildByName(node, "attribute") != null) {
                return null;
            }

            // continue the processing using that element ...
------------------------------------------------------------



> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2391
>                 URL: https://issues.apache.org/jira/browse/AXIS-2391
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.3
>         Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>            Reporter: Vaduz
>            Priority: Blocker
>         Attachments: axis-2391.zip
>
>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Jim Redman (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12366739 ] 

Jim Redman commented on AXIS-2391:
----------------------------------

>From a quick first attempt, this looks as though it may be a valid work around.  I'll build up the server-side code and check it more thoroughly.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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


boosting AXIS-2222 to blocker

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Jim,

Why not, instead of boosting bug priorities around, attach a simple test 
case to this bug? A simple test case (WSDL + client + impl + explanation 
where to look to see the problem, where to look to see if it got fixed) 
is almost half of the work in getting a bug fixed.

In this bug, you mention that "itemList is always null on receipt". With 
a test application, that is something a developer could quickly run 
through the debugger.
Now you are putting the burden of writing a test application on the 
developer, which might be too much to ask as most developers are working 
on Axis2.

You also mentioned "The "methodName" is "Options", the name of the first 
parameter". In case of document/literal wrapped, the wrapper element has 
the same name as the method name. Is the WSDL you referred to DL or DLW? 
Does Axis correctly recognize it as such? (see generated WSDD)

Attaching the SOAP message might also help.

Regards,
Dies


Jim Redman (JIRA) wrote:
> [
> http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12368174
> ]
> 
> Jim Redman commented on AXIS-2391: ----------------------------------
> 
> 
> As far as I can tell the work around, that is using -w on the
> WSDL2Java command line is a satisfactory work around for this issue
> in my case.
> 
> Unfortunately, I still can't proceed to fully test because 2222 is
> still a problem:
> 
> https://issues.apache.org/jira/browse/AXIS-2222
> 
> With a work around, we could drop the priority of this bug to
> something less than blocker.  Could someone please boost 2222 to
> blocker (I realize that in principle this has no effect, but it does
> make me feel that at least the days spend on Axis are not completely
> wasted).  Thanks.
> 
>> WSDL2Java ignores attributes for complex types that have only
>> element with maxOccurs=unbounded in sequence 
>> ----------------------------------------------------------------------------------------------------------



[jira] Commented: (AXIS-2391) WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence

Posted by "Jim Redman (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2391?page=comments#action_12368174 ] 

Jim Redman commented on AXIS-2391:
----------------------------------

As far as I can tell the work around, that is using -w on the WSDL2Java command line is a satisfactory work around for this issue in my case.

Unfortunately, I still can't proceed to fully test because 2222 is still a problem:

https://issues.apache.org/jira/browse/AXIS-2222

With a work around, we could drop the priority of this bug to something less than blocker.  Could someone please boost 2222 to blocker (I realize that in principle this has no effect, but it does make me feel that at least the days spend on Axis are not completely wasted).  Thanks.

> WSDL2Java ignores attributes for complex types that have only element with maxOccurs=unbounded in sequence
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-2391
>          URL: http://issues.apache.org/jira/browse/AXIS-2391
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis for Java v1.3
> java version "1.5.0_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
> Windows XP Professional, SP2
>     Reporter: Vaduz
>     Priority: Blocker

>
> WSDL2Java generates wrong source code for the complex type of the following structure:
> 	<xs:complexType name="SomeListType">
> 		<xs:sequence>
> 			<xs:element name="Item" type="tns:ItemType" maxOccurs="unbounded"/>
> 		</xs:sequence>
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:complexType>
> The complex type should be a sequence with only element, which has maxOccurs="unbounded".
> In this case all atributes are ignored and not included to the resulting type.
> Version 1.2 works correctly. Version 1.3 works correctly, if the sequense has includes more than one element.
> The sample WSDL used for test:
> --------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions  name ="DayOfWeek" 
>   targetNamespace="http://www/bug/DayOfWeek.wsdl"
>   xmlns:tns="http://www/bug/DayOfWeek.wsdl"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://schemas.xmlsoap.org/wsdl/"> 
> <types>
> <xsd:schema>
> 	<xsd:complexType name="ReplyType">
> 		<xsd:sequence>
> 			<xsd:element name="Item" type="xsd:string" maxOccurs="unbounded"/>
> 		</xsd:sequence>
> 		<xsd:attribute name="attr1" type="xsd:string" />
> 		<xsd:attribute name="attr2" type="xsd:string" />
> 	</xsd:complexType>
> </xsd:schema>
> </types>
>   <message name="DayOfWeekInput">
>     <part name="date" type="xsd:date"/>
>   </message>
>   <message name="DayOfWeekResponse">
>     <part name="dayOfWeek" type="tns:ReplyType"/>
>   </message>
>   <portType name="DayOfWeekPortType">
>     <operation name="GetDayOfWeek">
>       <input message="tns:DayOfWeekInput"/>
>       <output message="tns:DayOfWeekResponse"/>
>     </operation>
>   </portType>
>   <binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType">
>     <soap:binding style="document" 
>       transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="GetDayOfWeek">
>       <soap:operation soapAction="getdayofweek"/>
>       <input>
>         <soap:body use="encoded" 
>           namespace="http://www/bug" 
>           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded" 
>           namespace="http://www/bug"  
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="DayOfWeekService" >
>     <documentation>
>       Returns the day-of-week name for a given date
>     </documentation>
>     <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding">
>       <soap:address location="http://www/dayofweek/DayOfWeek"/>
>     </port>
>   </service>
> </definitions>
> --------------------------------------------------
> For this WSDL Axis 1.2 generates the correct code:
> ...
> public www.bug.DayOfWeek_wsdl.ReplyType getDayOfWeek(java.util.Date date) ...
> ...
> Where reply type includes attributes attr1 and attr2 as well as Item array.
> Axis 1.3 does not generate ReplyType class at all, and declares getDayOfWeek as following:
> public java.lang.String[] getDayOfWeek(java.util.Date date)...
> which is obviosly wrong.
>  

-- 
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