我在webservice里写了两个方法,调用不带参数的成功,带参数的怎么失败?
- XML code
<?xml version="1.0" encoding="utf-8" ?> - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">- <wsdl:types>- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">- <s:element name="GetImgs"> <s:complexType /> </s:element>- <s:element name="GetImgsResponse">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetImgsResult" type="s:string" /> </s:sequence> </s:complexType> </s:element>- <s:element name="GetImgByID">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="pid" type="s:string" /> </s:sequence> </s:complexType> </s:element>- <s:element name="GetImgByIDResponse">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetImgByIDResult" type="s:string" /> </s:sequence> </s:complexType> </s:element>- <s:element name="GetImgBody">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="pid" type="s:string" /> </s:sequence> </s:complexType> </s:element>- <s:element name="GetImgBodyResponse">- <s:complexType>- <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetImgBodyResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types>- <wsdl:message name="GetImgsSoapIn"> <wsdl:part name="parameters" element="tns:GetImgs" /> </wsdl:message>- <wsdl:message name="GetImgsSoapOut"> <wsdl:part name="parameters" element="tns:GetImgsResponse" /> </wsdl:message>- <wsdl:message name="GetImgByIDSoapIn"> <wsdl:part name="parameters" element="tns:GetImgByID" /> </wsdl:message>- <wsdl:message name="GetImgByIDSoapOut"> <wsdl:part name="parameters" element="tns:GetImgByIDResponse" /> </wsdl:message>- <wsdl:message name="GetImgBodySoapIn"> <wsdl:part name="parameters" element="tns:GetImgBody" /> </wsdl:message>- <wsdl:message name="GetImgBodySoapOut"> <wsdl:part name="parameters" element="tns:GetImgBodyResponse" /> </wsdl:message>- <wsdl:portType name="PicServiceSoap">- <wsdl:operation name="GetImgs"> <wsdl:input message="tns:GetImgsSoapIn" /> <wsdl:output message="tns:GetImgsSoapOut" /> </wsdl:operation>- <wsdl:operation name="GetImgByID"> <wsdl:input message="tns:GetImgByIDSoapIn" /> <wsdl:output message="tns:GetImgByIDSoapOut" /> </wsdl:operation>- <wsdl:operation name="GetImgBody"> <wsdl:input message="tns:GetImgBodySoapIn" /> <wsdl:output message="tns:GetImgBodySoapOut" /> </wsdl:operation> </wsdl:portType>- <wsdl:binding name="PicServiceSoap" type="tns:PicServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetImgs"> <soap:operation soapAction="http://tempuri.org/GetImgs" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input>- <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation>- <wsdl:operation name="GetImgByID"> <soap:operation soapAction="http://tempuri.org/GetImgByID" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input>- <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation>- <wsdl:operation name="GetImgBody"> <soap:operation soapAction="http://tempuri.org/GetImgBody" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input>- <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>- <wsdl:binding name="PicServiceSoap12" type="tns:PicServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetImgs"> <soap12:operation soapAction="http://tempuri.org/GetImgs" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input>- <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation>- <wsdl:operation name="GetImgByID"> <soap12:operation soapAction="http://tempuri.org/GetImgByID" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input>- <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation>- <wsdl:operation name="GetImgBody"> <soap12:operation soapAction="http://tempuri.org/GetImgBody" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input>- <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>- <wsdl:service name="PicService">- <wsdl:port name="PicServiceSoap" binding="tns:PicServiceSoap"> <soap:address location="http://192.168.1.147/webServer/PicService.asmx" /> </wsdl:port>- <wsdl:port name="PicServiceSoap12" binding="tns:PicServiceSoap12"> <soap12:address location="http://192.168.1.147/webServer/PicService.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>