Web service integration not working

I've created a simple web service (with PHP) but I'm getting errors in Mendix when trying to use it. It works with other SOAP clients, but Mendix gives me the following error: Could not find element for path part 'info' on path 'urn:EducationLevel:getInfoResponse|info' The WSDL of the web service can be found at: http://www.pallett.nl/mendix/StudyEnrollment/EducationLevel/?wsdl Any clues as to what is going wrong? Is Mendix expecting something else than a standard SOAP response?
4 answers

The problem is in the SOAP response of the web service. The WSDL of your web service defines a message called "getInfoResponse" with one part called "info". As the WSDL style used is RPC/encoded, the SOAP response should consist of an element called "getInfoResponse" (the message name) containing an element called "info" (the part name). However, in the SOAP response of the web service, the element containing the result is called "return" instead of "info". This explains the error message that you get.


From the error message it seems that the runtime cannot find the "info" element within the "getInfoResponse" element. This might be a problem with the output of your web service. Could you post the literal XML response that the runtime receives from your web service? You can let the runtime log the XML that is sent to and received from web services by setting the log level of the "Webservices" module to DEBUG.


The following request gets sent by Mendix:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <axis2ns2:getInfo xmlns:axis2ns2="urn:EducationLevel">
            <name xsi:type="xsd:string">John Smith</name>

And it receives the following response:

<?xml version="1.0" encoding="UTF-8"?>
            <return xsi:type="xsd:string">High school (with Advanced Physics)</return>

This is what I expected and works in other SOAP clients. Any ideas?


This is the wsdl of the qa app, maybe it is of any use. It seems like the <wsdl:...> <xds:...> is missing in your tags. I've only used wsdl's generated by the modeler and have never done it with php, so maybe I'm saying something very stupid. ;)

Good luck!