Forum Discussion

Xarx123's avatar
Xarx123
Occasional Contributor
11 years ago

Inline xsi:schemaLocation supported?

Is inline xsi:schemaLocation supported by the validator of SOAP requests?

I have a SOAP request like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
.....
<omsSvc:businessData xmlns:omsSvc="http://service.xxx.cz/oms/service/v01">
<omsSvc:documentData xsi:type="tns:M600Type" xsi:schemaLocation="http://service.xxx.cz/oms/document/M600/v01 http://www.xxx.cz/xxx/M600.xsd"
xmlns:tns="http://service.xxx.cz/oms/document/M600/v01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
.....
</omsSvc:documentData>
</omsSvc:businessData>
.....
</soapenv:Body>
</soapenv:Envelope>

When I validate it (Alt-V), I get the following error:
Invalid xsi:type qname: 'tns:M600Type' in element businessData@http://service.xxx.cz/oms/service/v01

Does SoapUI SOAP message validator support this xsi:schemaLocation attribute?

7 Replies

  • Hi,

    Please try validating the soap request in another tool and see if any errors occur. I haven't seen any soap requests that use the xsi:schemaLocation inline like that.



    Regards,
    Marcus
    SmartBear Support
  • Xarx123's avatar
    Xarx123
    Occasional Contributor
    Our client has such SOAP messages for practical reasons. They are formed as a common wrapper for tens of business body types, and therefore it would be impractical to import XSD schema for every of these XSD schemas into the WSDL schema.

    They validate the messages with Altova XmlSpy. But SoapUI doesn't seem to be able to recognize the inline use of the xsi:schemaLocation attribute.
  • Thanks for this awesome post. There’s a lot of useful and interesting information on here. Keep up the top work!
  • Xarx123's avatar
    Xarx123
    Occasional Contributor
    Unfortunately, still don't know the answer to my question - does SoapUI validation support the attribute or not?
    Does anyone know the answer?
  • Hi,

    I have tried to validate using the xsi:schemaLocation in SoapUI, and received an error as well.
    We will try to take a further look at this.
  • Xarx123's avatar
    Xarx123
    Occasional Contributor
    The referenced schema is valid, I use it after explicitly including the referred XSD files into the "outer" document schema (prefix omsSvc in my example above).
    But I'm not sure about the xsi:schemaLocation file-path syntax, so the problem may be here.

    However, I used ProcessMonitor and WireShark to see whether SoapUI looks for the schema file somewhere, but didn't come across any SoapUI network nor disk communication concerning a file with the schema name. So I think that SoapUI simply ignores this attribute, but I'm not sure.