如何在Java代码中使用Java Web服务将SOAP 1.1转换为SOAP 1.2?
Java中有一个迁移 我得到了一个.wsdl,在cxf maven插件中,我刚刚创建了存根,安装了服务并将其提交给客户 当客户试图打电话时如何在Java代码中使用Java Web服务将SOAP 1.1转换为SOAP 1.2?,java,soap,soap1.2,Java,Soap,Soap1.2,Java中有一个迁移 我得到了一个.wsdl,在cxf maven插件中,我刚刚创建了存根,安装了服务并将其提交给客户 当客户试图打电话时 has thrown exception, unwinding now: org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint. 以下是Java代码: 接口 @HandlerChain(file
has thrown exception, unwinding now: org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.
以下是Java代码:
接口
@HandlerChain(file = "/handler-chain.xml")
@WebService(targetNamespace = "http://tsb.eto.com/terp/ws/v2", name = "Terp-v2")
@XmlSeeAlso({com.eto.psi.tsb.schema.common.ObjectFactory.class, com.eto.psi.tsb.schema.offering.ObjectFactory.class, com.eto.psi.kil.system.message.ObjectFactory.class, com.eto.tsb.terp.ws.schema.ObjectFactory.class, com.eto.psi.tsb.schema.task.ObjectFactory.class, com.eto.psi.tsb.schema.servicecontract.ObjectFactory.class, com.eto.psi.tsb.schema.project.ObjectFactory.class, com.eto.tsb.tsb.ObjectFactory.class, com.eto.psi.tsb.schema.customer.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
实施:
@javax.jws.WebService(
serviceName = "TerpService",
portName = "soap",
targetNamespace = "http://tsb.eto.com/terp/ws/v2",
//wsdlLocation = "classpath:templates/terp-tone.wsdl",
endpointInterface = "com.eto.tsb.terp.ws.v2.TerpV2")
public class SoapImpl implements TerpV2 {
我应该对代码做哪些更改才能使其成为1.2?我已经对我的Java代码做了以下更改,现在事情已经解决了
@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
public class SoapImpl implements TerpV2 {