By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,447 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,447 IT Pros & Developers. It's quick & easy.

W3C WSDL example not valid?

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies

P: n/a
re********@optusnet.com.au (re********@optushome.com.au) writes:

float defined in the xsd namespace:
"http://www.w3.org/2000/10/XMLSchema".


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. . .

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #2

P: n/a
Hi Henry,

Thanks for the response!
float defined in the xsd namespace:
"http://www.w3.org/2000/10/XMLSchema".


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.
Jul 20 '05 #3

P: n/a
In article <41***********************@news.optusnet.com.au> ,
Robert Mark Bram <none> wrote:
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
Jul 20 '05 #4

P: n/a
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:operation 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.
Jul 20 '05 #5

P: n/a
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:operation 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:operation soapAction="http://example.com/GetTradePrice"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>

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:operation name="GetTradePrice">
<wsdl:input message="tns:GetTradePriceInput"/>
<wsdl:output message="tns:GetTradePriceOutput"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="StockQuoteBinding" type="tns:StockQuotePortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetTradePrice">
<soap:operation soapAction="http://example.com/GetTradePrice"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>>
</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>
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.