你的Web服务的调用方式是Document,不是RPC。
<operation name="testAction"><soap:operation style="document"/>...
你现在的程序是RPC调用,返回的肯定是null的。
正确调用的SOAP请求应该是这样的:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:testAction xmlns:m="http://webservice.sinoair.com:7001/MOTOWebService">hello</m:testAction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP响应是:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Header/>
<env:Body>
<n1:testActionResponse xmlns:n1="http://webservice.sinoair.com:7001/MOTOWebService">The testAction in BOL webservice has been invoked with arguments: hello</n1:testActionResponse>
</env:Body>
</env:Envelope>