Web services CXF的Spring HTTP绑定工厂问题
在尝试使用CXF生成的客户端调用web服务时,我遇到了一个关于HTTP绑定工厂的异常。客户端代码为:Web services CXF的Spring HTTP绑定工厂问题,web-services,spring,cxf,Web Services,Spring,Cxf,在尝试使用CXF生成的客户端调用web服务时,我遇到了一个关于HTTP绑定工厂的异常。客户端代码为: private final static QName SERVICE = new QName("http://com.myAppService.service", "myService"); try { wsdlURL = new URL("http://myAppservice.com/services/myService?wsdl");
private final static QName SERVICE = new QName("http://com.myAppService.service", "myService");
try {
wsdlURL = new URL("http://myAppservice.com/services/myService?wsdl");
} catch (MalformedURLException ex) {
ex.printStackTrace();
throw new Exception (THIS_METHOD + ex.getMessage() );
}
try{
service = new MyAppService(wsdlURL, SERVICE);
port = service.getMyServiceHttpport();
我在控制台上看到的例外情况是:
[2/18/13 4:27:00:295 PST] 00000609 SystemErr R Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/http/ registered.
at org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:91)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:114)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
at javax.xml.ws.Service.getPort(Service.java:40)
at com.cisco.myAppService.service.MyService.getMyServiceHttpport(MyService.java:129)
知道如何绑定HTTP端口吗。我的wsdl的标题是:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:impl="http://com.cisco.ipcentral.service" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://com.cisco.ipcentral.service">
<wsdl:documentation>MyService</wsdl:documentation>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://com.myAppService.service">
我的服务