cxf

maintaining session in REST web service

我的梦境 提交于 2019-12-13 07:12:44
问题 I have a COTS application(PLM application) which has provided few SOAP APIs to access. Since this SOAP API is highly complex, we are developing a easy to use REST wrapper service. Before invoking any API in my COTS application, authentication API needs to be invoked. In my REST wrapper web service, I have a login resource which invokes COTS SOAP login API. To keep things simple for my API users, I store the logged in user details in user session. In every other REST resoruces, I retrieve the

Change the response character set on CXF web service

一个人想着一个人 提交于 2019-12-13 06:13:29
问题 We inherited a web service that was written with Apache CXF. A text field in the response contains characters such as single quotes and "en" dashes (ascii 150). These show up in the response as squares (using SoapUI) or question marks. The text is coming from an Oracle db which is set to WE8MSWIN1252 charset. I am thinking I need to set the encoding/charset of the web service response to be match (i.e. Windows-1252) but can't find a place to do that. I could XML-encode the text (e.g. so those

Jboss start exception due to apache CXF?

痞子三分冷 提交于 2019-12-13 04:43:44
问题 1) Not installing optional component org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation 2) Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf

How to disable chunking in cxf-jaxrs client

喜欢而已 提交于 2019-12-13 04:43:08
问题 I need to contact a proprietary http service, not supporting chunks. I started using as documented here so i create the client this way: Client client = ClientBuilder.newBuilder().newClient(); WebTarget target = client.target("http://localhost:8080/rs"); The problem is how to configure the client, how to disable chunking. The way documented here doesn't work for me (wrong classes). Thanks in advance 回答1: Rather that using jaxrs standard Client you can use org.apache.cxf.jaxrs.client.WebClient

java.lang.LinkageError while using HttpServletRequest

夙愿已清 提交于 2019-12-13 04:25:44
问题 Just want to use HttpServletRequest in my Rest service. Get the follow error page when try to do GET request: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest" I use apache-karaf-4.1.5 as a container, apache-cxf for JAX-RS implementation. And I marked javax.servlet-api as provided in pom.xml: <dependency>

SAML2 assertion with home defined AttributeBean in CXF

你说的曾经没有我的故事 提交于 2019-12-13 04:06:50
问题 I’ve been working with Apache CXF and WSS4J to implement a SecurityTokenService. Using a “CustomClaimsHandler” implementing "org.apache.cxf.sts.claims.ClaimsHandler" I can create a SAML token containing this kind of attributes : <saml2:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"> <saml2:AttributeValue xsi:type="xs:string">admin</saml2:AttributeValue> </saml2:Attribute> The thing is I am now

No such method Error when accessing JAX RS CXF web service

ⅰ亾dé卋堺 提交于 2019-12-13 02:37:58
问题 I am getting no such method error when I try to access my JAX RS CXF web service. These are the jars that I have added in the build path: cxf-core-3.1.2.jar cxf-rt-frontend-jaxrs-3.1.2.jar cxf-rt-rs-client-3.1.2.jar cxf-rt-rs-extension-providers-3.1.2.jar cxf-rt-rs-extension-search-3.1.2.jar cxf-rt-transports-http-3.1.2.jar httpclient-4.4.1.jar httpcore-4.4.1.jar httpcore-nio-4.4.1.jar javax.ws.rs-api-2.0.1.jar jcl-over-slf4j-1.7.12.jar jettison-1.3.7.jar spring-aop-4.1.6.RELEASE.jar spring

is it possible to have same class for both soap and rest in cxf

不打扰是莪最后的温柔 提交于 2019-12-13 02:17:59
问题 I am trying to configure a way to serve same class for soap and rest in different paths. I am following the project structure described here spring-cxf-example link with the code downloaded from SVN project link Following is the class package ar.com.pabloExample.services; import javax.jws.WebService; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.core.Response; @WebService(endpointInterface = "ar.com.pabloExample.services.HelloWorldService") public class

Can really I wire a reference to the web service into an interceptor?

为君一笑 提交于 2019-12-13 01:12:30
问题 I'm new to both CXF and Web Services. So CXF creates a new interceptor stack for each request according to docs. I want to snag the SOAP, payload and all, and have it available for persistence to an exception table. I've written an interceptor based on LoggingInterceptor that will likely work fine and my IDE says the wiring is fine, my concern is threading and / or when the Web Service is created. For some reason I have this nagging doubt that this is going to work and that it has to do with

cxf request scoped bean not working in unit test (soap)

对着背影说爱祢 提交于 2019-12-13 00:52:46
问题 CXF soap application, using following versions: springBootVersion = 1.2.3.RELEASE springVersion = '4.1.6.RELEASE' cxfVersion = '3.1.0' junitVersion = '4.12' I have a spring bean with a request scope: @Component @Scope( value=WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS ) public class RequestScopedClass which I fetch dynamically from ApplicationContext in my CXF endpoint implementation: @Component @WebService(endpointInterface = "ch.xyz.PaymentServiceInterface"