Reputation: 501
I am writing on a soap client for magento using apache cxf. So far everything works fine like creating products changing categories, updating products etc. Well this works here on my local machine or a magento installation in the local network.
So I set up a magento shop on a server in the net. All calls to the api worked except one, the creation of a products media.
This is the response from the server.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>Sender</faultcode>
<faultstring>Invalid XML</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Maybe someone can help me with this.
Thanks in advance...
fritz
Upvotes: 4
Views: 3626
Reputation: 1299
If getting this error in the case of a Magento soap client generated for .Net Core C# (using this), you may need to create the client using the default constructor rather than providing the endpoint and binding myself. The default constructor sets up many parameters of the client, including the endpoint URL, security mode, allow cookies, etc.
Upvotes: 0
Reputation: 501
I found the solution to this issue.
This could be solved by turning of message-chungking in the apache cxf client.
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setAllowChunking(false);
Upvotes: 0
Reputation: 830
I had the same issue. What fixed it for me was making the call to https as I have a .htaccess rewrite that forces all traffic over SSL.
If you are doing something like rewriting urls to https, in your code, change the URL
$proxy = new SoapClient('http://example.com/api/v2_soap/?wsdl');
to
$proxy = new SoapClient('https://example.com/api/v2_soap/?wsdl');
Upvotes: 1