我有一个 wsdl 文件,如下所示
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:not="http://notification.ws.api.com/">
<soapenv:Header/>
<soapenv:Body>
<not:getNotificationWS>
<!--Optional:-->
<notification>
<!--Zero or more repetitions:-->
<notificationList>
<!--Optional:-->
<email>?</email>
<!--Optional:-->
<phone>?</phone>
<userId>?</userId>
</notificationList>
</notification>
</not:getNotificationWS>
</soapenv:Body>
</soapenv:Envelope>
我在我的php中通过soap调用上面的wsdl,下面是我试图调用上面的wsdl的soapcall。
$response = new SoapClient("http://127.0.0.1:8080/API/ws/TESTWS?wsdl");
try{
$soapstr = $response->__soapCall("getNotificationWS",array("parameters" => array( 'email' => "google@gmail.com",
'phone' => "1111111",
'userId' => "100"
)));
echo print_r($soapstr);
}catch (Exception $e){
echo $e->getMessage();
}
我没有得到任何输出或错误。我打印我的最后一个请求,它返回以下 xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://notification.ws.api.easymed.com/">
<SOAP-ENV:Body>
<ns1:getNotificationWS />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
如何在php中的soap请求中发送数据建议我。