我是由一个带有soapaction =“”的wsdl的soap webservice提供的
<wsdl:binding name="SimpleSearchRequestSoapBinding" type="impl:SimpleSearchRequest">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getSearchResults"><wsdlsoap:operation **soapAction=""**/>
<wsdl:input name="getSearchResultsRequest">
<wsdlsoap:body use="literal"/></wsdl:input>
<wsdl:output name="getSearchResultsResponse">
<wsdlsoap:body use="literal"/></wsdl:output>
</wsdl:operation>
像这样点击网络服务:
SoapObject request = new SoapObject(OKMConstants.NAMESPACE, OKMConstants.OPERATION_NAME);
request.addProperty("searchParam","faq");
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
soapEnvelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(OKMConstants.url);
httpTransport.call("", soapEnvelope);
// Object response = soapEnvelope.getResponse();
SoapObject result = (SoapObject)soapEnvelope.bodyIn;
但它的抛出异常:
org.xmlpull.v1.XmlPullParserException: Expected a quoted string (position:DOCDECL @1:62 in java.io.InputStreamReader@410b9d60)