W3C WSDL example not valid?

relaxedrob

Usenet Archive
Joined
Aug 5, 2003
Messages
22
Reaction score
0
Hi All!

I ran the following w3c example through my WSDL parser (SOA Editor from Cape Clear):
http://www.w3.org/TR/wsdl#_rpcexample

It told me that there were a bunch of erros about no timeInstant or float defined in the xsd namespace:
"http://www.w3.org/2000/10/XMLSchema".

Is the editor wrong? Is W3C wrong? Or am I missing something big?

Also, why does the W3C example *not* import a WSDL namespace like this:
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" and then use it for the WSDL elements? How can the document be valid if no WSDL namespace is given?

Any advice would be most appreciated!

Below is a full list of the errors SOA Editor found with W3C's example..

Rob
:)

javax.swing.ImageIcon@1a3a52c Warning : 1203 : There is no type [{http://www.w3.org/2000/10/XMLSchema}float] defined for the part [Part: name=result typeName={http://www.w3.org/2000/10/XMLSchema}float] in the message [Message: name={http://example.com/stockquote.wsdl}GetTradePriceOutput
Part: name=result
typeName={http://www.w3.org/2000/10/XMLSchema}float] in the WSDL. javax.swing.ImageIcon@b0f2b2 Warning : 1203 : There is no type [{http://www.w3.org/2000/10/XMLSchema}string] defined for the part [Part: name=tickerSymbol elementName={http://www.w3.org/2000/10/XMLSchema}string] in the message [Message: name={http://example.com/stockquote.wsdl}GetTradePriceInput
Part: name=time
elementName={http://www.w3.org/2000/10/XMLSchema}timeInstant
Part: name=tickerSymbol
elementName={http://www.w3.org/2000/10/XMLSchema}string] in the WSDL. javax.swing.ImageIcon@10dbef1 Warning : 1203 : There is no type [{http://www.w3.org/2000/10/XMLSchema}timeInstant] defined for the part [Part: name=time elementName={http://www.w3.org/2000/10/XMLSchema}timeInstant] in the message [Message: name={http://example.com/stockquote.wsdl}GetTradePriceInput
Part: name=time
elementName={http://www.w3.org/2000/10/XMLSchema}timeInstant
Part: name=tickerSymbol
elementName={http://www.w3.org/2000/10/XMLSchema}string] in the WSDL. javax.swing.ImageIcon@172e08e Warning : 1603 : There is no binding [Binding: name={http://example.com/stockquote.wsdl}StockQuoteBinding] defined for the port [Port: name=StockQuotePort
Binding: name={http://example.com/stockquote.wsdl}StockQuoteBinding SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
required=null
locationURI=http://example.com/stockquote] in the service [Service:
name={http://example.com/stockquote.wsdl}StockQuoteService
Port: name=StockQuotePort
Binding: name={http://example.com/stockquote.wsdl}StockQuoteBinding SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
required=null
locationURI=http://example.com/stockquote] in the WSDL.
 

Robert Mark Bram

Usenet Archive
Joined
Dec 4, 2001
Messages
253
Reaction score
0
Hi Henry,

Thanks for the response!
I'm not a WSDL maven, but that's a stale XML Schema namespace, used only for the Candidate Recommendation phase of W3C XML Schema before it was approved. . .

I changed it to:
xmlns:xsd="http://www.w3.org/2001/XMLSchema" and I still get the errors shown below..

How do you find out what the latest schema is?

Rob
:)

javax.swing.ImageIcon@13e86ec Warning : 1203 : There is no type [{http://www.w3.org/2001/XMLSchema}timeInstant] defined for the part [Part:
name=time elementName={http://www.w3.org/2001/XMLSchema}timeInstant] in the message [Message:
name={http://example.com/stockquote.wsdl}GetTradePriceInput Part: name=time elementName={http://www.w3.org/2001/XMLSchema}timeInstant Part:
name=tickerSymbol elementName={http://www.w3.org/2001/XMLSchema}string] in the WSDL. javax.swing.ImageIcon@c199f Warning : 1510 : The namespace defined is invalid for the message [null] defined for the input in operation [Operation: name=GetTradePrice style=REQUEST_RESPONSE Input: name=null
Output: name=null] in the portType [PortType:
name={http://example.com/stockquote.wsdl}StockQuotePortType Operation:
name=GetTradePrice style=REQUEST_RESPONSE Input: name=null Output:
name=null] in the WSDL.
javax.swing.ImageIcon@6646fc Warning : 1511 : The namespace defined is invalid for the message [null] defined for the output in operation [Operation: name=GetTradePrice style=REQUEST_RESPONSE Input: name=null
Output: name=null] in the portType [PortType:
name={http://example.com/stockquote.wsdl}StockQuotePortType Operation:
name=GetTradePrice style=REQUEST_RESPONSE Input: name=null Output:
name=null] in the WSDL.
javax.swing.ImageIcon@be6858 Warning : 1603 : There is no binding [null] defined for the port [Port: name=StockQuotePort SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address): required=null locationURI=http://example.com/stockquote] in the service [Service:
name={http://example.com/stockquote.wsdl}StockQuoteService Port:
name=StockQuotePort SOAPAddress
({http://schemas.xmlsoap.org/wsdl/soap/}address): required=null locationURI=http://example.com/stockquote] in the WSDL.
 

Richard Tobin

Usenet Archive
Joined
Jan 6, 2000
Messages
4,251
Reaction score
0
Robert Mark Bram said:
javax.swing.ImageIcon@13e86ec Warning : 1203 : There is no type [{http://www.w3.org/2001/XMLSchema}timeInstant] defined for the part [Part:
name=time elementName={http://www.w3.org/2001/XMLSchema}timeInstant]

"timeInstant" was renamed "dateTime" before the final version of the Schema spec.

I'm suspicious about

elementName={http://www.w3.org/2001/XMLSchema}timeInstant

for another reason: it seems to be referring to an element with that name, rather than that type. But maybe that's just some WSDL mumbo-jumbo and doesn't really mean that an element of that name should be defined in the schema.

-- Richard
 

Robert Mark Bram

Usenet Archive
Joined
Dec 4, 2001
Messages
253
Reaction score
0
Hi Richard,

I have included the below the full wsdl file I have so far and the error I still get for it.

I must say I am very confused right now - just to find that W3C's own example doesn't seem valid! :-/

Rob
:)

<?xml version="1.0"?>
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://example.com/stockquote.xsd">

<message name="GetTradePriceInput">
<part name="tickerSymbol" element="xsd:string"/>
<part name="time" element="xsd:dateTime"/>
</message>

<message name="GetTradePriceOutput">
<part name="result" type="xsd:float"/>
</message>

<portType name="StockQuotePortType">
<operation name="GetTradePrice">
<input message="tns:GetTradePriceInput"/>
<output message="tns:GetTradePriceOutput"/>
</operation>
</portType>

<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetTradePrice"> <soap:eek:peration soapAction="http://example.com/GetTradePrice"/> <input> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation>> </binding>

<service name="StockQuoteService">
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding"> <soap:address location="http://example.com/stockquote"/> </port> </service> </definitions>

And this is the errors reported:

javax.swing.ImageIcon@1172f8f Warning : 1603 : There is no binding [Binding:
name={http://example.com/stockquote.wsdl}StockQuoteBinding] defined for the port [Port: name=StockQuotePort
Binding: name={http://example.com/stockquote.wsdl}StockQuoteBinding SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
required=null
locationURI=http://example.com/stockquote] in the service [Service:
name={http://example.com/stockquote.wsdl}StockQuoteService
Port: name=StockQuotePort
Binding: name={http://example.com/stockquote.wsdl}StockQuoteBinding SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
required=null
locationURI=http://example.com/stockquote] in the WSDL.
 

Robert Mark Bram

Usenet Archive
Joined
Dec 4, 2001
Messages
253
Reaction score
0
Hi All!

Well, I finally got Cape Clear to say the below version was ok..

The final thing I had to change was this:
<operation name="GetTradePrice">
<soap:eek:peration soapAction="http://example.com/GetTradePrice"/> <input> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="http://example.com/stockquote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation>> to this:
<soap:eek:peration soapAction="http://example.com/GetTradePrice"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:eek:utput> <soap:body use="literal"/> </wsdl:eek:utput> </wsdl:eek:peration>

Is the first one invalid?

Rob
:)

This is the version that Cape Clear said was valid:

<?xml version="1.0"?>
<wsdl:definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://example.com/stockquote.xsd">

<wsdl:message name="GetTradePriceInput">
<wsdl:part name="tickerSymbol" element="xsd:string"/>
<wsdl:part name="time" element="xsd:dateTime"/>
</wsdl:message>

<wsdl:message name="GetTradePriceOutput">
<wsdl:part name="result" type="xsd:float"/>
</wsdl:message>

<wsdl:portType name="StockQuotePortType">
<wsdl:eek:peration name="GetTradePrice">
<wsdl:input message="tns:GetTradePriceInput"/>
<wsdl:eek:utput message="tns:GetTradePriceOutput"/>
</wsdl:eek:peration>
</wsdl:portType>

<wsdl:binding name="StockQuoteBinding" type="tns:StockQuotePortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:eek:peration name="GetTradePrice"> <soap:eek:peration soapAction="http://example.com/GetTradePrice"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:eek:utput> <soap:body use="literal"/> </wsdl:eek:utput> </wsdl:eek:peration>> </wsdl:binding>

<wsdl:service name="StockQuoteService">
<wsdl:documentation>My first service</wsdl:documentation> <wsdl:port name="StockQuotePort" binding="tns:StockQuoteBinding"> <soap:address location="http://example.com/stockquote"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top