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 "Fergal Gavin (Jira)" <ji...@apache.org> on 2022/02/15 11:26:00 UTC

[jira] [Commented] (AXIS2-6015) Java code generated from WSDL does not compile if a "string" element is defined

    [ https://issues.apache.org/jira/browse/AXIS2-6015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17492546#comment-17492546 ] 

Fergal Gavin commented on AXIS2-6015:
-------------------------------------

Hi folks,

We are upgrading our Axis version from 1.6.2 to 1.8.0 and have also hit this issue.

We have raised a couple of other issues and I think there are plans to release a new version of Axis (1.8.1) to address some of those issues. It would be great if the fix for this could also be included in that new release.

Thanks,

Fergal.

Previous Issues Raised:

https://issues.apache.org/jira/browse/AXIS2-6022 - XMLBeans binding extension not in classpath error when generating code using Axis2 1.8.0

==================================================

Possible Resolution to this Issue

[https://github.com/apache/axis-axis2-java-core/blob/master/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl]

/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
@@ -59,9 +59,9 @@
         protected org.apache.axis2.description.AxisOperation[] _operations;
 
         //hashmaps to keep the fault mapping
-        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,String> faultExceptionNameMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,String>();
-        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,String> faultExceptionClassNameMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,String>();
-        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,String> faultMessageMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,String>();
+        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,java.lang.String> faultExceptionNameMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,java.lang.String>();
+        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,java.lang.String> faultExceptionClassNameMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,java.lang.String>();
+        private java.util.Map&lt;org.apache.axis2.client.FaultMapKey,java.lang.String> faultMessageMap = new java.util.HashMap&lt;org.apache.axis2.client.FaultMapKey,java.lang.String>();

> Java code generated from WSDL does not compile if a "string" element is defined
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-6015
>                 URL: https://issues.apache.org/jira/browse/AXIS2-6015
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>         Environment: Axis 1.8.0 (adb databinding)
> OpenJDK 17
> Maven 3.8.1
> Eclipse 2021-09
>            Reporter: David
>            Priority: Major
>
> If a "string" element is defined in the WSDL, these maps found in the generated client stub will try to use that local String class, instead of java.lang.String:
> {code:java}
>   // hashmaps to keep the fault mapping
>   private java.util.Map<org.apache.axis2.client.FaultMapKey, String> faultExceptionNameMap =
>       new java.util.HashMap<org.apache.axis2.client.FaultMapKey, String>();
>   private java.util.Map<org.apache.axis2.client.FaultMapKey, String> faultExceptionClassNameMap =
>       new java.util.HashMap<org.apache.axis2.client.FaultMapKey, String>();
>   private java.util.Map<org.apache.axis2.client.FaultMapKey, String> faultMessageMap =
>       new java.util.HashMap<org.apache.axis2.client.FaultMapKey, String>();{code}
> If I replace these String with java.lang.String, the project compiles fine.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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