简体   繁体   English

无法获得Soap API来进行Magento安装

[英]Cannot get Soap API to work for Magento installation

After days of continual effort, I am at a complete loss as to why I cannot get the Soap API to work for my Magento Install. 经过数天的不断努力,我完全无法理解为什么无法使Soap API可以用于我的Magento安装。

The Magento Install is version 1.8.1 PHP version 5.3 Magento安装版本为1.8.1,PHP版本为5.3

I have a script that uses Oauth for authentication and Soap V2 (have also tested with Soap v1). 我有一个脚本,该脚本使用Oauth进行身份验证和Soap V2(也已通过Soap v1测试过)。

The URL for this script is dev.redxmedia.co.uk/aff1/oauth_customer.php Here is the code... 该脚本的URL是dev.redxmedia.co.uk/aff1/oauth_customer.php这是代码...

// Enable error reporting 
error_reporting(E_ALL);
ini_set('display_errors', '1');

//create soap object
$proxy = new SoapClient('http://dev.redxmedia.co.uk/1and1/api/v2_soap/?wsdl');

// create authorized session id using api user name and api key
// $sessionId = $proxy->login('apiUser', 'apiKey');
$sessionId = $proxy->login('aff1', 'password');

// Get customer info for customer id = 1
$customerinfo = $proxy->customerCustomerInfo($sessionId,1);

print_r($customerinfo);

The response received is as follows... 收到的响应如下...

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ' http://dev.redxmedia.co.uk/1and1/api/v2_soap/?wsdl ' : Start tag expected, '<' not found in /home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer.php:7 Stack trace: #0 /home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer.php(7): SoapClient->SoapClient(' http://dev.redx ...') #1 {main} thrown in /home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer.php on line 7 致命错误:未捕获的SoapFault异常:[WSDL] SOAP错误:解析WSDL:无法从' http://dev.redxmedia.co.uk/1and1/api/v2_soap/?wsdl '加载:起始标签应为' <'在/home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer.php:7中找不到堆栈跟踪:#0 /home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer .php(7):SoapClient-> SoapClient(' http://dev.redx ...')#1 {main}放在/home/sites/redxmedia.co.uk/public_html/dev/aff1/oauth_customer中。第7行的php

If you put the Soap URL in the browser directly you get what appears to be the expected response. 如果直接将Soap URL放置在浏览器中,您将获得预期的响应。

After going through many of the given responses in other Questions I believe I have satisfied the PHP configuation requirements. 在完成了其他问题中的许多给定响应之后,我相信我已经满足了PHP配置要求。

PHP info can be found at dev.redxmedia.co.uk/info.php PHP信息可在dev.redxmedia.co.uk/info.php中找到

The username and password given are active as this is not a live site, so please feel free to test... 所提供的用户名和密码是有效的,因为它不是一个实时站点,因此请随时进行测试...

Any help at this stage will be hugely appreciated...! 此阶段的任何帮助将不胜感激...!

Modify your URL adding this &type=soap 修改您的网址,添加此&type = soap

http://dev.redxmedia.co.uk/1and1/api/v2_soap/?wsdl&type=soap http://dev.redxmedia.co.uk/1and1/api/v2_soap/?wsdl&type=soap

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

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