wsdl validation doesn't handle extension
Posted: Thu Jan 27, 2005 1:10 am
I'm trying to validate a simple wsdl document:
And Oxygen is complaining about the plink:partnerLinkType element, saying that it expects a wsdl element there.
However, the content model for the wsdl:definitions element is as follows:
Why does Oxygen not allow the non-wsdl extension element to fill the xsd:any slot after the wsdl elements? The exact validation error message is:
I don't see anything wrong with the instance. Is this a bug, or am I missing something?
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions
targetNamespace="http://loans.org/wsdl/loan-approval"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:lns="http://loans.org/wsdl/loan-approval"
xmlns:asns="http://tempuri.org/services/loanassessor"
xmlns:apns="http://tempuri.org/services/loanapprover"
xmlns:loandef="http://tempuri.org/services/loandefinitions">
<wsdl:import namespace="http://tempuri.org/services/loanassessor"
location="project:/wsdl/loanassessor.wsdl"/>
<wsdl:import namespace="http://tempuri.org/services/loanapprover"
location="project:/wsdl/loanapprover.wsdl"/>
<wsdl:import namespace="http://tempuri.org/services/loandefinitions"
location="project:/wsdl/loandefinitions.wsdl"/>
<!-- The service name and the TNS represent my service ID QName -->
<wsdl:service name="loanapprovalServiceBP"/>
<plnk:partnerLinkType name="loanApprovalLinkType">
<plnk:role name="approver">
<plnk:portType name="apns:loanApprovalPT"/>
</plnk:role>
</plnk:partnerLinkType>
<plnk:partnerLinkType name="riskAssessmentLinkType">
<plnk:role name="assessor">
<plnk:portType name="asns:riskAssessmentPT"/>
</plnk:role>
</plnk:partnerLinkType>
</wsdl:definitions>
However, the content model for the wsdl:definitions element is as follows:
Code: Select all
<complexType name="definitionsType">
<complexContent>
<extension base="wsdl:documented">
<sequence>
<element ref="wsdl:import" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:types" minOccurs="0"/>
<element ref="wsdl:message" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:portType" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:binding" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:service" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded">
<annotation>
<documentation>to support extensibility elements </documentation>
</annotation>
</any>
</sequence>
<attribute name="targetNamespace" type="uriReference" use="optional"/>
<attribute name="name" type="NMTOKEN" use="optional"/>
</extension>
</complexContent>
</complexType>
Code: Select all
cvc-complex-type.2.4.a: Invalid content was found starting with element 'plnk:partnerLinkType'. One of '{"http://schemas.xmlsoap.org/wsdl/":import, "http://schemas.xmlsoap.org/wsdl/":types, "http://schemas.xmlsoap.org/wsdl/":message, "http://schemas.xmlsoap.org/wsdl/":portType, "http://schemas.xmlsoap.org/wsdl/":binding, "http://schemas.xmlsoap.org/wsdl/":service}' is expected.
@see: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type