Announcement Announcement Module
Collapse
No announcement yet.
Problems With Spring WS 1.5 Samples Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • duffymo
    started a topic Problems With Spring WS 1.5 Samples

    Problems With Spring WS 1.5 Samples

    I've been trying to get all six of the samples that ship with Spring 1.5 web services work.

    I'm running Sun's JDK 1.6.0_04, Tomcat 5.5.26, Spring 2.5.2, Spring WS 1.5, and IntelliJ 7.0.3 on Windows XP SP2.

    The three that don't require Maven appear to be fine - tutorial, echo, and pox. (Just need to write a tutorial client to be sure.)

    The three that do require Maven - airline, stockquote, and mtom - have issues.

    For example, when I run Maven for stockquote I get a stack trace with the following root cause:

    Code:
    Caused by: java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
    I know this class is in the saaj.jar, but I don't know how to modify the pom.xml to include this dependency. Can anyone tell me? Thanks.

    %

  • Arjen Poutsma
    replied
    See http://forum.spring.io/node/43865 to fix the missing reference problem. Will be addressed in 1.5.1.

    Leave a comment:


  • duffymo
    replied
    No Joy With Airline .NET Client

    The .NET client will not be happening for me. It's time to move on.

    I created a simple project for the generated AirlineClient.cs, but when I build I get 12 error messages:

    Code:
    The type or namespace name 'Services' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
    I can see System.Web.Services in my object browser, and there's a "using" statement in the code. I'm not familiar enough with C# to debug this. Google hasn't turned up any quick fixes. I'm onto greener pastures.

    I'd love to see the mtom and stockquote samples run. I'm going to move on and give those a try.

    %

    Leave a comment:


  • duffymo
    replied
    Visual Studio and C#

    Now I figure that I'm better off using Visual Studio to create the .exe for me and forget about fixing the Ant <csc> task. I created a new project and tried to build the generated code, but there were beaucoup compilation errors. I guess I'll have to come up to speed with C# and VS very quickly.

    %

    Leave a comment:


  • duffymo
    replied
    Ant .NET Tasks Have A Problem

    I figured out that I need the csc.ext for compiling C# and wsdl.exe to generate .NET client from WSDL. I added both to my PATH (wsdl.exe was easy to find; csc.exe wasn't in plain sight, so I had to cut & paste the PATH out of vsvars32.bat into my environment variable). The generate task works fine, but the build does not. I get a fatal error from task <csc>:

    fatal error CS2007: Unrecognized option: '/incremental-'

    I tried setting the attribute "incremental=false" that's built into the task, but it didn't help.

    How to fix? No joy from Google yet.

    %

    Leave a comment:


  • duffymo
    replied
    .NET Ignoramus - Help With Airline Sample .NET Client

    I'm trying to get the last client for the Airline sample running - the .NET C# client.

    I'm totally ignorant of Microsoft technologies. I'm a pure Java boy.

    So when I run the Ant build, I get an IOException: "Cannot run program 'wsdl': CreateProcess error=2, The system cannot find the file specified".

    Google tells me that error=2 means "You don't have the appropriate .exe in your PATH". So I installed Visual Studio 2008 Team Suite Edition. It put all kinds of stuff on my machine, including SQL Server. When I look at my PATH, I see SQL Server Tools /bin, but nothing for .NET.

    I'm poking around under Program Files, but I don't really know what I'm looking for. What do I have to add to my PATH to make the Ant build work?

    Leave a comment:


  • duffymo
    replied
    Airline Sample AXIS 1.4 Client Builds and Runs Fine

    I had to add the Axis 1.4 JAR to my IntelliJ project, because it wasn't fetched from Maven. Once I did that, the Axis client compiled and ran fine.

    Only the .NET client remains. I've installed the Visual Studio Team Edition with .NET 3.5. We'll see how that goes.

    %

    Leave a comment:


  • duffymo
    replied
    Airline Sample JMS Client Builds and Runs Fine

    Airline sample JMS client builds fine.

    It didn't run right off the bat, because I had to uncomment the jmsClient bean definition in the jms/applicationContext.xml.

    Then I had to download Apache's ActiveMQ. Easy enough, but when I first started the listener there was a conflict with the standard RMI port 1099. I edited the conf/activemq.xml to change the port to 10990, restarted the server, and all was well. The JMS client ran fine after that.

    Just .NET and Axis to sort out.

    %

    Leave a comment:


  • duffymo
    replied
    Airline Sample Axis Client Has Build Issues

    I can't build the Axis client for the airline sample.

    The GetFlightsRequest class has a setDepartureDate that takes an XMLGregorianCalendar type, but the argument passed into the code is a java.util.Date. I don't know how this conversion is supposed to happen, but the code won't build as written. Any advice? What did I miss?

    %

    Leave a comment:


  • duffymo
    replied
    Airline Sample Spring-WS Client Builds and Runs Fine

    RTFM. The solution to my Maven problem was spelled out in the error message I got from Ant. I navigated my way to a local Spring 1.2.8 download, found /lib/j2ee/activation.jar, and typed this command:

    mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion=1.0.2 -Dpackaging=jar -Dfile=activation.jar

    This appeared to add the missing JAR to my local repository. When I rebuilt the code, all was well.

    %

    Leave a comment:


  • duffymo
    replied
    Airline Sample Spring-WS Client Build Fails

    The Spring WS client build fails while processing spring-core-1.2.9.pom: Failed to resolve activation-1.0.2.jar

    I'll have to dig into Maven to see how to resolve this.

    %

    Leave a comment:


  • duffymo
    replied
    Airline Sample JAX-WS Client Builds and Runs Fine

    The JAX-WS client for the airline sample builds and runs fine for me using the Ant build.xml that's provided.

    Leave a comment:


  • duffymo
    replied
    Another Fix For Airline Sample

    I wasn't getting any data into the flight.jsp, because the variable "flight" couldn't be resolved.

    I changed the FlightsController singleFlight method to fix it. I changed this:

    Code:
        @RequestMapping(value = "/flight")
        public String singleFlight(@RequestParam("id")long id, ModelMap model) throws Exception {
            Flight flight = airlineService.getFlight(id);
            model.addAttribute(flight);
            return "flight";
        }
    to this:

    Code:
        @RequestMapping(value = "/flight")
        public String singleFlight(@RequestParam("id")long id, ModelMap model) throws Exception {
            Flight flight = airlineService.getFlight(id);
            model.addAttribute("flight", flight);
            return "flight";
        }
    I had to make another change to flights.jsp. I changed this line:

    Code:
                            <c:url var="flightUrl" value="flight">
    to this:

    Code:
                            <c:url var="flightUrl" value="/flight">
    All is well now. Web MVC client appears to be working fine. Now onto the WS clients.

    %

    Leave a comment:


  • duffymo
    replied
    Airline JPA Issue

    When I start up the airline sample I see the following exception:

    Code:
    java.lang.IllegalStateException: Cannot apply class transformer without LoadTimeWeaver specified"
    Google found this explanation from Juergen:

    http://forum.springframework.org/arc...p/t-44299.html

    So I tried adding <context:load-time-weaver/> to applicationContext-jpa.xml, along with the context namespace, but then I got another, worse exception:

    Code:
    2008-04-14 12:42:01,238 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 87 in XML document from class path resource [org/springframework/ws/samples/airline/dao/jpa/applicationContext-jpa.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:load-time-weaver'.
    The app runs with the first exception, but not the second.

    What am I missing with the load time weaver? I've added the context namespace. Is there more?

    %

    Leave a comment:


  • duffymo
    replied
    A Moving Target

    I opened up FlightController to give it a look. It feels like I'm learning Spring again for the first time, because I still have all the Spring 1.x books that don't use annotations much. I've got a lot of re-learning to do.

    The /flights URL displays fine for me, but when I submit a request it doesn't bring back a list of flights to drill into. The only way I can get to the flight.jsp for details is to use the URL /flight?id=1. The flight.jsp is displayed, but there's no data in it. I'll have to study the new controller to see what the problem is.

    I still haven't gotten any of the WS clients to work. I thought it'd be smart to get the web client working first, because I have a better understanding of that. Now I find out that I don't understand that, either. Lots to learn.

    %

    Leave a comment:

Working...
X