我假設你正在使用的Java到WSDL方法所以,你想生成您的工件的WSDL。
我通常使用的另一種方法,WSDL到Java,並且對於像WSDL:
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://mynamespace" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://mynamespace">
...
<portType name="MySoapBinding">
<operation name="MyOperation">
...
</operation>
</portType>
<binding name="MySoapBinding" type="ns:MySoapBinding">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="MyOperation">
...
</operation>
</binding>
<service name="MyService">
<port name="MySoapBinding" binding="ns:MySoapBinding">
<soap:address location="http://localhost:8080/MyService"/>
</port>
</service>
</definitions>
產生的僞影,接口:
@WebService(name = "MySoapBinding", targetNamespace = "http://mynamespace")
public interface MySoapBinding {
...
}
和實現:
@WebService(name = "MySoapBinding", targetNamespace = "http://mynamespace", endpointInterface = "my.package.MySoapBinding", serviceName = "MyService", portName = "MySoapBinding")
public class MySoapBindingImpl
implements MySoapBinding
{
}
我想你可以嘗試給一個名稱的Web服務和WSDL生成的接口ated應該使用該名稱作爲綁定的名稱。