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 "Andy Schmidt (JIRA)" <ji...@apache.org> on 2012/09/13 13:58:08 UTC
[jira] [Created] (AXIS2-5420) AXIS2 can't create custom exception
from received fault message if a custom string definition exists at the
WSDL
Andy Schmidt created AXIS2-5420:
-----------------------------------
Summary: AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
Key: AXIS2-5420
URL: https://issues.apache.org/jira/browse/AXIS2-5420
Project: Axis2
Issue Type: Bug
Components: codegen
Affects Versions: 1.6.2
Reporter: Andy Schmidt
Priority: Minor
Fix For: 1.6.3
The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
</xs:schema>
The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5420) AXIS2 can't create custom exception
from received fault message if a custom string definition exists at the
WSDL
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455282#comment-13455282 ]
Hudson commented on AXIS2-5420:
-------------------------------
Integrated in axis2-1.6 #319 (See [https://builds.apache.org/job/axis2-1.6/319/])
AXIS2-5420: Merged r1384482 to the 1.6 branch. (Revision 1384483)
Result = FAILURE
veithen :
Files :
* /axis/axis2/java/core/branches/1_6
* /axis/axis2/java/core/branches/1_6/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
* /axis/axis2/java/core/branches/1_6/modules/saaj
> AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
> ----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5420
> URL: https://issues.apache.org/jira/browse/AXIS2-5420
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.6.2
> Reporter: Andy Schmidt
> Priority: Minor
> Fix For: 1.6.3
>
> Attachments: InterfaceImplementationTemplate.xsl
>
>
> The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
> <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
> <xs:element name="decimal" nillable="true" type="xs:decimal" />
> <xs:element name="double" nillable="true" type="xs:double" />
> <xs:element name="float" nillable="true" type="xs:float" />
> <xs:element name="int" nillable="true" type="xs:int" />
> <xs:element name="long" nillable="true" type="xs:long" />
> <xs:element name="QName" nillable="true" type="xs:QName" />
> <xs:element name="short" nillable="true" type="xs:short" />
> <xs:element name="string" nillable="true" type="xs:string" />
> </xs:schema>
> The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
> java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
> The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Commented] (AXIS2-5420) AXIS2 can't create custom exception
from received fault message if a custom string definition exists at the
WSDL
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455461#comment-13455461 ]
Hudson commented on AXIS2-5420:
-------------------------------
Integrated in Axis2 #1774 (See [https://builds.apache.org/job/Axis2/1774/])
AXIS2-5420: Applied patch provided by Andy Schmidt. (Revision 1384482)
Result = SUCCESS
veithen :
Files :
* /axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
> AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
> ----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5420
> URL: https://issues.apache.org/jira/browse/AXIS2-5420
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.6.2
> Reporter: Andy Schmidt
> Priority: Minor
> Fix For: 1.6.3
>
> Attachments: InterfaceImplementationTemplate.xsl
>
>
> The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
> <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
> <xs:element name="decimal" nillable="true" type="xs:decimal" />
> <xs:element name="double" nillable="true" type="xs:double" />
> <xs:element name="float" nillable="true" type="xs:float" />
> <xs:element name="int" nillable="true" type="xs:int" />
> <xs:element name="long" nillable="true" type="xs:long" />
> <xs:element name="QName" nillable="true" type="xs:QName" />
> <xs:element name="short" nillable="true" type="xs:short" />
> <xs:element name="string" nillable="true" type="xs:string" />
> </xs:schema>
> The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
> java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
> The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Resolved] (AXIS2-5420) AXIS2 can't create custom exception
from received fault message if a custom string definition exists at the
WSDL
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved AXIS2-5420.
------------------------------------
Resolution: Fixed
Fix Version/s: 1.7.0
Assignee: Andreas Veithen
> AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
> ----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5420
> URL: https://issues.apache.org/jira/browse/AXIS2-5420
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.6.2
> Reporter: Andy Schmidt
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: 1.7.0, 1.6.3
>
> Attachments: InterfaceImplementationTemplate.xsl
>
>
> The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
> <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
> <xs:element name="decimal" nillable="true" type="xs:decimal" />
> <xs:element name="double" nillable="true" type="xs:double" />
> <xs:element name="float" nillable="true" type="xs:float" />
> <xs:element name="int" nillable="true" type="xs:int" />
> <xs:element name="long" nillable="true" type="xs:long" />
> <xs:element name="QName" nillable="true" type="xs:QName" />
> <xs:element name="short" nillable="true" type="xs:short" />
> <xs:element name="string" nillable="true" type="xs:string" />
> </xs:schema>
> The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
> java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
> The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Updated] (AXIS2-5420) AXIS2 can't create custom exception
from received fault message if a custom string definition exists at the
WSDL
Posted by "Andy Schmidt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Schmidt updated AXIS2-5420:
--------------------------------
Attachment: InterfaceImplementationTemplate.xsl
I has been fixed this issue by replacing 'String.class' with 'java.lang.String.class' in line 524 and 794.
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
> AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
> ----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5420
> URL: https://issues.apache.org/jira/browse/AXIS2-5420
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.6.2
> Reporter: Andy Schmidt
> Priority: Minor
> Fix For: 1.6.3
>
> Attachments: InterfaceImplementationTemplate.xsl
>
>
> The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
> <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
> <xs:element name="decimal" nillable="true" type="xs:decimal" />
> <xs:element name="double" nillable="true" type="xs:double" />
> <xs:element name="float" nillable="true" type="xs:float" />
> <xs:element name="int" nillable="true" type="xs:int" />
> <xs:element name="long" nillable="true" type="xs:long" />
> <xs:element name="QName" nillable="true" type="xs:QName" />
> <xs:element name="short" nillable="true" type="xs:short" />
> <xs:element name="string" nillable="true" type="xs:string" />
> </xs:schema>
> The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
> java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
> The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[jira] [Comment Edited] (AXIS2-5420) AXIS2 can't create custom
exception from received fault message if a custom string definition exists
at the WSDL
Posted by "Andy Schmidt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454855#comment-13454855 ]
Andy Schmidt edited comment on AXIS2-5420 at 9/13/12 11:40 PM:
---------------------------------------------------------------
I has been fixed this issue by replacing 'String.class' with 'java.lang.String.class' in line 524 and 794.
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
You can take a look at the attachted file and merge it to your source code. I can't check in.
was (Author: glance):
I has been fixed this issue by replacing 'String.class' with 'java.lang.String.class' in line 524 and 794.
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
> AXIS2 can't create custom exception from received fault message if a custom string definition exists at the WSDL
> ----------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5420
> URL: https://issues.apache.org/jira/browse/AXIS2-5420
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.6.2
> Reporter: Andy Schmidt
> Priority: Minor
> Fix For: 1.6.3
>
> Attachments: InterfaceImplementationTemplate.xsl
>
>
> The .net implementation of the WCF framework delivered me following schema definitions in the wsdl file:
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
> <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
> <xs:element name="decimal" nillable="true" type="xs:decimal" />
> <xs:element name="double" nillable="true" type="xs:double" />
> <xs:element name="float" nillable="true" type="xs:float" />
> <xs:element name="int" nillable="true" type="xs:int" />
> <xs:element name="long" nillable="true" type="xs:long" />
> <xs:element name="QName" nillable="true" type="xs:QName" />
> <xs:element name="short" nillable="true" type="xs:short" />
> <xs:element name="string" nillable="true" type="xs:string" />
> </xs:schema>
> The resulting problem on the side of AXIS2 is that AXIS2 is generating a String class definition from the XSD definition <xs:element name="string" nillable="true" type="xs:string" />. If a custom fault is received AXIS2 creats a custom exception by using reflection and throws a error by invoking line:
> java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);
> The misstake is that the String.class is resolved as the generated class definition from AXIS2 and not java.lang.String. So it will be better to use the full qualified name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org