根据wsdl生成的代码服务端只留了一个接口:
/**
- This class was generated by the JAX-WS RI.
- JAX-WS RI 2.2.4-b01
- Generated source version: 2.2
-
*/
@WebService(name = "BdxmServer", targetNamespace = "http://server.bdxm.dljk.web.ebidding.com.cn/")
public interface BdxmServer {/**
- @param cPrice
- @param cvalue
- @param packageName
- @param bidOpenTime
- @param biddingTime
- @param bidCode
- @param packageId
- @param bidName
- @param bidId
- @param packageCode
- @return
- returns java.lang.String */ @WebMethod @WebResult(name = "getCableInfoResponse", targetNamespace = "") @RequestWrapper(localName = "getCableInfo", targetNamespace = "http://server.bdxm.dljk.web.ebidding.com.cn/", className = "cn.com.ebidding.web.dljk.bdxm.server.GetCableInfo") @ResponseWrapper(localName = "getCableInfoResponse", targetNamespace = "http://server.bdxm.dljk.web.ebidding.com.cn/", className = "cn.com.ebidding.web.dljk.bdxm.server.GetCableInfoResponse") public String getCableInfo( @WebParam(name = "bid_id", targetNamespace = "") String bidId, @WebParam(name = "bid_code", targetNamespace = "") String bidCode, @WebParam(name = "bid_name", targetNamespace = "") String bidName, @WebParam(name = "package_id", targetNamespace = "") String packageId, @WebParam(name = "package_code", targetNamespace = "") String packageCode, @WebParam(name = "package_name", targetNamespace = "") String packageName, @WebParam(name = "bidding_time", targetNamespace = "") String biddingTime, @WebParam(name = "bid_open_time", targetNamespace = "") String bidOpenTime, @WebParam(name = "cvalue", targetNamespace = "") String cvalue, @WebParam(name = "cPrice", targetNamespace = "") String cPrice);
}
接口实现类:
import javax.jws.WebService;
@WebService(endpointInterface="cn.com.ebidding.web.dljk.bdxm.server.BdxmServer",
targetNamespace="http://server.bdxm.dljk.web.ebidding.com.cn/",
wsdlLocation="MEAT-INF/wsdl/dljk/BdxmServer.wsdl")
public class BdxmServerImpl implements BdxmServer {
@Override
public String getCableInfo(String bidId, String bidCode, String bidName,
String packageId, String packageCode, String packageName,
String biddingTime, String bidOpenTime, String cvalue, String cPrice) {
System.out.println("nidaye");
return "2222222222222222222";
}
}
wsdl文件:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
xmlns:tns="http://server.bdxm.dljk.web.ebidding.com.cn/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="BdxmServerImplService"
targetNamespace="http://server.bdxm.dljk.web.ebidding.com.cn/">
wsdl:types
<!-- /xsd:import -->
xsd:complexType
xsd:sequence
/xsd:sequence
/xsd:complexType
/xsd:element
<xsd:element name="getCableInfoResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="getCableInfoResponse" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getCableInfo">
<wsdl:part element="tns:getCableInfo" name="getCableInfo"/>
</wsdl:message>
<wsdl:message name="getCableInfoResponse">
<wsdl:part element="tns:getCableInfoResponse" name="getCableInfoResponse"/>
</wsdl:message>
<wsdl:portType name="BdxmServer">
<wsdl:operation name="getCableInfo">
<wsdl:input message="tns:getCableInfo"/>
<wsdl:output message="tns:getCableInfoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BdxmServerSOAP" type="tns:BdxmServer">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCableInfo">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BdxmServerImplService">
<wsdl:port binding="tns:BdxmServerSOAP" name="BdxmServerImplPort">
<soap:address location="http://localhost:8088/ebidding/services/BdxmServer/"/>
</wsdl:port>
</wsdl:service>