[jira] [Created] (CXF-8838) Regression in cxf-codegen-plugin wsdl2java 4.0.0

2023-04-18 Thread Marko Kocic (Jira)
Marko Kocic created CXF-8838:


 Summary: Regression in cxf-codegen-plugin wsdl2java 4.0.0
 Key: CXF-8838
 URL: https://issues.apache.org/jira/browse/CXF-8838
 Project: CXF
  Issue Type: Bug
  Components: Tooling
Affects Versions: 4.0.0
Reporter: Marko Kocic
 Fix For: 4.0.1
 Attachments: test.zip

When trying to generate Java source code using wsdl2java from 
cxf-codegen-plugin 4.0.0, the generation fails if there are element names that 
differs only in underscore `_` character.

 

Attached is the minimal [^test.zip] project that demonstrates the issue.

In the attached wsdl file there are two elements that differ only in underscore 
in the name:
{code:java}

 {code}
When run using the 4.0.0 version of the plugin, building gives the error "Two 
declarations cause a collision in the ObjectFactory class.". Exeprpt from the 
build log:
{code:java}
[WARNING] Exception in thread "main" org.apache.cxf.tools.common.ToolException: 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [896,16]: Two declarations cause a collision in the ObjectFactory class.
[WARNING] 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [919,16]: (Related to above error) This is the other declaration.
[WARNING] 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [878,16]: Two declarations cause a collision in the ObjectFactory class.
[WARNING] 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [1006,16]: (Related to above error) This is the other declaration.
[WARNING] 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [879,16]: Two declarations cause a collision in the ObjectFactory class.
[WARNING] 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [1007,16]: (Related to above error) This is the other declaration.
[WARNING]
[WARNING]       at 
org.apache.cxf.tools.common.ToolErrorListener.throwToolException(ToolErrorListener.java:87)
[WARNING]       at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:158)
[WARNING]       at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:402)
[WARNING]       at 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
[WARNING]       at 
org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
[WARNING]       at 
org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
[WARNING]       at 
org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
[WARNING]       Suppressed: org.apache.cxf.tools.common.ToolException: 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl
 [896,16]: Two declarations cause a collision in the ObjectFactory class.
[WARNING]               ... 7 more
[WARNING]       Caused by: com.sun.istack.SAXParseException2publicId: 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl;
 systemId: 
file:/C:/src/is/wso2/AS/Libraries/TSS.IA.S4.Library/src/main/resources/wsdl/Z_BAPI_MATERIAL_GET_ALL.wsdl;
 lineNumber: 896; columnNumber: 16; Two declarations cause a collision in the 
ObjectFactory class.
[WARNING]               at 
com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:56)
[WARNING]               at 
com.sun.tools.xjc.generator.bean.ObjectFactoryGeneratorImpl.populate(ObjectFactoryGeneratorImpl.java:161)
[WARNING]               at 
com.sun.tools.xjc.generator.bean.PublicObjectFactoryGenerator.populate(PublicObjectFactoryGenerator.java:29)
[WARNING]               at 
com.sun.tools.xjc.generator.bean.BeanGenerator.(BeanGenerator.java:242)
[WARNING]               at 
com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:141)
[WARNING]               at 
com.sun.tools.xjc.model.Model.generateCode(Model.java:258)
[WARNING]               at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:255)
[WARNING]               at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
[WARNING]               at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:445)
[WARNING]               at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:711)
[WARNING]               at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:259)
[WARNING]               at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:156)
[WARNING]               ... 5 more
[WARNING]       Suppressed: org.

[jira] [Resolved] (CXF-8833) GZIPInInterceptor, when processing HTTP 204 empty response, throws EOFException

2023-04-18 Thread Andriy Redko (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko resolved CXF-8833.
---
Resolution: Fixed

> GZIPInInterceptor, when processing HTTP 204 empty response, throws 
> EOFException
> ---
>
> Key: CXF-8833
> URL: https://issues.apache.org/jira/browse/CXF-8833
> Project: CXF
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.5.5
>Reporter: John Yin
>Assignee: Andriy Redko
>Priority: Major
> Fix For: 3.6.0, 4.0.1, 3.5.6, 3.4.11
>
>
> It is common that with HTTP 204, no response body is returned.  But the 
> org.apache.cxf.transport.common.gzip.GZIPInInterceptor generates a 
> EOFException which results a Fault.  Should it catch and handle the exception 
> since no response is expected for HTTP 204?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CXF-8837) Allow P11 RSA Keys within JwsUtils

2023-04-18 Thread Colm O hEigeartaigh (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh updated CXF-8837:
-
Fix Version/s: 3.6.0
   3.5.6

> Allow P11 RSA Keys within JwsUtils
> --
>
> Key: CXF-8837
> URL: https://issues.apache.org/jira/browse/CXF-8837
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS Security
>Affects Versions: 3.3.4, 4.0.0
>Reporter: Jan Bernhardt
>Assignee: Colm O hEigeartaigh
>Priority: Minor
> Fix For: 3.6.0, 4.0.1, 3.5.6
>
>
> As discussed on the [mailing 
> list|[https://lists.apache.org/thread/95hcbjqy7z7m7qhz407y9o36gw2ql2xo],] the 
> current implementation within `JwsUtils` only accepts RSA keys coming from a 
> local keystore file. RSA keys from other resources like a HSM via PKCS11 
> interface are getting rejected currently for no reason.
> The code needs some refactoring to not limit the support to local keystores.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (CXF-8837) Allow P11 RSA Keys within JwsUtils

2023-04-18 Thread Colm O hEigeartaigh (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh reassigned CXF-8837:


Assignee: Colm O hEigeartaigh  (was: Jan Bernhardt)

> Allow P11 RSA Keys within JwsUtils
> --
>
> Key: CXF-8837
> URL: https://issues.apache.org/jira/browse/CXF-8837
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS Security
>Affects Versions: 3.3.4, 4.0.0
>Reporter: Jan Bernhardt
>Assignee: Colm O hEigeartaigh
>Priority: Minor
> Fix For: 4.0.1
>
>
> As discussed on the [mailing 
> list|[https://lists.apache.org/thread/95hcbjqy7z7m7qhz407y9o36gw2ql2xo],] the 
> current implementation within `JwsUtils` only accepts RSA keys coming from a 
> local keystore file. RSA keys from other resources like a HSM via PKCS11 
> interface are getting rejected currently for no reason.
> The code needs some refactoring to not limit the support to local keystores.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)