cxf

Java client for SOAP web service with NTLM authentication

淺唱寂寞╮ 提交于 2019-12-30 09:32:42
问题 I spent many days and nights trying to find a proper Java framework that could connect to Microsoft Dynamics CRM which uses Negotiate/NTLM authentication. I tried all existing suggestions on Stackoverflow and other resources with JAX-WS, Axis2, CXF with various HTTP protocol handlers. No one of them worked as expected. The best approach currently is Axis2/commons-httpclient-3.1, where I can trace at least all three phases with NTLM digest, however the target IIS still refuses the

How do i modify HTTP headers for a JAX-WS response in CXF?

↘锁芯ラ 提交于 2019-12-29 09:20:09
问题 I have been working on developing CXF web services that sit behind a security proxy which asks for HTTP basic authentication prior service invocation. These services communicate between each other and require authentication for both request and response. So far i have been able to set HTTP basic authentication via the HTTPConduit for the request like so: Client client = ClientProxy.getClient(port); HTTPConduit conduit = (HTTPConduit) client.getConduit(); AuthorizationPolicy

Which maven2 artifacts are necessary to build a WS with CXF and Spring?

南楼画角 提交于 2019-12-29 08:08:09
问题 I'm trying to build a WS with Spring 3.0 and CXF. I'm following the steps of this article http://www.ibm.com/developerworks/library/ws-pojo-springcxf/ But in that article, the authors assume that you have cxf installed. I'd like to embed CXF in my .war. Thanks in advance. 回答1: Normally, just depend on cxf-rt-frontend-jaxws and cxf-rt-transport-http. Pretty much the rest of the stuff needed would be pulled in transitively from those. (might not even need cxf-rt-transport-http) That would cover

CXF: WARNING: No message body writer has been found for response class ArrayList

血红的双手。 提交于 2019-12-29 08:06:06
问题 I'm getting the following error: WARNING: No message body writer has been found for response class ArrayList. On the following code: @GET @Consumes("application/json") public List getBridges() { return new ArrayList(bridges); } I know it's possible for CXF to handle this case because I've done it before - with a platform that defined the CXF and related maven artifacts behind the scenes (i.e. I didn't know how it was done). So, the question : how can I get CXF to support this without adding

CXF: WARNING: No message body writer has been found for response class ArrayList

你。 提交于 2019-12-29 08:06:05
问题 I'm getting the following error: WARNING: No message body writer has been found for response class ArrayList. On the following code: @GET @Consumes("application/json") public List getBridges() { return new ArrayList(bridges); } I know it's possible for CXF to handle this case because I've done it before - with a platform that defined the CXF and related maven artifacts behind the scenes (i.e. I didn't know how it was done). So, the question : how can I get CXF to support this without adding

Logging request/response with Apache CXF as XML

时光怂恿深爱的人放手 提交于 2019-12-28 05:14:23
问题 Is it possible to log the request/response as XML using CXF, ideally to a separate file so I can monitor what an application is doing? 回答1: Add the following to your endpoints and clients: <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature" /> </jaxws:features> This will log everything to the server log. If you want to log them elsewhere, then look at the source code of the built-in CXF LoggingInInterceptor and LoggingOutInterceptor. You can follow the pattern they use to

cxf3.0.4结合spring搭建webservice服务端的框架必需的最少jar包

▼魔方 西西 提交于 2019-12-25 23:14:44
1、org.apache.catalina.LifecycleException: A child Container failed during start 缺少:cxf-core-3.0.4.jar(最核心的包,不多说) 2、Java.lang.ClassNotFoundException: org.apache.cxf.binding.soap.SoapBindingConfiguration 缺少:cxf-rt-bindings-soap-3.0.4.jar (soap协议) 3、org.apache.cxf.jaxb.JAXBDataBinding: 缺少:cxf-rt-databinding-jaxb-3.0.4.jar 4、加载Application文件时出现Unable to locate Spring NamespaceHandler for XML schema namespace [ http://cxf.apache.org/jaxws ] 缺少:cxf-rt-frontend-jaxws-3.0.4.jar (frontend 前置的意思,你懂的) 5、org/apache/cxf/frontend/spring/ClientProxyFactoryBeanDefinitionParser错误: 缺少:cxf-rt-frontend-simple-3.0

转:CXF学习笔记二:如何在Tomcat中创建、发布和访问基于CXF的服务

佐手、 提交于 2019-12-25 23:14:08
详细介绍了在tomcat容器中创建、发布和访问CXF服务的步骤和各种方法。 一、服务器端 1.添加CXF包 1)基本包: commons-logging-1.1.1.jar geronimo-activation_1.1_spec-1.0.2.jar geronimo-annotation_1.0_spec-1.1.1.jar geronimo-javamail_1.4_spec-1.6.jar geronimo-jaxws_2.1_spec-1.0.jar geronimo-servlet_2.5_spec-1.2.jar geronimo-stax-api_1.0_spec-1.0.1.jar geronimo-ws-metadata_2.0_spec-1.1.2.jar jaxb-api-2.1.jar jaxb-impl-2.1.12.jar jetty-6.1.21.jar jetty-util-6.1.21.jar neethi-2.0.4.jar saaj-api-1.3.jar saaj-impl-1.3.2.jar wsdl4j-1.6.2.jar wstx-asl-3.2.8.jar xml-resolver-1.2.jar XmlSchema-1.4.5.jar 2)jsf和jstl(非必要,用MyEclipse创建Web Project时会自动加入

CXF向后兼容性(backwards compatibility)解决方案

。_饼干妹妹 提交于 2019-12-25 23:09:49
当在CXF服务端pojo中添加一个新属性后,未经重新generate的客户端会在调用该web service时报UnmarshalException: unexpected element,错误日志如下: DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"", local:"areaId"). Expected elements are <{}dmsSiteCode>,<{}provinceId>,<{}countryId>,<{}mail>,<{}phone>,<{}siteType>,<{}cityId>,<{}orgName>,<{}siteCode>,<{}orgId>,<{}staffNo>,<{}address>,<{}staffName>,<{}subType>,<{}role>,<{}customCode>,<{}sitePhone>,<{}countrySideId>,<{}targetType>,<{}storeCode>,<{}siteName> Location: line 1 2013-1-5 16:43:20 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging 警告: Interceptor for

apache CXF Service 简单使用

微笑、不失礼 提交于 2019-12-25 14:03:14
cxf介绍 框架官网: cxf.apache.org 支持多种协议: SOAP1.1,1.2 XML/HTTP CORBA(Common Object Request Broker Architecture公共对象请求代理体系结构,早期语言使用的WS。C,c++,C#) 并可以与Spring进行快速无缝的整合 灵活的部署:可以运行在Tomcat,Jboss,Jetty(内置),IBMWS,BeaWL上面。 入门案例(服务端) 第一步:创建动态web项目 第二步:导入CXF相关jar包 第三步:在web.xml中配置CXF框架提供的一个Servlet <!-- 配置CXF框架提供的Servlet --> <servlet> <servlet-name>cxf</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <!-- 通过初始化参数指定CXF框架的配置文件位置 --> <init-param> <param-name>config-location</param-name> <param-value>classpath:cxf.xml</param-value> </init-param> </servlet> <servlet-mapping>