cxf

Using wsdl2java to generate stub with PROPER async support

可紊 提交于 2020-01-04 01:51:51
问题 Lets say I have a service with ONLY one method: int generateRandomNumbers() . Is is possible to use wsdl2java to generate a stub with proper async support? For example, the generated class should has the following methods/messages: int generateRandomNumbers() int generateRandomNumbers_Async(callback) I know how to use wsdl2java to generate stubs with the async messages. However, this only works if the service understands the async messages. What I mean by proper async support is that

Slow initialization of apache cxf client

 ̄綄美尐妖づ 提交于 2020-01-03 16:51:37
问题 I'm using wsdl2java generated classes and this code: MyService f = new MyService(); MyServicePortType type = f.getMyServicePortType(); Each of these calls is taking up to 30 seconds. Why is that? 回答1: After hours of googling and tinkering the problem was in how scheme files were referenced: although WSDL and XSD were locally stored there was still some referenced to w3.org that looked like this: <!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"

CXF BusException No DestinationFactory for namespace http://cxf.apache.org/transports/http

耗尽温柔 提交于 2020-01-03 10:59:10
问题 I'm trying to stand up the [basic cxf rs example][1], but with my own service impl which is even simpler and all my methods return strings. When I try to run this server I get this exception I built a clean project so I'm starting fresh.. Master pom http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <name>Tests</name> <groupId>com.crush</groupId> <artifactId>tests</artifactId> <version>1.0</version> <packaging>pom</packaging> <properties> <cxf.version>2.7.11</cxf

“Can not initialize the default wsdl from…” — Why?

荒凉一梦 提交于 2020-01-03 07:29:06
问题 My pom.xml contains the following to auto generate a client for a working web service having the WSDL specified below: <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.3.1</version> <executions> <execution> <id>generate-sources</id> <configuration> <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>${basedir}/src/main/wsdl/myclient.wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> <extraarg>

“Can not initialize the default wsdl from…” — Why?

烂漫一生 提交于 2020-01-03 07:29:06
问题 My pom.xml contains the following to auto generate a client for a working web service having the WSDL specified below: <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.3.1</version> <executions> <execution> <id>generate-sources</id> <configuration> <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>${basedir}/src/main/wsdl/myclient.wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> <extraarg>

How can I make JAXB to fail when a mandatory element is missing?

天涯浪子 提交于 2020-01-03 04:34:10
问题 I'm trying to add some forward compatibility to a Java application calling a Web Service at work, but JAXB seems to behave backward on the subject... The application use the wsdl2java Maven plugin to generate a CXF Web Service client from a WSDL. It then uses that generated client to communicate with a Web Service (through SOAP over JMS). When the Web Service sends an unknown element in its response to a call, JAXB fails with an "unexpected element" error, which is understandable, and XML

Cannot create a secure XMLInputFactory

纵然是瞬间 提交于 2020-01-03 03:35:08
问题 Hello all, My application is based on PTV xServer modules and it is used of calculating best route and trip plan. It is a web application and I am using tomcat for it. So while running my application with tomcat it works find but when I executed this application with "main" method then I am getting error while calling xServer modules services/methods. com.ptvag.jabba.core.exception.UnexpectedException: Cannot create a secure XMLInputFactory at com.ptvag.jabba.core.exception.ExceptionAnalyzer

How to configure Camel CXF with Basic authentication

余生颓废 提交于 2020-01-03 02:36:06
问题 I'm new to Apache Camel and CXF, I'm trying to create a route for querying a remote WS which requires Basic Authentication and to specify the Soap Action header. I was able to achieve the same using camel HTTP component but i needed the same with camel CXF in java DSL Can anyone guide us in fixing the same 回答1: If you want to use camel-cxf component to setup the Basic authentication, you need do some configuration on the CxfEndpoint just like this. CxfEndpoint cxfEndpoint = camelContext

How to Consume a WebService using CXF in Eclipse

偶尔善良 提交于 2020-01-03 02:25:27
问题 I am trying to consume a WEBSERVICE (http://www.detecno.mx/WCFTimbrador/DetecnoPac.svc?wsdl) using Eclipse and Apache CXF. I already downloaded the latest Apache CXF version (2.5.2) from http://cxf.apache.org/ and already configured its location in Eclipse Preferences > Web Services > CXF 2.x Preferences When trying to create the new Web Service Client in my project, I can't select Apache CXF as the WS runtime (OK button is disabled) My project is not a dynamic web project, does it have to do

WebService--CXF以及CXF与Spring的整合(jaxws:server形式配置)

心已入冬 提交于 2020-01-02 15:24:24
前言:好记性不如烂笔头,写博客的好处是,以前接触的东西即便忘记了,也可以从这里查找。   Apache CXF 是一个开源的 Services 框架,CXF 帮助您利用 Frontend 编程 API 来构建和开发 Services 。可以与Spring进行快速无缝的整合。灵活的部署,可以运行在Tomcat,Jboss,Jetty(内置),IBMWS,BeaWL上面。   更多CXF介绍:http://www.ibm.com/developerworks/cn/education/java/j-cxf/ 一、cxf发布服务的类 用两个不同的类发布应用:   a. ServerFactoryBean -- FacotryBean   b. JaxWsServerFactoryBean(建议使用此类) 服务端与客户端类的使用映射关系如下图所示: 二、使用ServerFactoryBean类发布标准的webservice服务   下载cxf安装包apache-cxf-2.4.2,里面lib下jar包以供项目所有。 1.服务端 a.新建web项目,加入cxf的jar包 b.定义webservice的接口 package com.wp.service; import javax.jws.WebService; @WebService public interface HelloWs {