cxf

changing client timeout for a particular request in Apache CXF

喜欢而已 提交于 2019-12-12 12:26:12
问题 I have to set a different timeout in Apache cxf request based on some condition in my request my current code looks like this <http-conf:client ReceiveTimeout="120000" AcceptEncoding="gzip, deflate"/> Now is there any way to change this receive timeout for a particular request based on some condition. 回答1: Current we don't provide this kind of setting in CXF. If you still want to do that, you can get the HttpConduit from the CXF client proxy and set the HTTPClientPolicy directly to the

spring-boot with tomcat and cxf-servlet

廉价感情. 提交于 2019-12-12 12:10:34
问题 I'm trying to stand up an embedded Tomcat with spring-boot. I want to use CXF for a set of web services in the app but I can not figure out how to stand up the CXF servlet. My Main class looks like this... @Configuration @EnableAutoConfiguration @ComponentScan(basePackages={"com.connecture.services.documentservice.webservice"}) public class Application { public static void main(String[] args) { SpringApplication.run(new Class[] { Application.class, CfxInitializer.class }, args); } @Bean

Missing cxf jar: Please select the cxf home directory

五迷三道 提交于 2019-12-12 12:09:27
问题 I am learning creating a SOAP web service in Eclipse Luna. I downloaded the binary version CXF and extracted it. Now, eclipse gives me the above error when I try to add the CXF runtime. I checked the extracted folder but there is no CXF jar file as such. I googled it but could not find it. Do I have to download only a specific version that would be compatible with LUNA . Moreover, I was also able to install 2 out of 3 eclipse plugins(Checkstyle, PMD). I did not get the 3rd one ( Subversion

java tool to create client-side stubs for REST service

﹥>﹥吖頭↗ 提交于 2019-12-12 10:55:04
问题 Assume I'm given a WADL for a REST webservice, and I've been able to put together a bunch of requests in SoapUI (I'm no stranger to REST or SOAP) - and I've managed to get the wadl2java tool to auto-generate and compile the classes from my WADL. Is there any tutorial out there demonstrating how to use these classes to access my REST webservice? I'd ideally like to avoid large frameworks (Spring may be nice, but I'd like to keep my dependencies to a minimum at the moment). This url offers a

How to resolve collision in the ObjectFactory on wsdl2java?

送分小仙女□ 提交于 2019-12-12 10:36:43
问题 I'm using CXF and wsdl2java to autogenerate webservice classes. Problem: somehow the webservice I want to connect to has duplicate names for some elements: Two declarations cause a collision in the ObjectFactory class The xsd is like: <xs:schema targetNamespace="http://thenamespace"> <xs:complexType name="ViolatingName"> ... </xs:complexType> <xs:element name="ViolatingName" nillable="true" type="tns:ViolatingName"/> </xs:schema> The xsd itself is imported inside the wsdl that is used to

Change the prefix in CXF with interceptor

半世苍凉 提交于 2019-12-12 08:59:32
问题 I am trying to change <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> to <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> I am using Mule and CXF. We are exposing a SOAP service and the wsdl is from a legacy system (we imported it and generated the classes). It is necessary to change the prefix from 'soap' to just 's'. I see that this is possible with an Interceptor, but for some reason I cant make it work. Here is the code for my

Add SecuritySchemeDefinition to Swagger2Features in CXF

笑着哭i 提交于 2019-12-12 06:22:24
问题 I want to enable authorize button in my Swagger v2 API REST Documentation. How can I define api_key security with Swagger2Features? 回答1: swagger2Feature.setSecurityDefinitions( Collections.singletonMap("apiKeySecurity", new io.swagger.models.auth.ApiKeyAuthDefinition())); Make sure to use the latest CXF version as there were some bugfixes in this area. 来源: https://stackoverflow.com/questions/45034082/add-securityschemedefinition-to-swagger2features-in-cxf

Apache CXF wsdl2java: WSDL file returned different from the original one

半腔热情 提交于 2019-12-12 06:19:06
问题 I received a WSDL file from a customer describing a web service they wanted me to offer. Using Apache CXF 3.0.4 and wsdl2java the WSDL file was translated into fully annotated Java code from which I implemented the service. Everything went well until the customer started testing the service using the WSDL file returned from my server via a URL of the following pattern: http://never.mind/SomeService?wsdl When this WSDL URL is loaded in SoapUI I see request XML looking similar to this: <soapenv

Apache cxf jaxrs server ServiceConstructionException

为君一笑 提交于 2019-12-12 05:40:56
问题 Hi i have write jaxrs apache cxf rest server .previously it works fine.suddenly it didn't start and it gives this error. Caused by: java.lang.ClassCastException: org.apache.cxf.jaxrs.model.wadl.WadlGenerator cannot be cast to javax.ws.rs.container.ContainerRequestFilter at org.apache.cxf.jaxrs.provider.ServerProviderFactory.createWadlGenerator(ServerProviderFactory.java:104) at org.apache.cxf.jaxrs.provider.ServerProviderFactory.<init>(ServerProviderFactory.java:95) at org.apache.cxf.jaxrs

simple web service: putting endpointname, servicename, etc. together

浪子不回头ぞ 提交于 2019-12-12 05:29:57
问题 I'm trying Apache's simplest "Hello World" webservice (http://cxf.apache.org/docs/a-simple-jax-ws-service.html); I have purposely altered it a little to learn more about how to do things instead of just copying all their code. My service implementation specifies the interface it implements in the package "hw": @WebService(endpointInterface = "hw.HelloWorld", serviceName = "HelloWorld") The program that "publishes" the web service (which I gather means operates as the server for it) has the