5,459 questions
0
votes
1
answer
54
views
Error 415 when sending request to Sse subscribe method
I have an application using Java 11, Spring, Apache CXF 3.4.2, Tomcat and Server Sent Events. How do I fix the 415 Unsupported Media Type error that occurs when sending the specified request to the ...
0
votes
0
answers
30
views
Sse subscription method with a specific parameter is not logged
I have an application using Java 11, Spring, Apache CXF 3.4.2, Tomcat and slf4j. The method that serves as the endpoint for subscribing to server-sent events doesn't log any errors. They're visible in ...
0
votes
0
answers
33
views
Apache CXF framework does not correctly handle Provider invoke functions throwing WebServiceException
I am using Apache CXF 4.1.3, the latest version. I have an implementation of a jakarta.xml.ws.Provider<T> interface where my invoke function sometimes needs to return an error.
According to the ...
0
votes
0
answers
38
views
Apache CXF: how to change a SOAP Header value programatically?
I have to change the value of "To" element of the soap:Header, like this:
<To xmlns="http://www.w3.org/2005/08/addressing">https://MY_NEW_SERVER_URL</To>
I created an ...
0
votes
0
answers
89
views
JasperReports ExtensionsEnvironment initialization fails with NoClassDefFoundError in OSGi/CXF environment
I'm getting a NoClassDefFoundError for net.sf.jasperreports.extensions.ExtensionsEnvironment when compiling JasperReports templates in an OSGi environment (using Pax Web/Jetty) with Apache CXF 3.5.5. ...
0
votes
0
answers
27
views
CXF Custom Class name
I need to migrate from Axis2 to CXF and I need some classes to have custom names. They are defined as elements in their xsd with underscores, think my_Enum_Name. CXF makes MYENUMNAME out of those and ...
0
votes
0
answers
37
views
Apache Camel+CXF integration not sending SoapHeader elements in response to SOAP UI
In SOAP XML request got below header wanted same to copied and sent in response
<soapenv:Header>
<TransactionId>54bdfeab-48ca-4497-95a9-0869ed6eabae</TransactionId>
</...
0
votes
0
answers
15
views
JAXB / One Java package per XML Namespace / Is it a spec requirement or an implementation detail?
I'm generating Java classes for my SOAP specification (WSDL files) using wsdl2java. The WSDL references multiple XML namespaces but for some reasons I want to have them all in just one Java package. ...
0
votes
0
answers
68
views
SOAP service with CXF 4.0.6 and Java11 - Upgrade Failed
I have below build.gradle file in my application. And my application has already Generated Java classes with cxf 3.5.4 and application is running fine for more than a year. Now I need to upgrade the ...
0
votes
0
answers
48
views
cxf-codegen-plugin creating portmethods with raw types instead of wrapper request and response objects
I am working on a cxf webservice client and I pull down the wsdl directly in the codegen plugin. Ignore all the urls and namespaces, I changed those for this post. The plugin is configured as such:
...
0
votes
0
answers
45
views
JaxB databinding Error in publishing endpoint using cxf
When I keep my return type of account webservice as string everything goes well. But when I have a custom datatype i.e. GetResponseType, it gives me this error.
[enter image description here](https://...
0
votes
0
answers
23
views
Dynamically load endpoint classes and expose endpoints using CXF
We are using CXF 4.0.5. We have EAR file inside which we have few war files. We deploy the EAR in Wildlfy 30.
We have a requirement to come up with a new war file that will have some of the RESTful ...
1
vote
0
answers
130
views
Apache CXF 4.1.1 JAX-WS endpoint throws NullPointerException at JAXBUtils.scanPackages() on GraalVM native-image
I'm attempting to build and run a Spring Boot 3.4.4 application with Apache CXF 4.1.1 to expose JAX-WS endpoints as a GraalVM 24 native-image on Windows 11.
The native-image compilation completes ...
0
votes
1
answer
143
views
Can't find the request for Observer , Apache CXF Tomcat 10
I am in the process of migrating my Jboss Java 8 application to Tomcat Java 17.
I have already converted all my sources to Jakarta.
I have an issue migrating the service part of my application; I get ...
0
votes
0
answers
40
views
JAXBException: Class Not Recognized in Java 17 Spring (Non-Boot) with Apache CXF
I have a Java Spring (non-Spring Boot) project that we recently upgraded from Java 8 to Java 17. The project uses Apache CXF for web services.
In this project, we rely on some model classes from a ...
0
votes
0
answers
27
views
CXF JAX-RS Endpoint Not Returning XML Response for AppInfo
I am developing a JAX-RS (CXF) API where I expect an XML response when requesting AppInfo. However, the response is
No message body writer has been found for class en.aas.inventoryapp.model.AppInfo, ...
0
votes
1
answer
194
views
Spring boot - Apache cxf logs BeanCurrentlyInCreationException at Runtime
I am setting up a soap service using Spring boot 3.4.3 and Apache cxf 4.1.1.
I use the simpelest setup from Spring initializer only selecting web dependency and apache cxf like below:
<dependencies&...
0
votes
2
answers
141
views
How to prevent Java21 to forcibly add 'ns2' to namespace?
I have a Java application doing SOAP requests to a WebService (which I have no control of). It is currently running on Java8 and I need to make it compatible for both, Java8 and Java21 (not only ...
0
votes
1
answer
76
views
Invocation init method failed;nested exception is java.lang.NoClassDefFoundError:Could not initialize class com.sun.xml.ws.model.WrapperBeanGenerator
I was using cxf-rt-transports-http v2.2.10 dependency on my project, when I update it to cxf-rt-transports-http v3.5.5, all my test cases and code keep giving me below error.
<dependency>
&...
0
votes
1
answer
129
views
Apache cxf v4.0.3 to 4.0.4 making build fail with error to execute goal to generate sources in project
I upgraded apache cxf v4.0.3 to 4.0.4 which is making build fail with below error:
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:4.0.4:wsdl2java (generate-sources) on project
Exit code: 1
...
1
vote
0
answers
129
views
Apache CXF throwing SoapFault instead custom checked exceptions
I am working on project upgrading from JDK 11 to JDK 17 and spring boot 3.3 and to consume soap web services, started using below Apache cxf dependency however custom checked exceptions that are ...
-1
votes
1
answer
434
views
Why is my SOAP modification not working after migrating from CXF 3.5.7 to 4.1.0? Getting a cl is null error
I'm currently migrating a project from Apache CXF version 3.5.7 to 4.1.0, and after the migration, my SOAP message modification logic stopped working. The error I'm encountering is a cl is null ...
0
votes
1
answer
1k
views
Bug: Problem with writing the data; Error writing request body to server
I am struggling with a bug.
This is a spring project using the cxf framework. When calling the API of other microservices, an error occurs. When my request body is large (about 10k), this error will ...
0
votes
0
answers
37
views
camel cxf-client does not handle errors if there is no output in wsdl
if there is no output in wsdl no error is handled if host is unavailable, if host is available - no CamelHttpResponseCode header
wsdl:
<binding name="NumberConversionSoapBinding" type=...
0
votes
0
answers
103
views
configuring cxf-service on a custom port
I use the following stack: karaf 4.2.16, camel 2.24.5(camel-cxf), cxf 3.3.10, I set up a new connector with ssl on jetty.xml, the new port is now available as https://karaf_ip:8189
how to use this ...
0
votes
1
answer
75
views
Following redirects on Service creation with Apache CXF
I'm creating a Service passing an URL that may return 302 Found. How can I instruct CXF to follow the redirects at the Service creation?
Already tried setting a HTTPClientPolicy as an extension on the ...
1
vote
0
answers
180
views
WSDLToJava Error: Could not find jaxws frontend within classpath
I am trying to upgrade to java 17 and spring 6.1.8 and use exec-maven-plugin to call cxf WSDLToJava tool from maven pom.xml with my wsdl file, but I got the following error from mvn command:
mvn -f ...
1
vote
0
answers
166
views
Why do I get Unsupported protocolTLS after upgrading Apache CXF from 3.5.9 to 3.6.4?
After upgrading Apache CXF from version 3.5.9 to 3.6.4, I started encountering the following exception during HTTPS requests:
javax.ws.rs.ProcessingException: java.io.IOException: IOException invoking ...
0
votes
0
answers
101
views
apache-camel 4: route cxf not working :No resource classes found
we have this configuration that work fine in spring projet with java 8, camel 2 and CXF (cxf-rt-rs-client, cxf-rt-frontrnd-javaxrs 3.5.7)
<route id="monitorServiceRoute">
<...
0
votes
1
answer
220
views
How do I use a client certificate with Apache CXF?
I am trying to use my SOAP API with Apache CXF, but the API requires SSL client certificates. I saw that there is some XML-Config you can use, but I would like to do this programmatically. Setting the ...
1
vote
1
answer
59
views
@RolesAllowed in Apache CXF
I'm trying to migrate a JAX-RS application from Jersey to Apache CXF. I'm not using Spring, so I'm trying to configure it by extending javax.ws.rs.core.Application.
I also implemented
public class ...
1
vote
0
answers
175
views
Quarkus cxf 3.8 leads to Unsatisfied dependency for type io.opentelemetry.api.OpenTelemetry and qualifiers [@Default] error
We distribute an internal framework on top of quarkus and we wanted to know if our framework (tipically some extensions) was still compatible with the current LTS quarkus 3.8
In my test app, I ...
0
votes
1
answer
129
views
How to avoid exchange timeout in RedHat Fuse adapter working with Apache Camel and CXF?
I am working with a RedHat Fuse adapter in a Java DSL using Apache Camel and CXF. I am trying to handle relatively large incoming SOAP messages, but I'm running into a timeout issue. The sender then ...
0
votes
0
answers
44
views
Using CXF 3.5.9, how can I force changing soap body tag "ns2" in soap response
this is my request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acc="http://www.example.com/service/">
<soapenv:Header/>
<...
0
votes
1
answer
156
views
Modify CXF soap response to have different prefix and remove namespace
We are migrating from Axis-2 to CXF and trying to have similar responses.
Axis-2 response for soap request
<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://...
1
vote
1
answer
441
views
JAXP09020005: The specified argument 'classpath:/schemas/wsdl' (case sensitive) for 'setRewritePrefix' is not valid
We use jakarta.xml.ws.Provider class (lib version:4.0.2) in our project.
This class chooses the com.sun.xml.ws.spi.ProviderImpl class as the provider, which is related to com.sun.xml:jaxws-rt library (...
0
votes
1
answer
197
views
Migration from org.apache.cxf.jaxrs.swagger -> org.apache.cxf.jaxrs.openapi
After up Spring Boot to version 3 I try to migrate from Swagger to OpenAPI.
Project depends on Apache CXF.
How can I rewrite the swagger configuration?
It was before OpenApi:
@Configuration
public ...
0
votes
1
answer
392
views
Upgrading org.apache.cxf.jaxrs.swagger.Swagger2Feature to user jakarta
I am upgrading an old java service to java 17 and I noticed that it uses org.apache.cxf.jaxrs.swagger.Swagger2Feature in version 3.6.4. The problem with this is that the class Swagger2Feature uses ...
-1
votes
1
answer
74
views
Performance SOAPHandler handleMessage
I want to log all Request / Response data of a WS communication. I must do the logging (its more dumping the data into a RDBMS) asynchronous to not affect the performance of the WS communication ...
0
votes
0
answers
55
views
How to set System variable in a Java app?
I saw an article which suggested me to use--- Only by setting the default JAXB provider to be the glassfish implementation by setting the system property: jakarta.xml.bind.JAXBContextFactory=org....
0
votes
1
answer
721
views
Error property "eclipselink.default-target-namespace" is not supported when eclipselink is on the classpath
I am getting the error "eclipselink.default-target-namespace" is not supported when eclipselink is on the classpath. I found an article https://issues.apache.org/jira/browse/CXF-8960
There ...
3
votes
0
answers
364
views
Understanding Timeout Behavior in Java JDK HttpClient
I've been working with Apache CXF and noticed a change in how timeouts are handled in the newer versions (3.6.x and 4.x). These versions now use the new JDK HttpClient, and I’m trying to verify my ...
0
votes
0
answers
51
views
Apache CXF and ODATA
I am fairly new to Apache CXF and odata. I'm trying to implement ODATA with Apache CXF.
When I try to hit the http://localhost:8080/hello I get 404 not found error. but it doesn't show any error in ...
3
votes
0
answers
568
views
java.lang.IllegalAccessError: class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine
I got the below error when starting the spring application :
java.lang.IllegalAccessError: class org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine tried to access protected method 'void org....
0
votes
1
answer
430
views
CXF roadmap not clear, blocking us with adoption of Jetty 12
I have an issue with CXF (currently 4.0.4) not supporting Jetty 12 and thus blocking us to use it together with Spring Boot 3.2.0+.
I tried to find what is the roadmap for their development, but it ...
0
votes
0
answers
1k
views
Apache CXF - java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
I have migrated my application from Java 8 to Java 17 and upgrading corresponding dependent libraries, including javax to jakarta namespace refactor. However, I am facing issues with Apache CXF ...
1
vote
1
answer
321
views
Apache CXF is unable to handle duplicate localnames
I'm trying to generate Java stubs for the new 3rd party service. It worked before with no problem but recently they have added a new method verifyDataExistence and wsdl2java
got failed with the ...
2
votes
1
answer
2k
views
Getting build error when upgrading org.apache.cxf to version 4 from version 3
I have a java app which used org.apache.cxf -artifactId cxf-rt-frontend-jaxrs with version 3.3.7 but when I try to upgrade it to version 4, I am getting build errors. As earlier code used to work ...
0
votes
1
answer
553
views
Caused by: java.lang.NoSuchFieldError: REFLECTION when upgrading cxf 3.5.5 and spring 5.3.27
Getting following error when ugrading Apache cxf from 3.4.4 to 3.5.5 and spring 5.2.22 to 5.3.27.
Searched stack overflow posts and most point to jaxb versions mismatch. I have below jaxb versions:
...
0
votes
1
answer
115
views
CXF web service deployed with docker compose won't work
After several years of using spring/spring boot/spring cloud. I've decided to learn from basic the Jakarta EE
I have CXF basic JAXRS web service with dummy api that work locally via CLI
(java -jar my-...