call.addParameter(new QName(soapaction, "vvvv"), // 需要传递的参数名 org.apache.axis.encoding.XMLType.XSD_STRING...org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN...); call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);// (标准的返回类型) call.setUseSOAPAction...: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient 我是由于...查看jar包依赖情况: 分别搜索jaxb-impl和jaxb-core,发现它们是jar包axis2-jaxws和cxf-rt-frontend-jaxws分别依赖的子包。
(本系列的第 2 部分将提供有关 RESTful 服务的更多信息。) 对不同传输和绑定的支持:CXF 支持不同种类的传输,从 XML 到逗号分隔值 (CSV)。...jar包: cxf-2.1.jar 以上jar 包 可从apache官方网站下载 apache-cxf-2.1.2.zip....org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" ...http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org.../jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF
1.6.2 org.apache.cxf...> org.apache.cxf...> org.apache.cxf cxf-rt-transports-http-jetty...XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org...cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <jaxws:endpoint id="ProjectManager
-- webservice技术,cxf是apache封装的webservice技术的框架 --> 43 44 org.apache.cxf...23 @WebMethod // 定义方法,在公开方法上边,此注解用在方法上,用于修改对外暴漏的方法,定制返回值到wsdl部分和xml元素的映射关系 24 public String getUserInfo...linked exception: 29 [java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC] 30 at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler...(JAXBUtils.java:729) 31 at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator...java.lang.Class.forName0(Native Method) 35 at java.lang.Class.forName(Unknown Source) 36 at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler
阅读更多 同样的程序在 Tomcat 5.5.16/25 以及 Jetty 5.1.12 上都能够成功部署及运行,但是部署到 WebLogic 9.2 上时出错 org.springframework.web.context.ContextLoader...ContextFinder.java:366) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext...(JAXBDataBinding.java:377) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java...但是通过 jad 发现 weblogic 里的 javax/xml/namespace/QName 与 Apache CXF 里的是一样的,比较奇怪了。。。...Apache CXF 的时间晚于 WebLogic 里的类的时间,于是只能怀疑后者引起类在加载时发生了 java.lang.LinkageError 错误。
Apache CXF一款WebService RPC框架入门教程 CXF官网:http://cxf.apache.org/ Apache CXF是一个开源的WebService RPC框架,是由...支持多种传输协议和协议绑定(SOAP、REST/HTTP、XML)、数据绑定(JAXB2.X、Aegis、Apache XML Beans)。...>org.apache.cxf cxf-rt-transports-http-jetty ...-4.2.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd"> <bean id="client" class
CXF 则是由 Celtix 和 XFire 项目整合而生,并且刚刚发布了 2.0.2 的最新版本,不过仍是 Apache 的一个孵化项目。 ...Apache CXF 则是由 XFire 和 Celtix 两个现有的项目进行了重组。 ...6、Apache CXF 目前仅支持 JAXB 和 Aegis,并且默认是 JAXB 2.0,与 XFire 默认是支持 Aegis 不同,XMLBeans、JiBX 和 Castor 将在 CXF 2.1...8、Apache CXF 提供方便的Spring整合方法,可以通过注解、Spring标签式配置来暴露Web Services和消费Web Services 如何抉择: 1、如果应用程序需要多语言的支持...,Axis2 应当是首选了; 2、如果应用程序是遵循 Spring 哲学路线的话,Apache CXF 是一种更好的选择,特别对嵌入式的 Web Services 来说; 3、如果应用程序没有新的特性需要的话
,只是简单了调用了一下服务器上的一段代码而已。..." xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http...://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxrs http...://cxf.apache.org/schemas/jaxrs.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas.../jaxws.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"> <!
--cxf--> org="org.apache.cxf" name="cxf-bundle" rev="2.7.11" conf="compile->compile...缺少关键的beans.xml文件 补上去:注意其中的很重要; <?xml version="1.0" encoding="UTF-8"?.../schema/context" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org.../schema/data/repository/spring-repository-1.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org.../schemas/jaxws.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http
阅读更多 新一代的 Web Services 框架如 Axis2、CXF 都是由现有的项目中逐渐演化而来的,Axis2 是由大家熟悉的 Axis 1.x 系列演化过来,而 Apache CXF...先比较一下它们的不同之处: 1、Apache CXF 支持 WS-Addressing、WS-Policy、WS-RM、WS-Security和WS-I BasicProfile 2、Axis2...6、Apache CXF 目前仅支持 JAXB 和 Aegis,并且默认是 JAXB 2.0,与 XFire 默认是支持 Aegis 不同,XMLBeans、JiBX 和 Castor 将在 CXF 2.1...8、Apache CXF 提供方便的Spring整合方法,可以通过注解、Spring标签式配置来暴露Web Services和消费Web Services 如何抉择: 1、如果应用程序需要多语言的支持...,Axis2 应当是首选了; 2、如果应用程序是遵循 Spring 哲学路线的话,Apache CXF 是一种更好的选择,特别对嵌入式的 Web Services 来说; 3、如果应用程序没有新的特性需要的话
这篇文章介绍了发布WebService的多种方式以及实现, 下面对cxf和Axis2的使用方式做基本介绍,其他方式请自行寻找资料 6.1 CXF 6.1.1、什么是cxf CXF全称Apache CXF...Apache CXF = Celtix + Xfire Apache CXF支持多种协议: a) SOAP1.1,1,2 b) HTTP c) CORBA(Common Object Request... org.apache.cxf.transport.servlet.CXFServlet...> org.apache.cxf.interceptor.LoggingInInterceptor"> ... org.apache.cxf.interceptor.LoggingOutInterceptor"> </jaxws
Axis 1.x 系列演化过来,而 Apache CXF 则是由 Celtix 和 XFire 项目整合而生,并且刚刚发布了 2.0.2 的最新版本,不过仍是 Apache 的一个孵化项目。...先比较一下它们的不同之处: 1、Apache CXF 支持 WS-Addressing、WS-Policy、WS-RM、WS-Security和WS-I BasicProfile 2...6、Apache CXF 目前仅支持 JAXB 和 Aegis,并且默认是 JAXB 2.0,与 XFire 默认是支持 Aegis 不同,XMLBeans、JiBX 和 Castor 将在 CXF 2.1...8、Apache CXF 提供方便的Spring整合方法,可以通过注解、Spring标签式配置来暴露Web Services和消费Web Services 以下来自与http://blog.sina.com.cn...使用: SOAP 是个通信协议,SOAP在HTTP协议的基础上,把编写成XML的REQUEST参数,放下HTTP BODY上提交到WEB SERVICE服务器处理完成后,结果也写成XML作为RESPONSE
,相比之下JAXM&SAAJ 暴漏了SOAP更多的底层细节,编码比较麻烦,而JAX-WS 更加抽象,隐藏了更多的细节,更加面向对象,实现起来基本上不需要关心SOAP 的任何细节。...Webservice四种框架 1、Apache Axis1 Axis本质上就是一个SOAP引擎(Apache Axis is an implementation of the SOAP),提供创建服务器端...l 高性能SOAP STACK l 可插拔绑定POJOs, XMLBeans, JAXB 1.1, JAXB 2.0, and Castor support l...代码生成 l 支持JAX-WS early access 4、Apache CXF Apache CXF是一个开源服务框架。...CXF被设计为可插拔的架构,在不同的传输协议结合下,不仅支持XML,也支持非XML类型绑定,例如:JSON和CORBA。
" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http...http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/core http:..." xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http...http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/core http:...如果要进行访问必须使用jQuery的jsonp数据形式。 但原始的ajax可以通过get/post方式跨域访问http上的资源。 以下是通过jaxb发布的webservice。
CXF:http://cxf.apache.org/ 是由过去的Celtix和XFire两个框架合并而来,CXF在java社区有广泛的接受度是得益于它能很好的集成Spring。...Axis2: http://axis.apache.org/axis2/java/core/ 与CXF这类嵌入式的框架相比,Axis2更像是一种是WS容器,它要求应用程序以aar包的形式部署到自己里面...总得来说,如果是新生项目,选择CXF或Axis2在工作量上不会有太大的差别,对于那些使用了Spring的既有项目来说,CXF应该是首选,因为CXF是基于注解的。...CXF也重新的深化了XFire和Celtix这两个开发工具。 新产品的退出导致了几个问题。是不是现有的使用Axis 1.x,XFire和Celix的应用需要迁移的新的版本上。...注意JaxME和JaxBRI都还是试验性的。CXF只支持JAXB和Aegis。在CXF2.1 4. Axis2支持多语言-除了Java,他还支持C/C++版本。
Axis本质上就是一个SOAP引擎(Apache Axis is an implementation of the SOAP),提供创建服务器端、客户端和网关SOAP操作的基本框架。...Apache CXF = Celtix + XFire,Apache CXF 的前身叫 Apache CeltiXfire,现在已经正式更名为 Apache CXF 了,以下简称为 CXF。...l 在相同的服务端下,采用不同框架生成的stub代码调用时,时间上也存在一定的差异。...(axis2与cxf 都支持很多优秀的框架(上已提到),但axis2扩展性比cxf要好,axis2不仅支持java对c/C++提供支持)(个人观点)【RESTEasy也能支持许多比较优秀的框架】(百度加个人观点...Apache Axis2是Apache Axis1的第二代产品,架构上也非常不错,关键特性:支持多语言(C/C++)、支持各种规范、可插拔模块化设计、支持热部署等。与CXF相比性能也非常优异。
集成springmvc发布Webservice: 工具:cxf-2.4.1 eclipse wsdl spingmvc 使用cxf中的wsdl2java命令生成java文件: wsdl2java用法:...--cxf--> org="org.apache.cxf" name="cxf-bundle" rev="2.7.11" conf="compile->compile.../schema/context" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org.../schema/data/repository/spring-repository-1.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org.../schemas/jaxws.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http
之所以并称为新一代,因为它: 1、支持一系列Web Service的新标准--JSR181、WSDL2.0 、JAXB2、WS-Security等; 2、使用Stax解释XML,性能有了质的提高。...jaxb2,castor。...这两个产品都是Apache孵化器下面的Web Service开源开发工具。 本文发布时Axis的最新版本是1.4;CXF现在已经到了3.0版本。 这两个框架 都是从已有的开源项目发展起来的。...4、CXF是Apache旗下一个重磅的SOA简易框架,它实现了ESB(企业服务总线)。CXF来自于XFire项目,经过改造后形成的,就像目前的Struts2来自WebWork一样。...如何抉择: 1、如果应用程序需要多语言的支持,Axis2 应当是首选了; 2、如果应用程序是遵循 Spring 哲学路线的话,Apache CXF 是一种更好的选择,特别对嵌入式的 Web Services
2.Web Service解决什么问题 Web Service技术, 能使得运行在不同机器上的不同应用无须借助附加的、专门的第三方软件或硬件, 就可相互交换数据或集成。...5.2.Apache-CXF和JAX-WS ApacheCXF = Celtix + XFire,开始叫 ApacheCeltiXfire,后来更名为 Apache CXF 了,以下简称为...Apache CXF已经是一个正式的Apache顶级项目。...这些 Services 可以支持多种协议,比如:SOAP、XML/HTTP、RESTful HTTP或者 CORBA ,并且可以在多种传输协议上运行,比如:HTTP、JMS 或者 JBI,CXF 大大简化了...官网:http://cxf.apache.org/ 百度百科:https://baike.baidu.com/item/CXF/9622340?
主要特性 XFire 目前最新的版本是 1.2.6,目前支持的特性主要包括: 支持将 Web 服务绑定到 POJO、XMLBeans、JAXB1.1、JAXB2.0 和 Castor; 支持基于...Spring的结合; 5. 灵活的Binding机制,包括默认的Aegis,xmlbeans,jaxb2,castor。...对于服务开发人员来说,AXIS和CXF一定都不会陌生。这两个产品都是Apache孵化器下面的Web Service开源开发工具。 Axis2的最新版本是1.3.CXF现在已经到了2.0版本。...CXF也重新的深化了XFire和Celtix这两个开发工具。 新产品的退出导致了几个问题。是不是现有的使用Axis 1.x,XFire和Celix的应用需要迁移的新的版本上。...注意JaxME和JaxBRI都还是试验性的。CXF只支持JAXB和Aegis,并且默认是 JAXB 2.0。 4. Axis2支持多语言-除了Java,他还支持C/C++版本。
领取专属 10元无门槛券
手把手带您无忧上云