WSDL validation failed for custom FAULT message

Having trouble installing Oxygen? Got a bug to report? Post it all here.
archenroot
Posts: 22
Joined: Wed Oct 26, 2011 2:20 pm

WSDL validation failed for custom FAULT message

Post by archenroot »

Hi,

I have following WSDL file:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:do="http://xmlns.lesycr.cz/DO/OsobaVybRiz/V1" xmlns:bs="http://xmlns.lesycr.cz/BS/OsobaVybRiz/V1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:core="http://xmlns.lesycr.cz/DO/Core/V1" targetNamespace="http://xmlns.lesycr.cz/BS/OsobaVybRiz/V1">
<documentation>
<ip:BusinessService ID="S20011" Name="OsobaVybRizBS" Version="1.0" Author="PBr" Created="2010-04-17" xmlns:ip="http://xmlns.lesycr.cz/IP/Info/V1">
<ip:Description>Služba poskytující osoby , které si prohlíželi výběrova řízení.</ip:Description>
</ip:BusinessService>
</documentation>
<types>
<xsd:schema elementFormDefault="qualified">
<xsd:import namespace="http://xmlns.lesycr.cz/DO/OsobaVybRiz/V1" schemaLocation="../../../../DataObjects/D200Portal/OsobaVybRiz/V1/OsobaVybRizDM.xsd"/>
</xsd:schema>
</types>
<message name="InsertOsobaVybRizListReqMsg">
<part name="InsertOsobaVybRizListDM" element="do:InsertOsobaVybRizListDM"/>
</message>
<message name="DataFaultMsg">
<part name="DataFault" element="core:DataFault"/>
</message>
<message name="OsobaVybRizRespMsg">
<part name="Result" element="core:Result"/>
</message>
<portType name="OsobaVybRizBS">
<operation name="insertOsobaVybRizList">
<input message="bs:InsertOsobaVybRizListReqMsg"/>
<output message="bs:OsobaVybRizRespMsg"/>
<fault name="fault" message="bs:DataFaultMsg"/>
</operation>
</portType>
<binding name="OsobaVybRizBSSOAP11Binding" type="bs:OsobaVybRizBS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="insertOsobaVybRizList">
<soap:operation soapAction="http://xmlns.lesycr.cz/BS/OsobaVybRiz/V1/insertOsobaVybRizList" style="document"/>
<input>
<soap:body parts="InsertOsobaVybRizListDM" use="literal"/>
</input>
<output>
<soap:body parts="Result" use="literal"/>
</output>
<fault name="fault">
<soap:body parts="DataFault" use="literal"/>
</fault>
</operation>
</binding>
</definitions>
But following custom fault definition is rejected by Oxygen validation

Code: Select all


<soap:body parts="DataFault" use="literal"/>
with message:
E [WSDL] The 'body' element defined here is undefined for the SOAP namespace. The only valid element is "fault".

Well, on the other hand, the Altova XML Spy says that WSDL is all right. I am facing same issue with this definition in Oracle Service Bus Workshop, of course I can disable WSDL validation before deploy. The joke is, that it's working in live scenarios.

Ladislav
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: WSDL validation failed for custom FAULT message

Post by Radu »

Hi Ladislav,

Unfortunately the WSDL "specification" is so limited that I do not know for certain if we should report an error in this case or not.
I'll keep digging.
I added this on our internal issues list so I will update the post when I find out more details.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: WSDL validation failed for custom FAULT message

Post by Radu »

Hi Ladisval,

The third party libraries we are using to construct a structured representation of the WSDL document consider a "soap:body" inside a "wsdl:fault" invalid so I think we will go with the present behavior.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
archenroot
Posts: 22
Joined: Wed Oct 26, 2011 2:20 pm

Re: WSDL validation failed for custom FAULT message

Post by archenroot »

I also didn't make decision if it is error or I found wsdl defined not based on standard (this is wsdl from our repository made by someone in the past). I will also try to make a deeper look into wsdl 1.1. specification and let you know.

For example:
Altova XML spy consider wsdl valid
Oracle Service Bus Workshop consider wsdl not valid
etc.

The only truth lies inside w3c specification, I will take a more precise look into the this strange thing.

Thank you for reply.

Ladislav
archenroot
Posts: 22
Joined: Wed Oct 26, 2011 2:20 pm

Re: WSDL validation failed for custom FAULT message

Post by archenroot »

Hi Radu,

well I wasn't completely successful but found that regarding fault parameter there are differences in Oracle own validator and wsdl4j. Of course I could live with that as soon as w3c is still just recommendation not rule.

Ladislav
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: WSDL validation failed for custom FAULT message

Post by Radu »

Hi,

To my knowledge WSDL 1.1 was rejected as a specification by the W3C (but was widely adopted by the industry).
While WSDL 2.0 was accepted as a recommendation by the W3C but the industry does not use it.
So with WSDL 1.1 different libraries may yield different results, the wsdl4j library which we are also using internally considers the "soap:body" which appears in the "wsdl:fault" as an unknown extensibility element instead of treating it as a SOAP extension element.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
archenroot
Posts: 22
Joined: Wed Oct 26, 2011 2:20 pm

Re: WSDL validation failed for custom FAULT message

Post by archenroot »

I see, it's exactly how you describe it. Well I can live with this even I don't know how many diffs are still over there. I would like to see WSDL 2.0 in real world as soon as possible :D

Thank Radu.
Post Reply