W3C WSDL example not valid?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • relaxedrob@optushome.com.au

    #1

    W3C WSDL example not valid?

    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="htt p://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.Ima geIcon@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 }GetTradePriceO utput
    Part: name=result
    typeName={http://www.w3.org/2000/10/XMLSchema}float] in the WSDL.
    javax.swing.Ima geIcon@b0f2b2 Warning : 1203 : There is no type
    [{http://www.w3.org/2000/10/XMLSchema}strin g] defined for the part
    [Part: name=tickerSymb ol
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}strin g] in the
    message [Message: name={http://example.com/stockquote.wsdl }GetTradePriceI nput
    Part: name=time
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}timeI nstant
    Part: name=tickerSymb ol
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}strin g] in the WSDL.
    javax.swing.Ima geIcon@10dbef1 Warning : 1203 : There is no type
    [{http://www.w3.org/2000/10/XMLSchema}timeI nstant] defined for the
    part [Part: name=time
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}timeI nstant] in the
    message [Message: name={http://example.com/stockquote.wsdl }GetTradePriceI nput
    Part: name=time
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}timeI nstant
    Part: name=tickerSymb ol
    elementName={ht tp://www.w3.org/2000/10/XMLSchema}strin g] in the WSDL.
    javax.swing.Ima geIcon@172e08e Warning : 1603 : There is no binding
    [Binding: name={http://example.com/stockquote.wsdl }StockQuoteBind ing]
    defined for the port [Port: name=StockQuote Port
    Binding: name={http://example.com/stockquote.wsdl }StockQuoteBind ing
    SOAPAddress ({http://schemas.xmlsoap .org/wsdl/soap/}address):
    required=null
    locationURI=htt p://example.com/stockquote] in the service [Service:
    name={http://example.com/stockquote.wsdl }StockQuoteServ ice
    Port: name=StockQuote Port
    Binding: name={http://example.com/stockquote.wsdl }StockQuoteBind ing
    SOAPAddress ({http://schemas.xmlsoap .org/wsdl/soap/}address):
    required=null
    locationURI=htt p://example.com/stockquote] in the WSDL.
  • Henry S. Thompson

    #2
    Re: W3C WSDL example not valid?

    relaxedrob@optu snet.com.au (relaxedrob@opt ushome.com.au) writes:

    [color=blue]
    > float defined in the xsd namespace:
    > "http://www.w3.org/2000/10/XMLSchema".[/color]

    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]

    Comment

    • Robert Mark Bram

      #3
      Re: W3C WSDL example not valid?

      Hi Henry,

      Thanks for the response!
      [color=blue][color=green]
      >> float defined in the xsd namespace:
      >> "http://www.w3.org/2000/10/XMLSchema".[/color]
      >
      > 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. . .[/color]

      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.Ima geIcon@13e86ec Warning : 1203 : There is no type
      [{http://www.w3.org/2001/XMLSchema}timeI nstant] defined for the part [Part:
      name=time elementName={ht tp://www.w3.org/2001/XMLSchema}timeI nstant] in the
      message [Message:
      name={http://example.com/stockquote.wsdl }GetTradePriceI nput Part: name=time
      elementName={ht tp://www.w3.org/2001/XMLSchema}timeI nstant Part:
      name=tickerSymb ol elementName={ht tp://www.w3.org/2001/XMLSchema}strin g] in
      the WSDL.
      javax.swing.Ima geIcon@c199f Warning : 1510 : The namespace defined is
      invalid for the message [null] defined for the input in operation
      [Operation: name=GetTradePr ice style=REQUEST_R ESPONSE Input: name=null
      Output: name=null] in the portType [PortType:
      name={http://example.com/stockquote.wsdl }StockQuotePort Type Operation:
      name=GetTradePr ice style=REQUEST_R ESPONSE Input: name=null Output:
      name=null] in the WSDL.
      javax.swing.Ima geIcon@6646fc Warning : 1511 : The namespace defined is
      invalid for the message [null] defined for the output in operation
      [Operation: name=GetTradePr ice style=REQUEST_R ESPONSE Input: name=null
      Output: name=null] in the portType [PortType:
      name={http://example.com/stockquote.wsdl }StockQuotePort Type Operation:
      name=GetTradePr ice style=REQUEST_R ESPONSE Input: name=null Output:
      name=null] in the WSDL.
      javax.swing.Ima geIcon@be6858 Warning : 1603 : There is no binding
      [null] defined for the port [Port: name=StockQuote Port SOAPAddress
      ({http://schemas.xmlsoap .org/wsdl/soap/}address): required=null
      locationURI=htt p://example.com/stockquote] in the service [Service:
      name={http://example.com/stockquote.wsdl }StockQuoteServ ice Port:
      name=StockQuote Port SOAPAddress
      ({http://schemas.xmlsoap .org/wsdl/soap/}address): required=null
      locationURI=htt p://example.com/stockquote] in the WSDL.


      Comment

      • Richard Tobin

        #4
        Re: W3C WSDL example not valid?

        In article <417cd8c2$0$228 25$afc38c87@new s.optusnet.com. au>,
        Robert Mark Bram <none> wrote:
        [color=blue]
        > javax.swing.Ima geIcon@13e86ec Warning : 1203 : There is no type
        >[{http://www.w3.org/2001/XMLSchema}timeI nstant] defined for the part [Part:
        >name=time elementName={ht tp://www.w3.org/2001/XMLSchema}timeI nstant][/color]

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

        I'm suspicious about

        elementName={ht tp://www.w3.org/2001/XMLSchema}timeI nstant

        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

        Comment

        • Robert Mark Bram

          #5
          Re: W3C WSDL example not valid?

          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="StockQuot e"
          targetNamespace ="http://example.com/stockquote.wsdl "
          xmlns="http://schemas.xmlsoap .org/wsdl/"
          xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
          xmlns:tns="http ://example.com/stockquote.wsdl "
          xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/"
          xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
          xmlns:xsd1="htt p://example.com/stockquote.xsd" >

          <message name="GetTradeP riceInput">
          <part name="tickerSym bol" element="xsd:st ring"/>
          <part name="time" element="xsd:da teTime"/>
          </message>

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

          <portType name="StockQuot ePortType">
          <operation name="GetTradeP rice">
          <input message="tns:Ge tTradePriceInpu t"/>
          <output message="tns:Ge tTradePriceOutp ut"/>
          </operation>
          </portType>

          <binding name="StockQuot eSoapBinding" type="tns:Stock QuotePortType">
          <soap:binding style="rpc"
          transport="http ://schemas.xmlsoap .org/soap/http"/>
          <operation name="GetTradeP rice">
          <soap:operati on soapAction="htt p://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="StockQuot eService">
          <documentation> My first service</documentation>
          <port name="StockQuot ePort" binding="tns:St ockQuoteBinding ">
          <soap:address location="http://example.com/stockquote"/>
          </port>
          </service>
          </definitions>


          And this is the errors reported:

          javax.swing.Ima geIcon@1172f8f Warning : 1603 : There is no binding [Binding:
          name={http://example.com/stockquote.wsdl }StockQuoteBind ing] defined for the
          port [Port: name=StockQuote Port
          Binding: name={http://example.com/stockquote.wsdl }StockQuoteBind ing
          SOAPAddress ({http://schemas.xmlsoap .org/wsdl/soap/}address):
          required=null
          locationURI=htt p://example.com/stockquote] in the service [Service:
          name={http://example.com/stockquote.wsdl }StockQuoteServ ice
          Port: name=StockQuote Port
          Binding: name={http://example.com/stockquote.wsdl }StockQuoteBind ing
          SOAPAddress ({http://schemas.xmlsoap .org/wsdl/soap/}address):
          required=null
          locationURI=htt p://example.com/stockquote] in the WSDL.


          Comment

          • Robert Mark Bram

            #6
            Re: W3C WSDL example not valid?

            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="GetTradeP rice">
            <soap:operati on soapAction="htt p://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:operati on soapAction="htt p://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:definitio ns name="StockQuot e"
            targetNamespace ="http://example.com/stockquote.wsdl "
            xmlns="http://schemas.xmlsoap .org/wsdl/"
            xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
            xmlns:tns="http ://example.com/stockquote.wsdl "
            xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/"
            xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
            xmlns:xsd1="htt p://example.com/stockquote.xsd" >

            <wsdl:message name="GetTradeP riceInput">
            <wsdl:part name="tickerSym bol" element="xsd:st ring"/>
            <wsdl:part name="time" element="xsd:da teTime"/>
            </wsdl:message>

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

            <wsdl:portTyp e name="StockQuot ePortType">
            <wsdl:operati on name="GetTradeP rice">
            <wsdl:input message="tns:Ge tTradePriceInpu t"/>
            <wsdl:output message="tns:Ge tTradePriceOutp ut"/>
            </wsdl:operation>
            </wsdl:portType>

            <wsdl:binding name="StockQuot eBinding" type="tns:Stock QuotePortType">
            <soap:binding style="rpc"
            transport="http ://schemas.xmlsoap .org/soap/http"/>
            <wsdl:operati on name="GetTradeP rice">
            <soap:operati on soapAction="htt p://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="StockQuot eService">
            <wsdl:documenta tion>My first service</wsdl:documentat ion>
            <wsdl:port name="StockQuot ePort" binding="tns:St ockQuoteBinding ">
            <soap:address location="http://example.com/stockquote"/>
            </wsdl:port>
            </wsdl:service>
            </wsdl:definition s>


            Comment

            Working...