Results 1 to 5 of 5

Thread: "new AirlineService()" interface in airline sample jaxws client app?

  1. #1
    Join Date
    Dec 2006
    Location
    San Francisco Bay Area
    Posts
    70

    Default "new AirlineService()" interface in airline sample jaxws client app?

    I'm confused. In the airline sample webservice, AirlineService is an interface. But in the jaxws client, this code does not compile:
    Code:
                AirlineService service;
                if (args.length == 0) {
                    service = new AirlineService();
                }
                else {
                    QName serviceName = new QName("http://www.springframework.org/spring-ws/samples/airline/definitions",
                            "AirlineService");
                    service = new AirlineService(new URL(args[0]), serviceName);
                }
    Specifically, the compiler chokes on the "new AirlineService();".

    What am I missing? How does this work???

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    If you check the imports, you will see that the jaxws-client does not rely on the org.springframework.ws.samples.airline.service.Air lineService business interface, but uses the org.springframework.ws.samples.airline.client.jaxw s.AirlineService, which is generated from the WSDL when you do "ant run".

    Note that the airline sample has to be running before invoking this target.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Dec 2006
    Location
    San Francisco Bay Area
    Posts
    70

    Default

    So I followed your instructions and got the airline service up and running. I wasn't able to get the jetty version running, so I tried deploying the app to Tomcat 5.5 instead.

    To get the airline webapp deployed and running properly off the subversion checkout onto Tomcat 5.5, I found that I had modify the samples/airline/pom.xml file:
    Code:
    > svn diff samples/airline/pom.xml
    Index: samples/airline/pom.xml
    ===================================================================
    --- samples/airline/pom.xml     (revision 6888)
    +++ samples/airline/pom.xml     (working copy)
    @@ -199,18 +199,22 @@
             <dependency>
                 <groupId>org.springframework.ws</groupId>
                 <artifactId>spring-xml</artifactId>
    +            <version>1.0-rc1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework.ws</groupId>
                 <artifactId>spring-ws-core</artifactId>
    +            <version>1.0-rc1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework.ws</groupId>
                 <artifactId>spring-oxm</artifactId>
    +            <version>1.0-rc1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework.ws</groupId>
                 <artifactId>spring-ws-security</artifactId>
    +            <version>1.0-rc1-SNAPSHOT</version>
                 <scope>runtime</scope>
             </dependency>
             <!-- Spring dependencies -->
    @@ -240,6 +244,14 @@
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-mock</artifactId>
             </dependency>
    +        <dependency>
    +            <groupId>org.springframework</groupId>
    +            <artifactId>spring-web</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>org.springframework</groupId>
    +            <artifactId>spring-webmvc</artifactId>
    +        </dependency>
             <!-- XML handling dependencies -->
             <dependency>
                 <groupId>xml-apis</groupId>
    @@ -386,5 +398,11 @@
                 <version>0.8</version>
                 <scope>runtime</scope>
             </dependency>
    +        <!-- com/sun/xml/wss/xws-security/2.0-fcs/xws-security-2.0-fcs.jar -->
    +        <dependency>
    +            <groupId>com.sun.xml.wss</groupId>
    +            <artifactId>xws-security</artifactId>
    +            <version>2.0-fcs</version>
    +        </dependency>       
         </dependencies>
     </project>
    Once airline.war was rebuilt using that config change, I was able to deploy and run the webservice. 'ant run' on samples/airline/client/jaxws ran successfully at that point. Whew!

  4. #4
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Good to know that it works.

    Adding those versions should not be necessary, however, since they are inherited from parent poms. Doing a mvn -P hsqldb package and deploying the resulting war works for, on a fresh install.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  5. #5
    Join Date
    Dec 2006
    Location
    San Francisco Bay Area
    Posts
    70

    Default

    You're right. The versions are not necessary.

    I'm still working on why Tomcat requires the extra spring-web, spring-webmvc and xws-security dependencies.

    When I start fresh on a separate machine using the Jetty runtime, no pom.xml adjustments are necessary.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •