Endpoint and JAX error

Discussion in 'Java' started by Pif, Jun 25, 2009.

  1. Pif

    Pif Guest

    Hello, I've tried a sample that is provided using JAX-WS. The service
    is well running in Endpoint. When I try to generate files at client
    side, using wsimport command line, an error occur that say I've not a
    WSDL Definition root.

    When I run the request in firefox and look at the source code of the
    page, I can see that tags are not prefixed by wsdl:

    Below is the code that is generated. Can you help me ?

    Thanks.

    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at
    http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK 6.
    --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's
    version is JAX-WS RI 2.1.1 in JDK 6. --><definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://
    soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://
    schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap/"
    name="MySoapServiceService">
    <types>
    <xsd:schema>
    <xsd:import namespace="http://soap/" schemaLocation="http://localhost:
    8089/services?xsd=1"></xsd:import>
    </xsd:schema>
    </types>
    <message name="getDR">
    <part name="username" type="xsd:string"></part>
    </message>
    <message name="getDRResponse">
    <part name="result-agent" type="tns:mySoapRecord"></part>
    </message>
    <portType name="getDummyRec">
    <operation name="getDR" parameterOrder="username">
    <input message="tns:getDR"></input>
    <output message="tns:getDRResponse"></output>
    </operation>

    </portType>
    <binding name="getDummyRecPortBinding" type="tns:getDummyRec">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    style="rpc"></soap:binding>
    <operation name="getDR">
    <soap:eek:peration soapAction=""></soap:eek:peration>
    <input>
    <soap:body use="literal" namespace="http://soap/"></soap:body>
    </input>
    <output>
    <soap:body use="literal" namespace="http://soap/"></soap:body>
    </output>
    </operation>
    </binding>
    <service name="MySoapServiceService">
    <port name="getDummyRecPort" binding="tns:getDummyRecPortBinding">
    <soap:address location="http://localhost:8089/services"></
    soap:address>
    </port>

    </service>
    </definitions>
     
    Pif, Jun 25, 2009
    #1
    1. Advertising

  2. Pif wrote:
    > Hello, I've tried a sample that is provided using JAX-WS. The
    > service
    > is well running in Endpoint. When I try to generate files at client
    > side, using wsimport command line, an error occur that say I've not
    > a
    > WSDL Definition root.
    >
    > When I run the request in firefox and look at the source code of the
    > page, I can see that tags are not prefixed by wsdl:
    >
    > Below is the code that is generated. Can you help me ?
    >
    > Thanks.
    >
    > <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at
    > http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK
    > 6.
    > --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's
    > version is JAX-WS RI 2.1.1 in JDK 6. --><definitions
    > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    > xmlns:tns="http://
    > soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://
    > schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap/"
    > name="MySoapServiceService">
    > <types>
    > <xsd:schema>
    > <xsd:import namespace="http://soap/"
    > schemaLocation="http://localhost:
    > 8089/services?xsd=1"></xsd:import>
    > </xsd:schema>
    > </types>
    > <message name="getDR">
    > <part name="username" type="xsd:string"></part>
    > </message>
    > <message name="getDRResponse">
    > <part name="result-agent" type="tns:mySoapRecord"></part>
    > </message>
    > <portType name="getDummyRec">
    > <operation name="getDR" parameterOrder="username">
    > <input message="tns:getDR"></input>
    > <output message="tns:getDRResponse"></output>
    > </operation>
    >
    > </portType>
    > <binding name="getDummyRecPortBinding" type="tns:getDummyRec">
    > <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    > style="rpc"></soap:binding>
    > <operation name="getDR">
    > <soap:eek:peration soapAction=""></soap:eek:peration>
    > <input>
    > <soap:body use="literal" namespace="http://soap/"></soap:body>
    > </input>
    > <output>
    > <soap:body use="literal" namespace="http://soap/"></soap:body>
    > </output>
    > </operation>
    > </binding>
    > <service name="MySoapServiceService">
    > <port name="getDummyRecPort" binding="tns:getDummyRecPortBinding">
    > <soap:address location="http://localhost:8089/services"></
    > soap:address>
    > </port>
    >
    > </service>
    > </definitions>


    This looks correct to me. Since the wsdl-level tags are unqualified,
    they're in the default namespace http://schemas.xmlsoap.org/wsdl/,
    just as they should be in WSDL 1.1 Is the tool you're using expecting
    WSDL 2.0?
     
    Mike Schilling, Jun 26, 2009
    #2
    1. Advertising

  3. Pif

    Pif Guest

    On 26 juin, 16:02, "Mike Schilling" <>
    wrote:
    > Pif wrote:
    > > Hello, I've tried a sample that is provided using JAX-WS. The
    > > service
    > > is well running in Endpoint. When I try to generate files at client
    > > side, using wsimport command line, an error occur that say I've not
    > > a
    > > WSDL Definition root.

    >
    > > When I run the request in firefox and look at the source code of the
    > > page, I can see that tags are not prefixed by wsdl:

    >
    > > Below is the code that is generated. Can you help me ?

    >
    > > Thanks.

    >
    > > <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at
    > >http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK
    > > 6.
    > > --><!-- Generated by JAX-WS RI athttp://jax-ws.dev.java.net. RI's
    > > version is JAX-WS RI 2.1.1 in JDK 6. --><definitions
    > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    > > xmlns:tns="http://
    > > soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://
    > > schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap/"
    > > name="MySoapServiceService">
    > > <types>
    > > <xsd:schema>
    > > <xsd:import namespace="http://soap/"
    > > schemaLocation="http://localhost:
    > > 8089/services?xsd=1"></xsd:import>
    > > </xsd:schema>
    > > </types>
    > > <message name="getDR">
    > > <part name="username" type="xsd:string"></part>
    > > </message>
    > > <message name="getDRResponse">
    > > <part name="result-agent" type="tns:mySoapRecord"></part>
    > > </message>
    > > <portType name="getDummyRec">
    > > <operation name="getDR" parameterOrder="username">
    > > <input message="tns:getDR"></input>
    > > <output message="tns:getDRResponse"></output>
    > > </operation>

    >
    > > </portType>
    > > <binding name="getDummyRecPortBinding" type="tns:getDummyRec">
    > > <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    > > style="rpc"></soap:binding>
    > > <operation name="getDR">
    > > <soap:eek:peration soapAction=""></soap:eek:peration>
    > > <input>
    > > <soap:body use="literal" namespace="http://soap/"></soap:body>
    > > </input>
    > > <output>
    > > <soap:body use="literal" namespace="http://soap/"></soap:body>
    > > </output>
    > > </operation>
    > > </binding>
    > > <service name="MySoapServiceService">
    > > <port name="getDummyRecPort" binding="tns:getDummyRecPortBinding">
    > > <soap:address location="http://localhost:8089/services"></
    > > soap:address>
    > > </port>

    >
    > > </service>
    > > </definitions>

    >
    > This looks correct to me.  Since the wsdl-level tags are unqualified,
    > they're in the default namespace  http://schemas.xmlsoap.org/wsdl/,
    > just as they should be in WSDL 1.1  Is the tool you're using expecting
    > WSDL 2.0?


    I use "JAX-WS RI 2.1.1 in JDK 6". And I use also JDK 6 to make
    annotations and run endpoint. Is this correct ?
     
    Pif, Jun 26, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Karl Uppiano

    Migrating JAX-RPC to JAX-WS

    Karl Uppiano, Dec 15, 2006, in forum: Java
    Replies:
    1
    Views:
    580
    Karl Uppiano
    Dec 15, 2006
  2. Karl Uppiano
    Replies:
    3
    Views:
    679
    Karl Uppiano
    Dec 19, 2006
  3. Replies:
    0
    Views:
    775
  4. Sascha Roth
    Replies:
    2
    Views:
    842
    Sascha Roth
    Jul 3, 2009
  5. Jimmy
    Replies:
    1
    Views:
    1,669
    Jimmy
    May 7, 2010
Loading...

Share This Page