2010-07-27 01:38
浏览 55


Figured it out, see Update below.

I'm trying to work with a particular web service via PHP (tried both the native and Zend SOAP clients) and it only returns a failure status.

I suspect that it has something to do with the multiple beans in the retrieveMemberInfo method call (authBean, memberInfoBean).

Could someone take a look at the WSDL and point me in the right direction for this particular method call via the PHP client?

Here is what I have so far:

$service = new SoapClient('https://qa.everbridge.net/ws3/services/WebServices3?wsdl');
$result = $service->retrieveMemberInfo(array('loginId', 'orgName', 'password'), array('firstname', 'lastname'));


The problem was not with the WSDL call as originally thought. It was the format for the parameters used in the retrieveMemberInfo method call. Here is the full solution that correctly returns the SOAP response:

$params->authBean->loginId = 'username';
$params->authBean->orgName = 'orgName';
$params->authBean->password = 'password';
$params->memberInfoBean->firstName = 'firstName';
$params->memberInfoBean->lastName = 'lastName';

$service = new SoapClient('https://qa.everbridge.net/ws3/services/WebServices3?wsdl');
$result = $service->retrieveMemberInfo($params);


Now I just have to figure out how to parse the returned stdObject.

Thanks for the assistance.

图片转代码服务由CSDN问答提供 功能建议

想出来,请参阅下面的更新。</ strong> </ p> < 我正在尝试通过PHP使用特定的Web服务(尝试使用本机和Zend SOAP客户端),它只返回失败状态。</ p>

我怀疑它有某些东西 在retrieveMemberInfo方法调用中使用多个bean(authBean,memberInfoBean)。</ p>

有人可以看看WSDL并指出我正确的方向通过这个特定的方法调用 PHP客户端?</ p>

以下是我到目前为止的内容:</ p>

  $ service = new SoapClient('https://qa.everbridge  .net / ws3 / services / WebServices3?wsdl'); 
 $ result = $ service-&gt; retrieveMemberInfo(array('loginId','orgName','password'),array('firstname','lastname')  ); 
var_dump($ result); 
 </ code> </ pre> 

更新</ strong> </ p>

问题不在于 最初想到的WSDL调用。 它是retrieveMemberInfo方法调用中使用的参数的格式。 以下是正确返回SOAP响应的完整解决方案:</ p>

  $ params-&gt; authBean-&gt; loginId ='username'; 
 $ params-&gt; authBean-  &gt; orgName ='orgName'; 
 $ params-&gt; authBean-&gt; password ='password'; 
 $ params-&gt; memberInfoBean-&gt; firstName ='firstName'; 
 $ params-&gt; memberInfoBean  - &gt; lastName ='lastName'; 
 $ service = new SoapClient('https://qa.everbridge.net/ws3/services/WebServices3?wsdl'); 
 $ result = $ service-&gt;  retrieveMemberInfo($ params); 
var_dump($ result); 
 </ code> </ pre> 

现在我只需要弄清楚如何解析返回的stdObject。</ p>

感谢您的帮助。</ p> </ div>

3条回答 默认 最新

相关推荐 更多相似问题