4

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

5
  • It is hard to test. Use soapUi/wireshark and check. Sometimes the endpoint is wrong configured. Commented Mar 8, 2012 at 14:59
  • hi! well i am printing out the outbound envelope from the cxf client and use this as a message in soap. strange but true it works. well but still not in the ide. so i don't get it. it is the same message and all other messages send before this one work ... Commented Mar 8, 2012 at 15:16
  • try to log the incoming message on your magento server which leads to this "invalid xml" response message Commented Mar 9, 2012 at 8:05
  • I could find a hint to this error by uploading a variety of images to the server. the difference between those was an increase of the data size. at one point the message could be send and the image data has been stored in magento. so this seems to be an size limit error ... maybe in php ? does somebody has a clue ? meanwhile i will contact my provider to get further information about this issue and the server configuration. Commented Mar 9, 2012 at 15:21
  • I've been using the API for months now, and just last week had it fail in the same fashion. Frustrating, for sure as there isn't anything I can find online yet. Commented May 11, 2012 at 15:17

3 Answers 3

1

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');
Sign up to request clarification or add additional context in comments.

1 Comment

Interestin... By now i solved the issue by deactivating the chunking in cxf. Which enabled me to send the whole soapmessage in one step.
0

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);

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.