People who code: we want your input. Take the Survey

Hot answers tagged

17

Apparently I fell prey to a common Magento pitfall, so I'm posting the answer in case anyone else is searching this particular error. Basically, the error was coming from the Magento installation I was trying to call via the SOAP API. Initially I thought the error was generated by the client being unable to locate this definitions result, however the real ...


7

SOAP V1: http://magentohost/index.php/api/soap/?wsdl (this one is more like RPC, no concrete operations defined in WSDL, just call) SOAP V2: http://magentohost/index.php/api/v2_soap?wsdl=1 . For strongly-typed languages use this one and remember to enable WS-I compliance mode on Magento side: Services > Magento Core API > WS-I Compliance to Yes


7

And we changed it... If you're looking for Magento Dev RC - SOAP WSDL's the new pattern is like so (with some examples) $HOME/soap/default?wsdl=1&services=catalogProductRepositoryV1 $HOME/soap/default?wsdl=1&services=customerAccountManagementV1 To figure out what the service is called look at both the module name (also namespace) and it's ...


5

FedEx have changed their Web-Service URL. If you're on 1.7.0.2 copy the file app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php to /app/code/local/Mage/Usa/Model/Shipping/Carrier/Fedex.php and make the following changes to it: Line 135 $client->__setLocation($this->getConfigFlag('sandbox_mode') ? 'https://wsbeta.fedex.com:443/web-services/...


5

I was playing with API today. It looks URLs like these work on beta2: $HOME/soap/?services=customerAccountManagementV1&wsdl $HOME/soap/?services=customerGroupRepositoryV1&wsdl Service name translation is being done in Magento\Webapi\Helper\Data::getServiceNameParts() and there are examples in docblock there. Examples are probably outdated, but they ...


4

I tried the SOAP Web Services on my local host and it was working fine. The reason why the Magento 2 was not able to give a response to the request was because it was not able to verify SSL Certificates enabled on the site. The way I resolved it was to allow self signed SSL verification: $opts = [ 'http' => [ 'header' => "...


3

It seems your URL is wrong. It should be https://www.ourshop.com/shop/index.php/api/v2_soap/?wsdl=1 instead of https://www.ourshop.com/shop/index.php/api/v2_soap/index/


3

Your WSDL XML might be erroneous/not valid. After a quick Google I found this answer on StackOverflow: https://stackoverflow.com/a/12319009/1306684 I says there might be other output than the XML only. If you open the URL in your browser, then scroll all the way down to see if there is other output (like a PHP error). If you open the WSDL in your browser, ...


3

Your error is "The image is not specified" Your "file" key is missing in request check example. "content" and "mime" should be in key "file" $proxy = new SoapClient('http://magentohost/api/soap/?wsdl'); $sessionId = $proxy->login('apiUser', 'apiKey'); $productId = 2; $file = array( 'content' => '/9j/4AAQSkZJRgABAQEAYABgAAD/...


2

I think the best approach would be to implement your own API method based on existing customer and address methods. You'll have to create a custom module. Module structure: -Foo/ --Bar/ ---etc/ ----api.xml ----config.xml ----wsdl.xml ---Model/ ----Customer/ -----Api/ ------V2.php -----Api.php etc/api.xml <?xml version="1.0"?> <config> <...


2

Ah fun stuff. This problem was occurring between two load balanced servers. When magento tried to access itself by hostname one server was actually going to the other server, causing the 401 unauthorized. We updated the hosts file so that each server knew to go to itself and not the other, and the weird problems disappeared. I'm not quire sure why ...


2

you cannot write php code in the wsdl files. But you can make your type helloHellomultiCreateAddEntity support an array of key-value pairs and you can send the attribute codes and values. You can see an example in the wsdl.xml from the catalog module. Search for the type catalogProductReturnEntity. You will find this line <element name="...


2

in magento2, the API endpoints are protected. So to download the wsdl, you need authentication. I know (or maybe I did not find it) that SoapUI for example does not support authenticating for WSDL's. So I downloaded the WSDL through some other client which can send the authentication header and then added it to SOAP UI from the local downloaded WSDL file. ...


2

Wrap your script in try-catch block and catch \SoapFault exceptions, which are generated by \SoapClient, then you should be able to see exception message: try { $session = $testClient->login($apiUser, $apiPass); } catch (\SoapFault $e) { echo $e->getMessage(); }


2

Open your php.ini file from your remote server or local server and set always_populate_raw_post_data to -1. After that you need to restart your Apache server. Once restart have done please run your script again.


2

I´ve found the problem with the connection failure. For those who running in the same problems: In my case there was missing the intermediate certificate in the webserver. This was not a problem for the web Browser, but for the SOAP client. When I checked the installed certificate with (https://www.sslshopper.com/ssl-checker.html), I got a result like ...


1

This helped me to fix the failed to load external entity issue https://community.magento.com/t5/Magento-2-x-Technical-Issues/SOAP-Error-Failed-to-load-external-entity/m-p/38906#M917 Adding my snippet $wsdl = 'http://m2.local.com/soap/?wsdl&services=integrationAdminTokenServiceV1'; $client = $this->soapClient->create($wsdl, array("...


1

To send a token, that you get from http://192.168.0.183/M2EE/soap/default?wsdl&services=integrationAdminTokenServiceV1 , you need to add the HTTP authorization header e.g. "Authorization: Bearer <put your token here>" "" should be replaced with your token.


1

The WSDL is the same, you can pass store_id as parameters.


1

Create a new module under local and put extension wsdl.xml to app/code/local/VendorName/ModuleName/etc/wsdl.xml. Then it will be correctly merged into resulting WSDL document.


1

I solve changing the top header: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:Magento" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:...


1

The product in magento use the EAV paradigm. This means you can add attributes to products without altering the table schema. But this also has a side effect. you cannot know at any given point what are the attributes of a product just by the main table structure. Since attributes can be added by the admins from the UI, there is no way to know what elements ...


1

I don't know if the following one is the correct answer for the problem (my own solution was: testing the soap-call only from my local server), but I think it could be a solution for the problem. I think the problem could have been caused by the php wsdl-caching. The tab "overview" in http://www.magentocommerce.com/magento-connect/wsdl-cache-flush.html ...


1

I found the error. MagentoService is a Web Reference in Visual Studio 2013, and don't update wsdl definition automaticaly. I must update the Web Reference manually in Visual Studio 2013. So easy... so dificult... Thanks Marius you guide me to the solution!


1

It's almost certainly a blank line at the start of a file.


1

Try using this script to find the extra whitespace: http://christian.roy.name/blog/removing-extra-whitespaces-bunch-php-files-using-ack-grep-and-emacs You'll obviously need ssh for this and you should backup your files before running this or any script that edits your files


1

Use this method ... i am going with it and its working fantastic for me and i also use it for update also... public class MainActivity extends Activity implements OnClickListener { Button click; HttpTransportSE androidHttpTransport; SoapObject request ; SoapSerializationEnvelope env = new SoapSerializationEnvelope(SoapEnvelope.VER11); ...


1

Hey I work with this type of functionality. 1) Send the request URL from your android or iPhone devices with the POST OR GET METHOD in json format like simple url www.domain.com/createnewuser.php fie. 2) In php file must reside in the mangento installation folder. 3) in this file you can easily fetch data in passed by GET OR POST Method and decoede that ...


1

Magento has its own soap connection. By using this connection you can new create customer. see this "http://www.magentocommerce.com/api/soap/customer/customer.create.html".Here details have been described.


Only top voted, non community-wiki answers of a minimum length are eligible