0

I have the following definitions inside my WSDL

<wsdl:types>
    <xs:schema targetNamespace="http://tryme.limes2.dev/interface/interface/schemas/types" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:l2="http://tryme.local.dev/interface/interface/schemas/types">
        <xs:element name="AuthDataResponse">
            <xs:annotation>
                <xs:documentation>The response for authorization requests.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
                <xs:all>
                    <xs:element ref="l2:SuccessResponse" minOccurs="1" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Success result.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="token" type="xs:string" minOccurs="1" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>The token required for all actions.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:all>
            </xs:complexType>
        </xs:element>
        <xs:element name="SuccessResponse">
            <xs:complexType>
                <xs:all>
                    <xs:element name="message" type="xs:string" minOccurs="1" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>The message returned by the server.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="success" type="xs:boolean" minOccurs="1" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Success result.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:all>
            </xs:complexType>
        </xs:element>
...

(WSDL is generated by IBM Enterprise Architect)

Zend_Soap_Server is running in WSDL mode and accepts input. I have written a small PHP function that is supposed to require an AuthDataRequest and return an AuthDataResponse Object, with a token (string) and SuccessResponse Object.

The response i get from the Server is:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tryme.local.dev/interface/interface/schemas/types">
   <SOAP-ENV:Body>
      <ns1:AuthDataResponse>
         <SuccessResponse>
            <message/>
            <success>true</success>
         </SuccessResponse>
         <token>xVzSFnC5LmqJ4sNG</token>
      </ns1:AuthDataResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Which fails SoapUIs Schema Compliance test, because it gives SuccessResponse and not ns1:SuccessResponse. What exactly is going wrong here? Do you need any additional information?

Kind regards, tim3trick

Timetrick
  • 186
  • 1
  • 9
  • What is a "SoapUIs Schema Compliance test"? And did it RTFM? Related: http://stackoverflow.com/questions/8650580/change-soap-prefixes-in-php – ficuscr Dec 20 '12 at 15:10
  • "Schema Compliance - validates that the last received message is compliant with the associated WSDL or WADL schema definition." From: http://www.soapui.org/Functional-Testing/getting-started-with-assertions.html. What do you mean by "did it RTFM"? And actually i can not believe that the tools i use (Zend Framework / SoapUI) could have these flaws, i'm expecting myself to do something wrong... – Timetrick Dec 20 '12 at 15:31
  • OK, so it works just fine but fails some tools validation? Perhaps look at generating XSD's and using PHP itself (DOMDocument) to perform validation. I don't think there is anything truly invalid. – ficuscr Dec 20 '12 at 15:36

0 Answers0