cxf

CXF Bus - Add HttpConduitFeature with custom timeouts

泄露秘密 提交于 2021-02-07 03:38:08
问题 I am trying to configure the CXF Bus, with common timeouts for all clients. For that, I am using HttpConduitFeature and adding it to the Bus during the initial configuration as below: @Configuration public class CxfContext { @Autowired private SoapConfigurations soapConfigurations; @Bean public Bus bus() { SpringBus b = new SpringBus(); List<Feature> features = ImmutableList.<Feature> builder() // .add(loggingFeature()) // .add(conduitFeature()) // .build(); b.setFeatures(features); return b;

CXF Bus - Add HttpConduitFeature with custom timeouts

依然范特西╮ 提交于 2021-02-07 03:33:51
问题 I am trying to configure the CXF Bus, with common timeouts for all clients. For that, I am using HttpConduitFeature and adding it to the Bus during the initial configuration as below: @Configuration public class CxfContext { @Autowired private SoapConfigurations soapConfigurations; @Bean public Bus bus() { SpringBus b = new SpringBus(); List<Feature> features = ImmutableList.<Feature> builder() // .add(loggingFeature()) // .add(conduitFeature()) // .build(); b.setFeatures(features); return b;

Error handling with CXF interceptors - changing the response message

馋奶兔 提交于 2021-02-06 11:34:19
问题 I'm trying to handle errors coming from my backend. The handleMessage() is called if an error occurs but the content is an instance of XmlMessage. I would like to change it to my own response - just set the response code and add some message. I haven't found any proper documentation which could tell me how to do this... These axamples are for REST but I'd like to manage this thing in SOAP too. interceptor public class ErrorHandlerInterceptor extends AbstractPhaseInterceptor<Message> { public

Custom package names cxf-codegen-plugin

我是研究僧i 提交于 2021-02-05 20:09:40
问题 Imagine this scenario. I have a wsdl file with namespace a/b/c and it imports another wsdl whose namespace is m/n/o. Unfortunately, both of them have same ComplexTypes XYZ defined in them. Now, when I use cxf-codegen-plugin to generate Java code and use custom package name "com.qsrs.uvw", only one class is retained in the final code that is generated. Can someone help me out here? 回答1: If you want to generate package depending on the namespace here is the solution: <plugin> <groupId>org

Custom package names cxf-codegen-plugin

我的未来我决定 提交于 2021-02-05 20:07:25
问题 Imagine this scenario. I have a wsdl file with namespace a/b/c and it imports another wsdl whose namespace is m/n/o. Unfortunately, both of them have same ComplexTypes XYZ defined in them. Now, when I use cxf-codegen-plugin to generate Java code and use custom package name "com.qsrs.uvw", only one class is retained in the final code that is generated. Can someone help me out here? 回答1: If you want to generate package depending on the namespace here is the solution: <plugin> <groupId>org

howto modify a webservice request using CXF interceptors with org.w3c.dom.Node

女生的网名这么多〃 提交于 2021-02-04 15:53:35
问题 Using a CXF Interceptor I'd like to append some Node to the xml being sent out to the server. I've created a interceptor (see below) that picks up the message as DOM Node, modifies it and writes it back to the message object. Unfortunately the code does not work as expected - the XML sent to the server does not contain the 'magicWord'. IMHO I'm using the wrong phase for this. So the question is: how can I modify an outgoing webservice request using the org.w3c.dom.Node syntax? package dummy;

A security error was encountered when verifying the message, Error reading XMLStreamReader

Deadly 提交于 2021-01-29 14:23:56
问题 I am spinning trying to figure it out what is wrong in my case. I need to decrypt request from client. Keystore should be correct as I have tested with spring WS and there is works (but i can not use spring WS due to soapAction which clicent can not provide in header). This is my WSS4JStaxInInterceptor: @Bean public WSS4JStaxInInterceptor wss4JStaxInInterceptor() throws Exception { Properties properties; Crypto crypto = CryptoFactory.getInstance(wss4jInProperties()); WSSSecurityProperties

CXF - webservice endpoint has changed, WSDL has not

拜拜、爱过 提交于 2021-01-29 11:25:43
问题 My application used CXF WSDL2JAVA to generate the Java classes from a client supplied WSDL. They've now changed their webservice to have 3 additional string fields in the response. It would be a bit of rework for us to regenerate the java classes, but we're getting an exception: javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (newElement) Is there a way to get CXF to ignore the extra elements in the response? 回答1: If you add an endpoint property of: "set-jaxb

java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException

泄露秘密 提交于 2021-01-29 10:35:53
问题 I'm writing an Apache Camel Spring Boot application to consume and produce to an AMQP/JMS broker. I can successfully run the application via IntelliJ, but when I try to run the application via command line, I get the ProcessingException. When I include javax.ws.rs-api version 2.0.1 in my pom file, I then get java.lang.ClassNotFoundException: javax.ws.rs.client.ClientException I've tried several different versions of javax.ws.rs-api and Apache CXF without success. I cant figure out the

Disable chunked transfer-encoding for JAX-WS Client in Wildfly 8

纵饮孤独 提交于 2021-01-29 05:58:24
问题 I'm writing a SOAP client using JAX-WS on Wildfly 8 . When sending small messages to my server, the client works properly. When the message gets too large, a header "Transfer-Encoding: chunked" gets added and the server stops accepting the messages. Since I have no control over the server-part, I'm looking for a way to tell Wildfly to stop chunking large messages. I've found a solution for WebSphere here: Disable chunked transfer-encoding for JAX-WS Client in WebSphere Application Server 8.5