Why am I seeing an Invalid WSDL file at domain message when integrating with Magento?

  • 30 December 2021
  • 4 replies

Badge +2

When trying to add integration from Klaviyo (Magento ver., receive the following message:

Invalid WSDL file at Received error message: "<unknown>:1:0: no element found." Please contact support or forward this error to your technical team.)


 Any ideas?


Best answer by klaviyojad 19 January 2022, 15:31

View original

4 replies

Userlevel 2
Badge +9

@snyderm.   if you were to append to the your server url /index.php/api/v2_soap?wsdl=1  does it generate a valid WSDL file?

Alternatively you can plug the url onto site to check

Badge +2

I am able to generate a file when I append the URL with the following: /api/v2_soap?wsdl=1

But still get the error when trying to add the integration.

Userlevel 2
Badge +9

@snyderm we received new feedback from engineers regarding this error


They are stating that the issue is something with the client's xml.  We ran it through a validator and got some errors so that might be helpful: 


Result: WSDL OrderPriority: ERRORDescription:WSDL elements should be placed in the correct order so that tools can handle the WSDL file correctly.The structure of your WSDL is:types (1)message (12)portType (1)binding (1)service (1)message (324)But should be:typesmessagesportTypesbindingsservices


hope this helps.

Userlevel 2
Badge +9

@snyderm after further research the engineers have determined that the parser was throwing the error because our app was receiving an empty response when fetching the wsdl file.  It must be that the nginx server is returning an empty response when Klaviyo is trying to connect using the user agent 'Klaviyo/1.0".  It seems that it works fine for other user agents including postman but not for our app's user agent.