Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Problems With Spring WS 1.5 Samples

  1. #1
    Join Date
    May 2005
    Posts
    208

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

    %

  2. #2
    Join Date
    May 2005
    Posts
    208

    Default

    Added this to the pom.xml:

    Code:
    <dependency> 
    <groupId>javax.xml.soap</groupId> 
    <artifactId>saaj-api</artifactId> 
    <version>1.3</version>
    </dependency>
    Still no joy.

    %

  3. #3
    Join Date
    May 2005
    Posts
    208

    Default

    Where does the Stock class come from in the stockquote example? It's not part of the code generated by XJC.

    %

  4. #4
    Join Date
    May 2005
    Posts
    208

    Default

    More explanation for stockquote, airline, and mtom examples would be most helpful. There's a LOT going on there that would be worth knowing, and Maven isn't cutting it for me. I will admit that Maven has become a huge black box.

    I'm finding that web services are a huge, complex overhead with very little benefit, IMO. I hope Spring can help as it did with EJBs, but so far no joys.

    %

  5. #5
    Join Date
    May 2005
    Posts
    208

    Default

    Quote Originally Posted by duffymo View Post
    Where does the Stock class come from in the stockquote example? It's not part of the code generated by XJC.
    Some progress, but not there yet.

    It dawned on me that IntelliJ allows me to import an existing project using Maven. I did that for stockquote, and my life improved.

    However, the Main class for the JAX-WS client has three problems:

    Only a default ctor for StockService; at Main line 41:

    Code:
                service = new StockService(new URL(args[0]), serviceName);
    "cannot find symbol class Stock" - not part of the XJC-generated code; at Main line 43:

    Code:
            Stock stock = service.getStockSoap11();
    "cannot find symbol method getStockSoap11()"; at Main line 43:

    Code:
            StockQuoteResponse response = stock.stockQuote(request);

  6. #6
    Join Date
    Mar 2008
    Posts
    9

    Default

    duffymo, did you fix your NoClassDefFoundError SOAPException problem? I'm having the same problem and I don't know which jar I need.

  7. #7
    Join Date
    Apr 2008
    Posts
    151

    Default

    I have had the same problem with the NoClassDefFoundError SOAPException using the Spring WS 1.5 examples. I tried maven clean install, but that did not help. The problem happens on all examples.

    I think we all need to see inside the blackbox known as Maven and understand the required jar dependencies here.

  8. #8
    Join Date
    May 2005
    Posts
    208

    Default

    Quote Originally Posted by jonesy View Post
    duffymo, did you fix your NoClassDefFoundError SOAPException problem? I'm having the same problem and I don't know which jar I need.
    I'm not sure if it's fair to say that I did, because my solution was to ask IntelliJ to import the Maven project. I believe it has the appropriate JAR in the CLASSPATH, because my issues changed.

    I went to http://www.whatjar.co.uk/whatjar/welcome.htm and typed the name of the missing class into the search engine. It comes back with a list of JARs that contain that class.

    Now - how to add that to the Maven CLASSPATH when you run? There's the rub...

    Good Lord, I hate Maven.

    %

  9. #9
    Join Date
    May 2005
    Posts
    208

    Default

    Quote Originally Posted by duffymo View Post
    Some progress, but not there yet.

    It dawned on me that IntelliJ allows me to import an existing project using Maven. I did that for stockquote, and my life improved.

    However, the Main class for the JAX-WS client has three problems:

    Only a default ctor for StockService; at Main line 41:

    Code:
                service = new StockService(new URL(args[0]), serviceName);
    "cannot find symbol class Stock" - not part of the XJC-generated code; at Main line 43:

    Code:
            Stock stock = service.getStockSoap11();
    "cannot find symbol method getStockSoap11()"; at Main line 43:

    Code:
            StockQuoteResponse response = stock.stockQuote(request);
    So no joy? No one has any idea where these classes come from or why I'm missing them?

    I wonder if all the samples work in the previous version of Spring WS? Maybe I'll try that today.

    %

  10. #10

    Default

    in the saaj-api jar sir

Posting Permissions

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