S
Sebastien Tardif
Subject: Web Services Enhancements 2.0 Service Pack 1 (WSE) unable to consume
WSDL from the WSDL Extension for SOAP in DIME specification
The WSDL Extension for SOAP in DIME specification can be obtained at this
URL:
http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm
This specification includes a WSDL. This WSDL cannot be consumed by .NET
without an error message.
The error message is:
C:\ClientDotNetPrototype\CSharpTest\CSharpTest\Web
References\WebReference\Reference.map(1): Custom tool error: Unable to import
WebService/Schema. Unable to import binding 'SoapDimeBinding' from namespace
'http://example.com/DimeExample/Service/'. Unable to import operation
'PutCompanyInfo'. Unable to import binding 'SoapDimeBinding' from namespace
'http://example.com/DimeExample/Service/'. Unable to import operation
'PutCompanyInfo'. The attribute location is missing.
The same error happens without WSE, using only Microsoft .NET Framework 1.1
Version 1.1.4322 SP1.
It seems that WSE or .NET framework expect instead an illegal XML Schema:
Having this:
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:restriction base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional" />
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
Instead of:
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
After the modification using the illegal XML Schema we receive just a warning:
C:\ClientDotNetPrototype\CSharpTest\CSharpTest\Web
References\WebReference1\Reference.map(1): Custom tool warning: At least one
necessary import ServiceDescriptionFormatExtension has been ignored.
Now you my wonder why I say it’s an illegal XML Schema.
Because:
- XML Spy Version 2004 rel. 4 said: Schema error – undefined value for
‘base’ encountered – you must use a complexType instead of ‘xs:base64Binary’,
because a simpleContent/restriction can’t be based on a simpleType.
- Castor from: http://www.castor.org/xml-framework.html give same error as
XML Spy.
- As point out by this:
http://lists.w3.org/Archives/Public/xmlschema-dev/2002Oct/0031.html
- XML Schema specification from:
http://www.w3.org/TR/xmlschema-1/#ct-props-correct said: If the {base type
definition} is a simple type definition, the {derivation method} must be
extension.
- More recent work also confirm this constraint:
http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/
What I expect from Microsoft:
- Publicizes this defect.
- Publicizes a Patch in the next two weeks.
- Includes the patch in subsequent service pack for .NET 1.0, .NET 1.1 and WSE
For completeness here the WSDL from the WSDL Extension for SOAP in DIME
specification that Microsoft wrote:
<?xml version="1.0" ?>
<wsdl:definitions name="DIME Example"
targetNamespace="http://example.com/DimeExample/Service/"
xmlns:svc="http://example.com/DimeExample/Service/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
xmlns:msg="http://example.com/DimeExample/Messages/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema targetNamespace="http://example.com/DimeExample/Messages/"
elementFormDefault="qualified">
<xs:import
namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/" />
<xs:import
namespace="http://schemas.xmlsoap.org/ws/2002/04/reference/" />
<xs:element name="PutCompanyInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="tickerSymbol" type="xs:string" />
<xs:element name="logo" type="msg:Logo" minOccurs="0" />
<xs:element name="doc" type="msg
oc" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="report" type="msg:Report" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Logo">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:mediaType type="image/jpeg" />
<content:mediaType type="image/gif" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Doc">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:mediaType type="text/html;
charset=ISO-8859-1" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Report">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:documentType value="msg:report" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:element name="report">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<!-- etc. -->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="PutCompanyInfo">
<wsdl
art name="body" element="msg
utCompanyInfo" />
</wsdl:message>
<wsdl
ortType name="PortType">
<wsdl
peration name="PutCompanyInfo">
<wsdl:input message="svc
utCompanyInfo" />
</wsdl
peration>
</wsdl
ortType>
<wsdl:binding name="SoapDimeBinding" type="svc
ortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl
peration name="PutCompanyInfo">
<soap
peration soapAction="http://example.com/PutCompanyInfo" />
<wsdl:input>
<dime:message
layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout"
wsdl:required="true" />
<soap:body parts="body" use="literal" />
</wsdl:input>
</wsdl
peration>
</wsdl:binding>
<wsdl:service name="DimeExample">
<wsdl
ort name="SoapDimePort" binding="svc:SoapDimeBinding">
<soap:address location="http://example.com/DimeExample/" />
</wsdl
ort>
</wsdl:service>
</wsdl:definitions>
The DIME specification himself can be seen here:
http://msdn.microsoft.com/library/en-us/dnglobspec/html/draft-nielsen-dime-02.txt
Some updates:
http://discuss.develop.com/archives/wa.exe?A2=ind0206d&L=dime&F=&S=&P=144
WSDL from the WSDL Extension for SOAP in DIME specification
The WSDL Extension for SOAP in DIME specification can be obtained at this
URL:
http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm
This specification includes a WSDL. This WSDL cannot be consumed by .NET
without an error message.
The error message is:
C:\ClientDotNetPrototype\CSharpTest\CSharpTest\Web
References\WebReference\Reference.map(1): Custom tool error: Unable to import
WebService/Schema. Unable to import binding 'SoapDimeBinding' from namespace
'http://example.com/DimeExample/Service/'. Unable to import operation
'PutCompanyInfo'. Unable to import binding 'SoapDimeBinding' from namespace
'http://example.com/DimeExample/Service/'. Unable to import operation
'PutCompanyInfo'. The attribute location is missing.
The same error happens without WSE, using only Microsoft .NET Framework 1.1
Version 1.1.4322 SP1.
It seems that WSE or .NET framework expect instead an illegal XML Schema:
Having this:
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:restriction base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional" />
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
Instead of:
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
After the modification using the illegal XML Schema we receive just a warning:
C:\ClientDotNetPrototype\CSharpTest\CSharpTest\Web
References\WebReference1\Reference.map(1): Custom tool warning: At least one
necessary import ServiceDescriptionFormatExtension has been ignored.
Now you my wonder why I say it’s an illegal XML Schema.
Because:
- XML Spy Version 2004 rel. 4 said: Schema error – undefined value for
‘base’ encountered – you must use a complexType instead of ‘xs:base64Binary’,
because a simpleContent/restriction can’t be based on a simpleType.
- Castor from: http://www.castor.org/xml-framework.html give same error as
XML Spy.
- As point out by this:
http://lists.w3.org/Archives/Public/xmlschema-dev/2002Oct/0031.html
- XML Schema specification from:
http://www.w3.org/TR/xmlschema-1/#ct-props-correct said: If the {base type
definition} is a simple type definition, the {derivation method} must be
extension.
- More recent work also confirm this constraint:
http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/
What I expect from Microsoft:
- Publicizes this defect.
- Publicizes a Patch in the next two weeks.
- Includes the patch in subsequent service pack for .NET 1.0, .NET 1.1 and WSE
For completeness here the WSDL from the WSDL Extension for SOAP in DIME
specification that Microsoft wrote:
<?xml version="1.0" ?>
<wsdl:definitions name="DIME Example"
targetNamespace="http://example.com/DimeExample/Service/"
xmlns:svc="http://example.com/DimeExample/Service/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
xmlns:msg="http://example.com/DimeExample/Messages/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema targetNamespace="http://example.com/DimeExample/Messages/"
elementFormDefault="qualified">
<xs:import
namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/" />
<xs:import
namespace="http://schemas.xmlsoap.org/ws/2002/04/reference/" />
<xs:element name="PutCompanyInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="tickerSymbol" type="xs:string" />
<xs:element name="logo" type="msg:Logo" minOccurs="0" />
<xs:element name="doc" type="msg
maxOccurs="unbounded" />
<xs:element name="report" type="msg:Report" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ReferencedBinary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute ref="ref:location" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Logo">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:mediaType type="image/jpeg" />
<content:mediaType type="image/gif" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Doc">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:mediaType type="text/html;
charset=ISO-8859-1" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Report">
<xs:simpleContent>
<xs:restriction base="msg:ReferencedBinary">
<xs:annotation>
<xs:appinfo>
<content:documentType value="msg:report" />
</xs:appinfo>
</xs:annotation>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:element name="report">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<!-- etc. -->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="PutCompanyInfo">
<wsdl
</wsdl:message>
<wsdl
<wsdl
<wsdl:input message="svc
</wsdl
</wsdl
<wsdl:binding name="SoapDimeBinding" type="svc
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl
<soap
<wsdl:input>
<dime:message
layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout"
wsdl:required="true" />
<soap:body parts="body" use="literal" />
</wsdl:input>
</wsdl
</wsdl:binding>
<wsdl:service name="DimeExample">
<wsdl
<soap:address location="http://example.com/DimeExample/" />
</wsdl
</wsdl:service>
</wsdl:definitions>
The DIME specification himself can be seen here:
http://msdn.microsoft.com/library/en-us/dnglobspec/html/draft-nielsen-dime-02.txt
Some updates:
http://discuss.develop.com/archives/wa.exe?A2=ind0206d&L=dime&F=&S=&P=144