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 ax...@ws.apache.org on 2004/10/05 07:40:32 UTC
[jira] Created: (AXIS-1587) WSDL2Java doesn't identify nillable- attributes
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1587
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1587
Summary: WSDL2Java doesn't identify nillable- attributes
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Versions:
current (nightly)
Assignee:
Reporter: Sami Lakka
Created: Mon, 4 Oct 2004 10:39 PM
Updated: Mon, 4 Oct 2004 10:39 PM
Environment: Axis-1.2-RC1 and all Axis-1.2 releases
Description:
WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
following lines have into JavaBeanWriter (method preprocess, line 318):
if (attr.getOptional() || attr.getNillable())
typeName = Utils.getWrapperType(typeName);
The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
public void setNillable(boolean nillable) {
this.nillable = nillable;
}
public boolean getNillable() {
return nillable;
}
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1587) WSDL2Java doesn't identify nillable- attributes
Posted by "Rodrigo Ruiz (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1587?page=comments#action_12317040 ]
Rodrigo Ruiz commented on AXIS-1587:
------------------------------------
My first tests tell me that this change also solves the report AXIS-2102
> WSDL2Java doesn't identify nillable- attributes
> -----------------------------------------------
>
> Key: AXIS-1587
> URL: http://issues.apache.org/jira/browse/AXIS-1587
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: current (nightly)
> Environment: Axis-1.2-RC1 and all Axis-1.2 releases
> Reporter: Sami Lakka
>
> WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
> following lines have into JavaBeanWriter (method preprocess, line 318):
>
> if (attr.getOptional() || attr.getNillable())
> typeName = Utils.getWrapperType(typeName);
>
> The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
> attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
> Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
>
> public void setNillable(boolean nillable) {
> this.nillable = nillable;
> }
> public boolean getNillable() {
> return nillable;
> }
--
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-1587) WSDL2Java doesn't identify nillable- attributes
Posted by "Rodrigo Ruiz (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1587?page=comments#action_12317160 ]
Rodrigo Ruiz commented on AXIS-1587:
------------------------------------
I guess you are right, but at least until java 1.4.2, optional parameters are equivalent to nillable ones. In fact, the decision about whether to use the direct java type or a wrapper is in the Utils.getParameterTypeName, and there, the code is:
if ((parm.isOmittable() && parm.getType().getDimensions().equals(""))
|| parm.getType().getUnderlTypeNillable()) {
ret = getWrapperType(parm.getType());
}
It seems that isOmittable() is being used as the getUndelTypeNillable() equivalent for non-array types.
Thanks,
Rodrigo Ruiz
> WSDL2Java doesn't identify nillable- attributes
> -----------------------------------------------
>
> Key: AXIS-1587
> URL: http://issues.apache.org/jira/browse/AXIS-1587
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: current (nightly)
> Environment: Axis-1.2-RC1 and all Axis-1.2 releases
> Reporter: Sami Lakka
>
> WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
> following lines have into JavaBeanWriter (method preprocess, line 318):
>
> if (attr.getOptional() || attr.getNillable())
> typeName = Utils.getWrapperType(typeName);
>
> The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
> attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
> Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
>
> public void setNillable(boolean nillable) {
> this.nillable = nillable;
> }
> public boolean getNillable() {
> return nillable;
> }
--
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-1587) WSDL2Java doesn't identify nillable- attributes
Posted by "Rodrigo Ruiz (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1587?page=comments#action_12317037 ]
Rodrigo Ruiz commented on AXIS-1587:
------------------------------------
Hi, nillable elements are correctly handled in java beans, but not in operation parameters.
The following "patch" works for me.
In Axis 1.2.1 release code:
Class org.apache.axis.wsdl.symbolTable.SymbolTable
Line 2226
- p.setOmittable(elem.getMinOccursIs0());
+ p.setOmittable(elem.getMinOccursIs0() || elem.getNillable());
Hope this helps,
Rodrigo Ruiz
> WSDL2Java doesn't identify nillable- attributes
> -----------------------------------------------
>
> Key: AXIS-1587
> URL: http://issues.apache.org/jira/browse/AXIS-1587
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: current (nightly)
> Environment: Axis-1.2-RC1 and all Axis-1.2 releases
> Reporter: Sami Lakka
>
> WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
> following lines have into JavaBeanWriter (method preprocess, line 318):
>
> if (attr.getOptional() || attr.getNillable())
> typeName = Utils.getWrapperType(typeName);
>
> The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
> attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
> Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
>
> public void setNillable(boolean nillable) {
> this.nillable = nillable;
> }
> public boolean getNillable() {
> return nillable;
> }
--
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] Resolved: (AXIS-1587) WSDL2Java doesn't identify nillable- attributes
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1587?page=all ]
Davanum Srinivas resolved AXIS-1587:
------------------------------------
Resolution: Fixed
I believe this has been fixed in Axis 1.2.1. If it isn't, add a comment and i'll reopen the bug.
thanks,
dims
> WSDL2Java doesn't identify nillable- attributes
> -----------------------------------------------
>
> Key: AXIS-1587
> URL: http://issues.apache.org/jira/browse/AXIS-1587
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: current (nightly)
> Environment: Axis-1.2-RC1 and all Axis-1.2 releases
> Reporter: Sami Lakka
>
> WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
> following lines have into JavaBeanWriter (method preprocess, line 318):
>
> if (attr.getOptional() || attr.getNillable())
> typeName = Utils.getWrapperType(typeName);
>
> The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
> attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
> Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
>
> public void setNillable(boolean nillable) {
> this.nillable = nillable;
> }
> public boolean getNillable() {
> return nillable;
> }
--
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-1587) WSDL2Java doesn't identify nillable- attributes
Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1587?page=comments#action_12317114 ]
Tom Jordahl commented on AXIS-1587:
-----------------------------------
Omittable is not the same thing as nillable. One implies leave out the element, the other says you can set it type to 'nil'. I do not think the proposed patch is correct.
> WSDL2Java doesn't identify nillable- attributes
> -----------------------------------------------
>
> Key: AXIS-1587
> URL: http://issues.apache.org/jira/browse/AXIS-1587
> Project: Apache Axis
> Type: Bug
> Components: WSDL processing
> Versions: current (nightly)
> Environment: Axis-1.2-RC1 and all Axis-1.2 releases
> Reporter: Sami Lakka
>
> WSDL2Java should not bind elements that have nillable- attribute as an primitive value (int etc.) This bug can be fixed by adding
> following lines have into JavaBeanWriter (method preprocess, line 318):
>
> if (attr.getOptional() || attr.getNillable())
> typeName = Utils.getWrapperType(typeName);
>
> The following line have to be added to SchemaUtils (method addAttributeToVector, line 1579):
> attr.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute (child,"nillable")));
> Following methods have to be added to ContainedAttribute (or more likely refactored to the ContainedEntry). The boolean attribute nillable has also to be added to ContainedAttribute
>
> public void setNillable(boolean nillable) {
> this.nillable = nillable;
> }
> public boolean getNillable() {
> return nillable;
> }
--
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