完整代码:
https://gitee.com/yizhichao/boss
工具下载:
axis2
https://pan.baidu.com/s/1FlO5wYYTxkfVSI4fHM84rg
bossService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="bossService" targetNamespace="http://allcam.com/bpc/webservice/bossService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://allcam.com/bpc/webservice/bossService/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema targetNamespace="http://allcam.com/bpc/webservice/bossService/">
<xsd:element name="BossRequestDto">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="oprUserName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="oprUserPassword" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="oprCode" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientHomeCityNo" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientHomeCityName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientHomeAreaNo" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientHomeAreaName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="clientGrpID" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="clientSubID" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="oprEffTime" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="clientOprMobile" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="clientOprName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="basicBillSetID" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BossResponseDto">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="responseCode" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="responseDesc" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="HZBServiceMgtAddReq">
<wsdl:part name="parameters" element="tns:BossRequestDto">
</wsdl:part>
</wsdl:message>
<wsdl:message name="HZBServiceMgtAddRes">
<wsdl:part name="parameters" element="tns:BossResponseDto">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="bossService">
<wsdl:operation name="hzbServiceMgtAdd">
<wsdl:input message="tns:HZBServiceMgtAddReq">
</wsdl:input>
<wsdl:output message="tns:HZBServiceMgtAddRes">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="bossServiceSOAP" type="tns:bossService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="hzbServiceMgtAdd">
<soap:operation soapAction="http://allcam.com/bpc/webservice/bossService/hzbServiceMgtAdd"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="bossService">
<wsdl:port name="bossServiceSOAP" binding="tns:bossServiceSOAP">
<soap:address location="http://172.16.20.111:8080/HZBBOSSServer/services/bossService/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
配置环境变量:
生成服务端:
http://172.16.20.111:8080/HZBBOSSServer/services/bossService?wsdl
生成客户端
简单实现服务端:
简单实现客户端:
运行客户端结果:
通过soapUI测试结果截图: