救命,CXF如何指定方法的xml命名空间间

cxf web service简单配置
搭建Web Service (Restful Web Service与基于SOAP的Web Service混合方案)
一,选择一个合适的,Web开发环境:
我选择的是Eclipse for J2EE,当然大家可以选择MyEclipse我只是嫌最新版的MyEclipse Crack太烦,所以没用它。当年我也是最喜欢它的哟。如果你手头只有Eclipse for Java没关系,安装一个WTP就可以了。
a.首先创建一个Dynamic Web Project :
在创建的第一页,Project Name 我用的是&MyServices&中要在Target Runtime中选择一个容器服务器,我这里测试环境下,选择的是Tomcat ,如果没有,可以在右边点击&New Runtime&进行新增Tomcat 运行环境。
在Project创建的最后一页最好选中创建一个web.xml省得你去创建,缺省情况下,这个web.xml只配置了欢迎页面。如index.php等。
b.测试一下,是否这个环境可以发布Build后的代码及网页到Tomcat测试环境中运行:
在左边的&Web Content&目录下的&WEB-INF&子目录,创建一个index.文件进行测试。创建完成后,重新build项目,然后在右下方的Server Tab里会自动列出你刚才选择的Tomcat发布环境。你点击这个Tomcat Server
我的环境是Tomcat Server 7.0 然后右键菜单中选择&Publish& 你会看到 服务器,及服务器下面你的项目右边会由&Republish&变成&Synchronized& ,说明工程编译结果都已成功发布到Tomcat Server测试环境下了。
点击Tomcat Server 7.0 选择&Start& 服务启动,你就可以在你的网页里输入&https://localhost:8080/MyServices/index.jsp&你就可以看到你的网页内容了。
因为这个网站插图不方便,有时间再插一些图示吧。
二,关于cxf 框架的运行时序的个人思考过程:
0.Tomcat启动时,加载web.xml,根据web.xml的配置,把CXF 的Servlet 放到Tomcat的侦听端口的映射中,同时也把Spring的Bean加载器也加载到Tomcat的进程空间中,Spring根据初始化的配置文件(比如application-context.xml),加载Bean对象。在加载过程中,会根据配置文件中的xml中的xmlns进行分析(比如,&xmlns:jaxrs =&https://cxf.apache.com&, 先到
spring的handlers配置文件中,根据&https://cxf.apache.com&字符串找到对映的handler,用这个组件加载所有配置文件中,以jawrs为xml命名空间的配置部分,比如,
可参考:https://blog.csdn.net/javabenface/article/details/7441923)调用对应的加载器进行解释加载,这里调用cxf的加载器进行加载。cxf加载器会根据 beans.xml中对应的项加载最终实现的class文件,这些class在对应的java源文件编译过程中,根据java文件中的annomation标记符进行处理,使得这些class加载时形成正确的path 与对象的映射。
1.客户端发出请求,通过XML/HTTP把请求及参数对象转为XML经过HTTP传到Servlet容器中。
2.CXF会根据Path与对象的映射找到正确的对象,如果是Restful Web Service还会再根据映射找到Path中对应的执行方法。
三,创建一个基于CXF及Spring的SOAP Web Service:
1.创建Web Service 相关的类:
因为这种类型Web Service是SOA(面象服务架构)的,所以是提供一个远程的RPC接口。所以首先要有一个接口,当然,在服务端要提供真正的服务,所以要有一个这个接口在服务端的实现。下面分别实现:
IHelloWorld.java:
package com.services.
import javax.jws.WebP
import javax.jws.WebS
@WebService
public interface IHelloWorld {
public String speakoutUserInfo(@WebParam(name = &param&) ParamDTO obj);
HelloWorld.java:
package com.services.
import javax.jws.WebS
/** * * 使用@WebService指向Interface定义类即可. */
@WebService(endpointInterface = &com.services.soap.IHelloWorld&)
public class HelloWorld implements IHelloWorld{
public String speakoutUserInfo(ParamDTO obj) {
// TODO Auto-generated method stub
return &hello&;
上述的服务实现用到一个对象,这个对象可以做为参数远程进行传递,一般叫做DTO(数据传输对象)。当然你可以不用对象,用普通的数据类型这个实例一次性都表现一下。
ParamDTO.java:
package com.services.
import javax.xml.bind.annotation.XmlAccessorT
import javax.xml.bind.annotation.XmlAccessT
import javax.xml.bind.annotation.XmlT
* Web Service传输信息的DTO.
* 分离entity类与web service接口间的耦合,隔绝entity类的修改对接口的影响. 使用JAXB 2.0的annotation标注JAVA-XML映射,尽量使用默认约定. *
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = &User&)
public class ParamDTO {
protected I
protected S
public Integer getId() {
public void setId(Integer value) {
public String getName() {
public void setName(String value) {
2.在配置文件中体映射这个Service:
我们定义这个Beans.xml
https://www.springframework.org/schema/beans&
xmlns:xsi=&https://www.w3.org/2001/XMLSchema-instance&
xmlns:jaxws=&https://cxf.apache.org/jaxws&
xsi:schemaLocation=&
https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
https://cxf.apache.org/jaxws https://cxf.apache.org/schemas/jaxws.xsd&&
address=&/HelloWorld& implementor=&com.services.soap.HelloWorld&/&
这个Beans.xml放到Spring的加载Beans的配置文件中被引用:
applicationContext.xml:
xmlns=&https://www.springframework.org/schema/beans&
xmlns:xsi=&https://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd&&
//注意这行代码的引用
当然我们要在Web.xml中配置Spring:
https://www.w3.org/2001/XMLSchema-instance& xmlns=&https://java.sun.com/xml/ns/javaee& xmlns:web=&https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd& xsi:schemaLocation=&https://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd& id=&WebApp_ID& version=&3.0&&
contextConfigLocation
WEB-INF/classes/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
CXFServlet
org.apache.cxf.transport.servlet.CXFServlet
CXFServlet
index.html
default.html
default.htm
default.jsp
也可参考https://www.cnblogs.com/hoojo/archive//1999563.html提供了另一种相似的配置方式。
四,创建一个基于CXF及Spring的Restful Web Service:
这个就相对简单了。因为经不需要直接接供RPC接口给客户端,只是其于ROA的方式提供资源的操作,可以理解为基于一些xml,json的表达一些资源对象变态变化的传输同步给远程服务。
所以通过xml映射对象,Annomation进行直接映射方法与path.所以直接写实现类就行了,当然cxf还有别的框架有其它的映射或配置方式。
a.代码实现:
先上代码:
HelloWorld.java
package com.services.
import javax.ws.rs.C
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.P
import javax.ws.rs.PathP
import javax.ws.rs.P
import javax.ws.rs.core.R
import org.codehaus.jackson.jaxrs.JacksonJsonP
@Path(&/hello&)
public class HelloWorld {
@Path(&/echo/{input}&)
@Produces(&text/plain&)
public String ping(@PathParam(&input&) String input) {
return input + &:in server!&;
@Produces(&application/json&)
@Consumes(&application/json&)
@Path(&/jsonBean&)
public Response modifyJson(JsonBean input) {
input.setCommand(222);
input.getParam().put(&content&, &welcome to server!&);
return Response.ok().entity(input).build();
其中用到JsonBean对象这个是可以远程传送参数对象,一般情况无需特别的定义。就可以直接用了。我这里定义如下:
package com.services.
import java.util.M
public class JsonBean {
private Integer protocolV
private String platformT
public Integer getCommand() {
public void setCommand(Integer command) {
this.command =
public Integer getProtocolVersion() {
return protocolV
public void setProtocolVersion(Integer protocolVersion) {
this.protocolVersion = protocolV
public String getPlatformType() {
return platformT
public void setPlatformType(String platformType) {
this.platformType = platformT
public Map getParam() {
public void setParam(Map param) {
this.param =
b.进行发布:
配置一个rest-services.xml进行映射:
https://www.springframework.org/schema/beans& xmlns:xsi=&https://www.w3.org/2001/XMLSchema-instance& xmlns:jaxrs=&https://cxf.apache.org/jaxrs& xmlns:context=&https://www.springframework.org/schema/context& xsi:schemaLocation=& https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd https://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context-3.0.xsd https://cxf.apache.org/jaxrs https://cxf.apache.org/schemas/jaxrs.xsd&&
在Spring的加载配置文件(applicationContext.xml)里引入:
xmlns=&https://www.springframework.org/schema/beans&
xmlns:xsi=&https://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd&&
OK,大功告成。
到时此我们能把这两种模式的Web Service同时在一个框架里发布吗?当然可以:)要做的只有一步,就是在上面的applicationContext.xml里同时加载两个Service的映射文件就可以了。
xmlns=&https://www.springframework.org/schema/beans&
xmlns:xsi=&https://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd&&
现在就你就可以编译完成,Publish到你的tomcat上进行测试了,不过一定要注意,在发布选项里一定要把你项目工程中引用的jar依赖库(比如,cxf相关,spring相关的,Json相关的)同时发布到你的Tomcat Server的运行环境里,这里只需要修改:项目(MyServices)右键=》Properties=&Deployment Assembly=&Add=&Java Build Path Entries 不过在引入的jar过多时可能会造成冲突,假如在测试时,说CXF 的一个Discoveryxxx对象&.. Null Point之类的错误:
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name &bookservice&: Invocation o nested exception is org.apache.cxf.service.factory.ServiceConstructionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.NullPointerException
at org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:64)
at org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:192)
就是最常见的cxf-services-ws-discovery-service-2.x.x.jar冲突,去掉这个.jar的依赖即可。如果你在项目的Java Build Path中去掉这个jar仍不行,就去你测试的Tocat Server上右键&clean& 然后再&Publish&,如果这样还不行,说明是Eclipse 清除Tomcat的发布目录不彻底(Eclipse也有很多bug的),你就去Tomcat 的运行时临时Web根目录中去清除这个jar.这个目录是在Eclipse的Workspace目录下的&.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps&子目录。现在估计你能理解为什么你在Eclipse 的runtime server中用Tomcat测试发布后的文件在Tomcat的安装目录看不到的原因了吧?呵呵,因为Eclipse整合tomcat测试运行时,根本上会使用自己的临时目录作为Tomcat的运行时Web根目录。
如果你遇到:
Caused by: java.lang.NullPointerException
Class Could not found: org.springframework.web.context.ContextLoaderListener之类的错误。你需要在你的Web project的Deployment Assemblly 中 加入Java build path的库,即点击&Add&按钮,在弹出列表窗口中选择&Java Build Path Entries&然后选中你的工程发布所需要的库即可。
到这里应该完成了。
下面就可以用各种客户端或者进行访问了,这里主要讲方法,可能部分代码在相关的博文里面附上了:
0.测试工具:
对于restful web service因为返回的内容都可以简单的分析,所以可以用很多工具进行测试。
a. 基于firefox的 Poster
b.linux上的curl.
1.Native 客户端访问方法:
用Java的NIO中的HttpClient就可以搞定 Restful Web Service.
a.cxf的WebClient接口:
cxf提供了访问WebService的所有接口,例子代码如下:
import javax.ws.rs.core.MediaT
import org.apache.cxf.jaxrs.client.WebC
public class RSETClient {
private static WebC
public void init() {
client =new WebClient(&https://localhost:8080/restWeb/hello/teststring&);
public void testGet() {
System.out.println(client.path(&sample&).accept(MediaType.TEXT_PLAIN).get(String.class));
b.Spring RestTemplate:
这个可以通过在客户端使用Spring的RestTemplate 相关的库来访问。
下面代码是用Spring for 写的,PC各平台上调用大同小异,没时间在这里上代码了。
HttpHeaders reqHeader = new HttpHeaders();
reqHeader.setContentType(new MediaType(&text&, &plain&));
HttpEntity req = new HttpEntity(reqHeader);
String restUrl = &https://192.168.2.100:8080/webrest/hello/echo/testtest&;// 这个地址要根据你Restful
// 服务器来定 // 好戏上场了,呵呵
RestTemplate restTemplate = new RestTemplate(true);
//restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
ResponseEntity response = restTemplate.exchange(restUrl, HttpMethod.GET, req, String.class);
String msgBody = response.getBody();
System.out.println(msgBody);
可以使用IOS上的第三方Http库来访问 Restful Web Service,库名字叫:。一、概念1、什么是webserviceWeb service是一个平台独立的,低耦合的,自包含的、基于可编程的web的应用程序,可使用开放的XML标准来描述、发布、发现、协调和配置这些应用程序,用于开发分布式的互操作的应用程序。2、wsdl网络服务描述语言是一个用来描述Web服务和说明如何与Web服务通信的XML(标准通用标记语言的子集)语言。为用户提供详细的接口说明书。3、soap简单对象访问协议是交换数据的一种协议规范,是一种轻量的、简单的、基于XML(标准通用标记语言下的一个子集)的协议,它被设计成在WEB上交换结构化的和固化的信息。4、JAX-WS一种 Java 规范,名为 JAX-WS(JSR-224),全称 Java API for XML-Based Web Services,可以将规范理解为官方定义的一系列接口。即一般所说的SOAP风格。5、JAX-RS为了让 WS 的开发与使用变得更加简单、更加轻量级,于是出现了另一种风格的 WS,名为 JAX-RS(JSR-339),全称 Java API for RESTful Web Services,同样也是一种规范,同样也有若干实现,cxf是其中比较著名的一种。二、使用cxf发布soap风格的webservice服务1、如何发布服务直接看这篇:文章讲的十分明白易懂,如果想快速上手,跳过文章的前两部分,直接看第三部分:“3. 在 Web 容器中使用 Spring + CXF 发布 WS”2、可能出现的问题(1)优化实践在“Web Service 那点事儿(2)—— 使用 CXF 开发 SOAP 服务&”这篇文章中,接口只写加了最基本的注解,比如下面这样:@WebServicepublic interface HelloService {
String say(String name);}这样虽然也能用,但是在实际使用中容易出现各种各样的奇怪问题,所以建议把接口名、命名空间、参数声明之类的都加上,比如下面这样:@WebService(targetNamespace="http://service.sky.com/",name="GoodDay",serviceName="GoodDay")public interface GoodDay { @WebMethod(action = "http://service.sky.com/SayHello") public String SayHello(@WebParam(name = "uname",targetNamespace="http://service.sky.com/")String uname);}(2)javax.xml.bind.UnmarshalException:&意外的元素&(uri:"http://service.sky.com/",&local:"uname")。所需元素为&{}uname&出现原因是为参数设置了参数名,却没有设置命名空间。比如,接口写成如下这样,就很容易出现这个错误。@WebService(targetNamespace="http://service.sky.com/",name="GoodDay",serviceName="GoodDay")public interface GoodDay { @WebMethod(action = "http://service.sky.com/SayHello") public String SayHello(@WebParam(name = "uname")String uname);}解决方法是为参数加上命名空间,如下所示:@WebService(targetNamespace="http://service.sky.com/",name="GoodDay",serviceName="GoodDay")public interface GoodDay { @WebMethod(action = "http://service.sky.com/SayHello") public String SayHello(@WebParam(name = "uname",targetNamespace="http://service.sky.com/")String uname);}当然这种写法很麻烦,如果有其他办法请大家不吝赐教。
阅读(...) 评论()cxf返回的报文,命名空间无前缀
时间: 00:21:32
&&&& 阅读:2271
&&&& 评论:
&&&& 收藏:0
标签:cxf框架做的服务端接收请求并响应。
&?xml version="1.0"?&
&soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"&
&soap:Body xmlns="http://www.example.org/stock"&
&GetStockPriceResponse&
&Price&34.5&/m:Price&
&/GetStockPriceResponse&
&/soap:Body&
&/soap:Envelope&
希望得到的返回应该是:
&?xml version="1.0"?&
&soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"&
&soap:Body xmlns:m="http://www.example.org/stock"&
&m:GetStockPriceResponse&
&m:Price&34.5&/m:Price&
&/m:GetStockPriceResponse&
&/soap:Body&
&/soap:Envelope&
找了很久,最后在自动生成的ObjectFactory文件中解决了。
将第367行&namespace 里面设为&&即可。
1 package com.haiyisoft.hyoms.wbs.pubMVF
3 import javax.xml.bind.JAXBE
4 import javax.xml.bind.annotation.XmlElementD
5 import javax.xml.bind.annotation.XmlR
6 import javax.xml.namespace.QN
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.haiyisoft.hyoms.wbs.pubMVFault package.
* &p&An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
Factory methods for each of these are
* provided in this class.
23 @XmlRegistry
24 public class ObjectFactory {
private final static QName _PublishMVFaultRepairWorkResponse_QNAME = new QName("http://pdjyh.soa.csg.cn", "PublishMVFaultRepairWorkResponse");
private final static QName _EventMessage_QNAME = new QName("http://pdjyh.soa.csg.cn", "EventMessage");
private final static QName _PublishMVFaultRepairWorkRequest_QNAME = new QName("http://pdjyh.soa.csg.cn", "PublishMVFaultRepairWorkRequest");
private final static QName _RequestMessage_QNAME = new QName("http://pdjyh.soa.csg.cn", "RequestMessage");
private final static QName _ResponseMessage_QNAME = new QName("http://pdjyh.soa.csg.cn", "ResponseMessage");
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.haiyisoft.hyoms.wbs.pubMVFault
public ObjectFactory() {
* Create an instance of {@link ObjQueryParam }
public ObjQueryParam createObjQueryParam() {
return new ObjQueryParam();
* Create an instance of {@link PublishMVFaultRepairWorkResponseType }
public PublishMVFaultRepairWorkResponseType createPublishMVFaultRepairWorkResponseType() {
return new PublishMVFaultRepairWorkResponseType();
* Create an instance of {@link EventMessageType }
public EventMessageType createEventMessageType() {
return new EventMessageType();
* Create an instance of {@link PublishMVFaultRepairWorkRequestType }
public PublishMVFaultRepairWorkRequestType createPublishMVFaultRepairWorkRequestType() {
return new PublishMVFaultRepairWorkRequestType();
* Create an instance of {@link RequestMessageType }
public RequestMessageType createRequestMessageType() {
return new RequestMessageType();
* Create an instance of {@link ResponseMessageType }
public ResponseMessageType createResponseMessageType() {
return new ResponseMessageType();
* Create an instance of {@link ErrorType }
public ErrorType createErrorType() {
return new ErrorType();
* Create an instance of {@link Substation }
public Substation createSubstation() {
return new Substation();
* Create an instance of {@link Operation }
public Operation createOperation() {
return new Operation();
* Create an instance of {@link Attachment }
public Attachment createAttachment() {
return new Attachment();
* Create an instance of {@link DispatchingTroubleTicketMirdItem }
public DispatchingTroubleTicketMirdItem createDispatchingTroubleTicketMirdItem() {
return new DispatchingTroubleTicketMirdItem();
* Create an instance of {@link OperationSet }
public OperationSet createOperationSet() {
return new OperationSet();
* Create an instance of {@link ErpOrganisation }
public ErpOrganisation createErpOrganisation() {
return new ErpOrganisation();
* Create an instance of {@link MVFaultRepairWork }
public MVFaultRepairWork createMVFaultRepairWork() {
return new MVFaultRepairWork();
* Create an instance of {@link ErpPerson }
public ErpPerson createErpPerson() {
return new ErpPerson();
* Create an instance of {@link TroubleTicketItem }
public TroubleTicketItem createTroubleTicketItem() {
return new TroubleTicketItem();
* Create an instance of {@link EquipmentFault }
public EquipmentFault createEquipmentFault() {
return new EquipmentFault();
* Create an instance of {@link OptionType }
public OptionType createOptionType() {
return new OptionType();
* Create an instance of {@link DocErpPersonRole }
public DocErpPersonRole createDocErpPersonRole() {
return new DocErpPersonRole();
* Create an instance of {@link FaultMessageType }
public FaultMessageType createFaultMessageType() {
return new FaultMessageType();
* Create an instance of {@link Circuit }
public Circuit createCircuit() {
return new Circuit();
* Create an instance of {@link DocOrgRole }
public DocOrgRole createDocOrgRole() {
return new DocOrgRole();
* Create an instance of {@link Equipment }
public Equipment createEquipment() {
return new Equipment();
* Create an instance of {@link FaultCode }
public FaultCode createFaultCode() {
return new FaultCode();
* Create an instance of {@link SwtichingPowerSupply }
public SwtichingPowerSupply createSwtichingPowerSupply() {
return new SwtichingPowerSupply();
* Create an instance of {@link OutageEquipment }
public OutageEquipment createOutageEquipment() {
return new OutageEquipment();
* Create an instance of {@link DispatchingTroubleTicketMirdList }
public DispatchingTroubleTicketMirdList createDispatchingTroubleTicketMirdList() {
return new DispatchingTroubleTicketMirdList();
* Create an instance of {@link FaultRecord }
public FaultRecord createFaultRecord() {
return new FaultRecord();
* Create an instance of {@link ReplyType }
public ReplyType createReplyType() {
return new ReplyType();
* Create an instance of {@link TroubleTicketList }
public TroubleTicketList createTroubleTicketList() {
return new TroubleTicketList();
* Create an instance of {@link TroubleTicket }
public TroubleTicket createTroubleTicket() {
return new TroubleTicket();
* Create an instance of {@link DistributionTransformer }
public DistributionTransformer createDistributionTransformer() {
return new DistributionTransformer();
* Create an instance of {@link RequestType }
public RequestType createRequestType() {
return new RequestType();
* Create an instance of {@link MessageProperty }
public MessageProperty createMessageProperty() {
return new MessageProperty();
* Create an instance of {@link ObjQueryParam.MRIDs }
public ObjQueryParam.MRIDs createObjQueryParamMRIDs() {
return new ObjQueryParam.MRIDs();
* Create an instance of {@link ObjQueryParam.Properties }
public ObjQueryParam.Properties createObjQueryParamProperties() {
return new ObjQueryParam.Properties();
* Create an instance of {@link JAXBElement }{@code &}{@link PublishMVFaultRepairWorkResponseType }{@code &}}
@XmlElementDecl(namespace = "http://pdjyh.soa.csg.cn", name = "PublishMVFaultRepairWorkResponse")
public JAXBElement&PublishMVFaultRepairWorkResponseType& createPublishMVFaultRepairWorkResponse(PublishMVFaultRepairWorkResponseType value) {
return new JAXBElement&PublishMVFaultRepairWorkResponseType&(_PublishMVFaultRepairWorkResponse_QNAME, PublishMVFaultRepairWorkResponseType.class, null, value);
* Create an instance of {@link JAXBElement }{@code &}{@link EventMessageType }{@code &}}
@XmlElementDecl(namespace = "http://pdjyh.soa.csg.cn", name = "EventMessage")
public JAXBElement&EventMessageType& createEventMessage(EventMessageType value) {
return new JAXBElement&EventMessageType&(_EventMessage_QNAME, EventMessageType.class, null, value);
* Create an instance of {@link JAXBElement }{@code &}{@link PublishMVFaultRepairWorkRequestType }{@code &}}
@XmlElementDecl(namespace = "http://pdjyh.soa.csg.cn", name = "PublishMVFaultRepairWorkRequest")
public JAXBElement&PublishMVFaultRepairWorkRequestType& createPublishMVFaultRepairWorkRequest(PublishMVFaultRepairWorkRequestType value) {
return new JAXBElement&PublishMVFaultRepairWorkRequestType&(_PublishMVFaultRepairWorkRequest_QNAME, PublishMVFaultRepairWorkRequestType.class, null, value);
* Create an instance of {@link JAXBElement }{@code &}{@link RequestMessageType }{@code &}}
@XmlElementDecl(namespace = "http://pdjyh.soa.csg.cn", name = "RequestMessage")
public JAXBElement&RequestMessageType& createRequestMessage(RequestMessageType value) {
return new JAXBElement&RequestMessageType&(_RequestMessage_QNAME, RequestMessageType.class, null, value);
* Create an instance of {@link JAXBElement }{@code &}{@link ResponseMessageType }{@code &}}
@XmlElementDecl(namespace = "http://pdjyh.soa.csg.cn", name = "ResponseMessage")
public JAXBElement&ResponseMessageType& createResponseMessage(ResponseMessageType value) {
return new JAXBElement&ResponseMessageType&(_ResponseMessage_QNAME, ResponseMessageType.class, null, value);
&标签:原文地址:http://www.cnblogs.com/a2sha5/p/5071626.html
&&国之画&&&& &&&&chrome插件
版权所有 京ICP备号-2
迷上了代码!

我要回帖

更多关于 php 命名空间 的文章

 

随机推荐