简体   繁体   English

将SOAP客户端从PHP5转换为PHP4 / nuSOAP的WSDL错误

[英]WSDL error on translating SOAP client from PHP5 to PHP4/nuSOAP

Alright, I'm tired of racking my brain on this, so hopefully someone here can enlighten me: 好吧,我已经筋疲力尽了,所以希望这里有人可以启发我:

I'm trying to access a SOAP service using PHP and nuSOAP. 我正在尝试使用PHP和nuSOAP访问SOAP服务。 While I have successfully accessed the service using PHP5's built-in SoapClient, I am unfortunately limited to PHP4, and using nuSOAP; 虽然我已经使用PHP5的内置SoapClient成功访问了该服务,但不幸的是,我仅限于PHP4,并使用了nuSOAP。 resulting in a WSDL error that I can't figure out. 导致我无法弄清的WSDL错误。

The PHP5 code (works): PHP5代码(有效):

   $wsdl= 'https://mybilling.hipointinc.com:8443/wsdl.fcgi?get=Session.xsd';
   $soap_client = new SoapClient($wsdl, array('trace'=>1));

   $args = array("login" => $account_id, "password" => $password, "domain" => $domain);
   $session = $soap_client->login($args);

The nuSOAP code (doesn't work): nuSOAP代码(无效):

   $wsdl= 'https://mybilling.hipointinc.com:8443/wsdl.fcgi?get=Session.xsd';
   $namespace = 'https://mybilling.hipointinc.com/UM/SOAP/Session';
   $soap_client = new soapclient($wsdl, true, null, $namespace);

   $args = array("login" => $account_id, "password" => $password, "domain" => $domain);
   $session = $soap_client->call('login', array($args));

This returns the following error: 这将返回以下错误:

  wsdl error: http://schemas.portaone.com/soap:LoginRequest (LoginRequest) is not a supported type.

Why does the PHP5 version work, while the nuSOAP version doesn't? 为什么php5版本可以工作,而nuSOAP版本却不能工作? I'm sure it just something stupid I've overlooked, but I would appreciate some help. 我敢肯定,这只是我忽略的愚蠢之举,但我将不胜感激。

For more info, I'm using the Porta Switch, PortaBilling XML API: documentation 有关更多信息,我正在使用Porta Switch,PortaBilling XML API: 文档

Ok, after exploring this some more, I finally came to the answer: I had to upgrade the version of the nuSOAP library I was using. 好的,在进一步研究之后,我终于得出了答案:我必须升级正在使用的nuSOAP库的版本。 Turns out I had an older version, and simply updating that version resolved the problem (Sigh) I knew it was something stupid, but for any of you future coders who happen upon this thread via google: Learn from my mistake, and make sure the resources you are using are up-to-date. 原来我有一个较旧的版本,只是更新了该版本就解决了这个问题(叹气),我知道这很愚蠢,但对于通过google发生在此线程上的任何将来的编码人员:请学习我的错误,并确保您正在使用的资源是最新的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM