Announcement Announcement Module
No announcement yet.
Echo WS + SAAJ + Java 1.4 = ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Echo WS + SAAJ + Java 1.4 = ?


    I need to create web services with Java 1.4 and I'm trying to use Spring WS for that. I get an exception from the Echo WS that seems to imply that I need Java 5:

    java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
    at com.sun.xml.messaging.saaj.soap.MessageImpl.<clini t>(
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessage Factory1_1Impl.createMessage(SOAPMessageFactory1_1
    at ntextFactory.createContext(SaajSoapMessageContextF
    at intHandlerAdapter.handlePost(MessageEndpointHandle
    at intHandlerAdapter.handle(MessageEndpointHandlerAda
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(
    at org.springframework.web.servlet.DispatcherServlet. doService(
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
    at org.springframework.web.servlet.FrameworkServlet.d oPost(
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletI
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(
    at weblogic.servlet.internal.WebAppServletContext$Ser :6981)
    at t.doAs(
    at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(
    at weblogic.servlet.internal.ServletRequestImpl.execu te(
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea
    at va:183)
    So, is this a bug and I need to update to the SVN trunk or does SWS require Java 5 like SAAJ? (For some reason I just cannot find this information in the documentation...) If I cannot use SWS with Java 1.4, do you have any recomendations?

    Edit: I just read from another thread that Java 5 isn't required; so what do I need to do?

    Thanks a lot,

    Last edited by pirkka; Nov 27th, 2006, 08:51 AM.

  • #2
    The SAAJ implementation used by Spring-WS (SAAJ version 1.3) uses Java 5. However, you can also use SAAJ 1.2, which is part of JWSDP 1.6.


    • #3
      Originally posted by Arjen Poutsma View Post
      The SAAJ implementation used by Spring-WS (SAAJ version 1.3) uses Java 5. However, you can also use SAAJ 1.2, which is part of JWSDP 1.6.
      Thanks for the information. Just to clear this up: Do you mean that I can swap the SAAJ jars in SWS to the 1.2 version or do you mean that I can use SAAJ 1.2 but I have to forget about SWS with Java 1.4?



      • #4
        The former: you can swap SAAJ implementations. SWS works with Java 1.4.


        • #5
          I've now wasted hours trying to get SAAJ 1.2 + SWS + Java 1.4 working with weblogic 8.1 SP 5. Honestly, I'm starting to feel that it may be impossible. The main problem is xercesImpl and all the related jars, the different versions contain different classes and always either SAAJ or SWS is complaining. I have also gotten some weird exceptions from WLS that I have never seen before.


          1.) Does anyone have something like this set up so I could have specific lib versions to use?

          2) What if I just dump SAAJ and use something else instead of this:

          <bean id="saajContextFactory" class=" ssageContextFactory">
          <property name="messageFactory"><bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAP MessageFactory1_1Impl"></bean></property>

          Does it change something else in the application? (And most importantly is the replacement more compatible with the default Spring libs...)


          • #6
            It is possible to run SWS under weblogic, as indicated in this thread. It is pretty hard, though, since you have to provide all jars yourself, and specify a system property.

            However, as an alternative to SAAJ, you can use Axiom (Axis2). Just define the following:

            <bean id="axiomContextFactory" class=""/>
            and remove the saajContextFactory.


            • #7
              You can also try axis-1.3's SAAJ implementation which I'm using with jdk1.4/JBoss 4.0.2. The message factory is org.apache.axis.soap.MessageFactoryImpl.