Forum Discussion

msimmerson's avatar
msimmerson
Occasional Contributor
14 years ago

[Resolved] WsdlValidator Warning

Hi

I am using SOAPUI Pro 4.0.1 and am getting the following warning when my service returns a (expected) SOAP Fault.

My WSDL contains the fault declarations in all the appropriate places i.e. message, port and binding and the schema is imported correctly. As far as I am concerned, the response is correct and is exactly what I expected from the schema and the WSDL, but I can't get rid of this warning. I have other services that use the same Fault schema and, as far as I can see, declare fault usage in the same way.

The fault schema is described below the error message.

Any pointers would be much appreciated.

Cheers

Matt

2012-01-31 13:22:08,458 WARN [WsdlValidator] Missing matching Fault in wsdl for Fault Detail element [<detail xmlns:fault="http://www.sanitised.com/schema/fault/1.0">
<fault:Fault>
<code>1000</code>
<message>Connection Request Failed XML Validation,
Correlation Id - 1 ,
Number - 1 ,
Cut-off timestamp - 2008-09-29T14:49:45 ,
Num retries - a ,
Wait Period - a ,
Type - 1RECONNECT</message>
<processId>1</processId>
<shortMessage>Invalid Request</shortMessage>
<time>2012-01-31T13:22:13.715+13:00</time>
</fault:Fault>
</detail>] in bindingOperation [connectionRequest]



<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.sanitised.com/schema/fault/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sanitised.com/schema/fault/1.0">
<xsd:element name="Fault" type="Fault"/>
<xsd:complexType name="Fault">
<xsd:sequence>
<xsd:element name="code" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<xsd:element name="message" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="processId" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="shortMessage" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="time" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
  • Hi,

    can you please send your WSDL file here or by email, and also whole fault Response

    regards
    nebojsa
    SmartBear Software
  • msimmerson's avatar
    msimmerson
    Occasional Contributor
    I have sent you an email with all the relevant files.

    Cheers

    Matt
  • msimmerson's avatar
    msimmerson
    Occasional Contributor
    Thanks to Smartbear support I have a solution to the issue.

    The errors was with the returned SOAP Fault in the detail stanza. Whilst the fault is modelled in an XSD with a type Fault - in the containing WSDL it is wrapped into an exception element for example ConnectionException. It is this that should appear in the detail section as shown below. The ns namespace should be the appropriate namespace as declared in the WSDL and should be declared in the body or envelope tags of the SOAP fault.

    Hope that helps others.

    Cheers

    Matt

    <ns:ConnectionException>
    <code>1000</code>
    <message>Connection Request Failed XML Validation,
    Correlation Id - 1 ,
    Number - 1 ,
    Cut-off timestamp - 2008-09-29T14:49:45 ,
    Num retries - a ,
    Wait Period - a ,
    Type - 1RECONNECT</message>
    <processId>1</processId>
    <shortMessage>Invalid Request</shortMessage>
    <time>2012-01-31T13:22:13.715+13:00</time>
    </ns:ConnectionException>