这篇文章主要利用URLconnection调用webService接口,并利用dom4解析返回的数据
1.wsdl数据(访问http://localhost:8081/ERPDEMO/service/users?wsdl)
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://impl.service.demo.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://schemas.xmlsoap.org/soap/http" xmlns:ns1="http://service.demo.com/" name="UserServiceImplService" targetNamespace="http://impl.service.demo.com/">
<wsdl:import location="http://localhost:8081/ERPDEMO/service/users?wsdl=UserService.wsdl" namespace="http://service.demo.com/"></wsdl:import>
<wsdl:binding name="UserServiceImplServiceSoapBinding" type="ns1:UserService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getPermissions">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="getPermissions">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getPermissionsResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="selectByUserName">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="selectByUserName">
<soap:body use&