cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP WSDL Location URL incorrect when front-end URL different from admin URL

SOAP WSDL Location URL incorrect when front-end URL different from admin URL

I have a Magento v1.9.3.x site where the SOAP calls are not working.

There are several factors about our environment that might cause the problem:

  • we use a different subdomin for front-end website vs admin site
  • we use a load balancer in front of multiple servers

The main problem seems to be that when you request the WSDL via the front-end, it returns the admin URL in the < soap:address location="" /> element.

This is what is happening step by step:

  1. The client calls 'https://www.magentohost.com/api/v2_soap?wsdl=1'
  2. The server returns XML containing < soap:address location="https://admin.magentohost.com/index.php/api/v2_soap/index/?SID=88888888888888888888888888888888"/ >
  3. Calling 'https://admin.magentohost.com/index.php/api/v2_soap/index/?SID=88888888888888888888888888888888' returns a 301 redirect back to https://www.magentohost.com/ (with no query path or parameters)
  4. Obviously that will not work, so the client shows an error message saying 'SOAP-ERROR: Parsing WSDL: Couldn't load from https://admin.magentohost.com/index.php/api/v2_soap/index/?SID=88888888888888888888888888888888

Does anyone have a fix for this problem?

4 REPLIES 4

Re: SOAP WSDL Location URL incorrect when front-end URL different from admin URL

@pzarfosMay be something else. Frontend/Admin URL should now cause the issue I believe. When you browse WSDL URL do you see XML as below?

 

image.png

 

Do you have a test/dev/staging environment. Does it behave same on dev environment? Is there a way you can share the URL so that I can have a quick look?

 

Problem solved? Please give Kudos and accept answer as Solution.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: SOAP WSDL Location URL incorrect when front-end URL different from admin URL

The WSDL URL does look very much like the XML you show in your image.  The 2 strange parts are

  1. the "soap:address" element shows the admin URL reference
  2. it attaches a SID= value

like this...

 < soap:address location="https://admin.magentohost.com/index.php/api/v2_soap/index/?SID=88888888888888888888888888888888"/ >

 

We do have a test environment but it is different in that the front end and admin URLs are the same on the test server.  So that doesn't help us.

 

Any idea why the WSDL would show the admin URL for "soap:address" ?

Re: SOAP WSDL Location URL incorrect when front-end URL different from admin URL

Can you please share a screen capture where do you see the admin URL in
Soap Address. If you do not want to share your website URL then just hide
that area.
- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: SOAP WSDL Location URL incorrect when front-end URL different from admin URL

soapwsdl.jpg