SOAP partially works

Hi,

I’m trying to write a both Server and Client that will communicate using SOAP.

I used the example from this page.

When I try to get the .../index.php?r=stock/quote, I get the xml.

When I try to run the getPrice operation, I fail:

I used http://soapclient.com/soaptest.html as a SOAP client and it showed this error:


We are sorry, the requested operation failed. The server returned the following messages

Error Message: The extern component has failed in processing your requests. 



What am I doing wrong?

Thanks,

Zvi.

An update:

When I use SOAP UI application, I see that I get the error:

[html]

<h2>Error 400</h2>

<div class="error">

The CSRF token could not be verified.

</div>

</div>

<!-- content -->

</div>

</div><!-- page -->

[/html]

Here’s the possible solution.

Looks like your application hosting the soap service has CSRF validation enabled. You can try to disable it (it’s an attribute of the request component) to test your SOAP-service. Unfortunatelly, I have no idea how to get CSRF validation and the SOAP service together…

Thank you very much for this

Hi,

Thanks for this,

I must keep CSRF enabled,

Angel De La Noche’s solution should do the work (going to test it now)