cxf

CXF client exception: Interceptor for {XXX} has thrown exception, unwinding now

社会主义新天地 提交于 2019-12-21 07:14:22
问题 I am encountering this following CXF exception: warning: Interceptor for {http://example.com/wsdl/esc/2011-12-12/}AmazonEC2#{http://example.com/wsdl/esc/2011-12-12/}NewDescribeImages has thrown exception, unwinding now java.lang.NullPointerException at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(StartBodyInterceptor.java:59) at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(StartBodyInterceptor.java:37) at org.apache.cxf.phase

Apache Camel: RouteBuilder with CxfEndpoint

你。 提交于 2019-12-21 05:17:17
问题 Hello! I'm trying to implement a Camel route with Java DSL and RouteBuilder. I want to send from a timer endpoint to a cxf endpoint. Code: public class MyRoute extends RouteBuilder { @Override public void configure() { CamelContext camelContext = getContext(); CxfEndpoint cxfEndpoint = new CxfEndpoint(); cxfEndpoint.setAddress("http://localhost:8088/interface"); cxfEndpoint.setWsdlURL("wsdl/contract.wsdl"); cxfEndpoint.setCamelContext(camelContext); cxfEndpoint.setDataFormat(DataFormat

How to pick CXF over Metro on Glassfish

佐手、 提交于 2019-12-21 04:42:35
问题 I'm having the following problem (reported there by someone else) when running my enterprise application under Glassfish. Under Jetty it works fine. javax/xml/ws/spi/Provider mentions creating a META-INF/services/javax.xml.ws.spi.Provider resource, but this is already supplied with CXF and creating an additional resource file does not solve this problem under Glassfish. Does anyone know how to ensure that CXF is picked up under GlassFish? (I'm using a Maven Multi-modules project with CXF

externally create jaxb annotations for class

落爺英雄遲暮 提交于 2019-12-21 02:17:52
问题 So, usually I apply JAXB annotations in the code as follows: package com.example; @XmlRootElement(name = "Foo", namespace = "example.com") @XmlType(name = "Foo", namespace = "example.com") public class Foo { ... } Foo is a java class that is used to communicate with web services (via Spring/CXF). The above annotations, help generate the XML Schema in the wsdl appropriately. I have hit a situation where I can not modify the class itself, but I can provide an jaxb external binding file to the

Generating web service proxy classes using wsdl2java/Apache CXF

删除回忆录丶 提交于 2019-12-20 20:40:51
问题 I'm trying to generate a web service proxy using the wsdl2java tool that comes with Apache CXF. The generation itself seems to go just fine, but there are some errors in the generated files, a non-existing constructor is called. The file offers a solution: //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. So I set out to download and install the 2.2 version of the

Closing JAX-RS StreamingOutput's OutputStream

…衆ロ難τιáo~ 提交于 2019-12-20 19:41:32
问题 Should the StreamingOutput 's OutputStream be closed by the implementing class? The java-doc does not give any recommendations. I guess it just delegates to the underlying ServletOutputStream which means it should not be closed, but my guess might be wrong :) Also the javadoc makes a reference to the MessageBodyWriter interface where it's explicitly said that the output stream must not be closed. https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/StreamingOutput.html 回答1: Being unable to

401 error when consuming a Web service with HTTP Basic authentication using CXF

自作多情 提交于 2019-12-20 18:34:30
问题 I'm trying to consume a remote Web service that uses HTTP basic authentication, using Apache CXF, within a JUnit test. The error I am getting is: javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://localhost:8080/services/MyService?wsdl. It failed with: Server returned HTTP response code: 401 for URL: http://localhost:8080/services/MyService?wsdl. at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:151) at com.sun.xml.internal.ws.wsdl

CXF - Wsdl2java - the XX property is already defined

假如想象 提交于 2019-12-20 16:49:17
问题 I use CXF to generate client class to access web service server. The web service are based on WCF (.NET). When I call wsdl2java, I have the following error : The id property is already defined. use <jaxb:property> to resolve this conflict. The following location matches the above error : http://*****/WcfDemandService.svc?xsd=xsd2 [0,0] This error does not appear if I ask xmlbeans databinding (use "db xmlbeans" option). Is there any way to generate classes with JAXB databinding? 回答1: This type

exception when trying to call webservice

微笑、不失礼 提交于 2019-12-20 12:08:36
问题 I am getting the below exception when trying to call service from SOAPUI . When I open the endpoint in browser, it displays the wsdl fine. WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://contract.premsisc.usst.com/}PaidClaimFacadeService has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Message part {http://contract.premsisc.uss`enter code here`t.com/}findPaidClaims was not recognized. (Does it exist in service WSDL?) at org.apache.cxf.interceptor

How do I represent dates without the timezone using Apache CXF?

若如初见. 提交于 2019-12-20 10:36:09
问题 I have a WSDL that specifies an element's type to be xs:date. When I use Apache CXF to generate the Java classes, it renders the variable as an javax.xml.datatype.XMLGregorianCalendar (all good so far). When CXF renders an XML document containing this, it renders it in this form (where -06:00 represents the time zone): 2000-01-18-06:00 How can I configure CXF not to render the timezone? 回答1: By default wsdl's xsd:date gets mapped to XMLGregorianCalendar . If this is not what you want then if