我在订阅服务时遇到错误响应。 传输级别信息与SOAP Message名称空间URI
不匹配回复:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
X-UA-Compatible: IE=EmulateIE7
Set-Cookie: JSESSIONID=ED9D677679699927EC1C9CBACE00B7BA.server2; Path=/
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 25 Oct 2013 07:17:58 GMT
Connection: close
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:C8F752B9E879AE5333138268547859511312499</wsa:MessageID>
<wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<soapenv:Fault>
<faultcode/>
<faultstring>Transport level information does not match with SOAP Message namespace URI</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
这是我的PHP代码。我用过nusoap
require_once('lib/nusoap.php');
// Load SOAP URL
$client = new nusoap_client('http://192.168.1.34:1212/services/MYInterfaceTestingMgrService?wsdl','wsdl');
$client->soap_defencoding = 'utf-8';
$client->useHTTPPersistentConnection(); // Uses http 1.1 instead of 1.0
$soapaction = 'RemoveAppendantProduct'; // Load SOAP Action
// soap message
$request_xml = <<<SOAPXML
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:bus="http://www.xyz.com/bme/cbsinterface/cbs/businessmgrmsg"
xmlns:com="http://www.xyz.com/bme/cbsinterface/common"
xmlns:bus1="http://www.xyz.com/bme/cbsinterface/cbs/businessmgr">
<soap:Header/>
<soap:Body>
<bus:RemoveAppendantProductRequestMsg>
<RequestHeader>
<com:CommandId>RemoveAppendantProduct</com:CommandId>
<com:Version>xx</com:Version>
<com:TransactionId/>
<com:SequenceId>xx</com:SequenceId>
<com:RequestType>Event</com:RequestType>
<com:SessionEntity>
<com:Name>$xyz_Name</com:Name>
<com:Password>$xyz_Password</com:Password>
<com:RemoteAddress/>
</com:SessionEntity>
<com:SerialNo>$xyz_ser_no</com:SerialNo>
</RequestHeader>
<RemoveAppendantProductRequest>
<bus1:SubscriberNo>$xyzr_sub_id</bus1:SubscriberNo>
<bus1:Product>
<bus1:ProductID>$xyz_id</bus1:ProductID>
<bus1:ValidMode>123456</bus1:ValidMode>
<bus1:ExpireDate>$xyz_eff_date</bus1:ExpireDate>
</bus1:Product>
</RemoveAppendantProductRequest>
</bus:RemoveAppendantProductRequestMsg>
</soap:Body>
</soap:Envelope>
SOAPXML;
$err = $client->getError();
if ($err) {
echo 'Constructor error' . $err;
}
$result = $client->send($request_xml, $soapaction, ''); // passing soap message via soap php client
请告诉我如何解决这个问题。