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

  • Echo WS + SAAJ + Java 1.4 = ?

    Hello,

    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>(MessageImpl.java:755)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessage Factory1_1Impl.createMessage(SOAPMessageFactory1_1 Impl.java:62)
    at org.springframework.ws.soap.saaj.SaajSoapMessageCo ntextFactory.createContext(SaajSoapMessageContextF actory.java:115)
    at org.springframework.ws.transport.http.MessageEndpo intHandlerAdapter.handlePost(MessageEndpointHandle rAdapter.java:89)
    at org.springframework.ws.transport.http.MessageEndpo intHandlerAdapter.handle(MessageEndpointHandlerAda pter.java:68)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:806)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:736)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:360)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:1072)
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:465)
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:348)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6981)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3892)
    at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2766)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja 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,

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

    Comment


    • #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?

      Cheers,
      Pirkka

      Comment


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

        Comment


        • #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.

          So,

          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="org.springframework.ws.soap.saaj.SaajSoapMe ssageContextFactory">
          <property name="messageFactory"><bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAP MessageFactory1_1Impl"></bean></property>
          </bean>

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

          Comment


          • #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:

            Code:
            <bean id="axiomContextFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageContextFactory"/>
            and remove the saajContextFactory.

            Comment


            • #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.

              Comment

              Working...
              X