Announcement Announcement Module
Collapse
No announcement yet.
SAAJ0511 problem with spring-ws Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    To change the version of a transitive dependency in Maven2, just add the dependency as a top level dependency to your project, using the desired version.

    Maven2 will then find the dependency in 2 different versions and pick the one that's closest to your project (closest in terms of transitions). A dependency of a dependency is always preferred to a dependency of a dependency's dependency. By making something a top level dependency of your project, you can make sure the version matches your expectations.

    Cheers,
    -Ralph.

    Comment


    • #17
      yes indeed

      Yes,

      That's exactly what I ended up doing...

      It might be helpfull to add the following 2 dependencies to the pom.xml of the Spring-WS tutorial.

      <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
      </dependency>
      <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.0</version>
      </dependency>

      Comment


      • #18
        I have the last couple of days experienced the problem of:
        "28-Aug-2007 10:45:05 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
        SEVERE: SAAJ0511: Unable to create envelope from given source"
        I could not find any simple answer to this on google, so I thought I should share with you the solution in my case which was very simple, but nonetheless extremely hard to find.

        I had forgotten to include
        Code:
        <xs:schema ... elementFormDefault="qualified">
        in my XML Schema.

        Sincerely,
        Paul

        Comment


        • #19
          Originally posted by andre.vermeulen View Post
          Yes,

          That's exactly what I ended up doing...

          It might be helpfull to add the following 2 dependencies to the pom.xml of the Spring-WS tutorial.

          <dependency>
          <groupId>xerces</groupId>
          <artifactId>xercesImpl</artifactId>
          <version>2.8.1</version>
          </dependency>
          <dependency>
          <groupId>xalan</groupId>
          <artifactId>xalan</artifactId>
          <version>2.7.0</version>
          </dependency>
          Thanks Andre - that worked a treat after a few hours of frustration!

          Comment


          • #20
            Hello,

            I'm using Grails with the Grails-metro-plugin 1.0.2 which comes with jaxws-spring 1.8. I deployed a service and the WSDL can be requested, but the following error occur, when I call the service:

            SCHWERWIEGEND: Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
            Message: Premature end of file.

            The recent xalan and xerces builds are in my Grails/lib directory. Does anyone knows what's on here?

            -thanks
            Last edited by creme-fresh; Jan 12th, 2009, 05:37 PM.

            Comment


            • #21
              played a little:

              when I delete all my controllers the services work ...,

              but when I create one the services fail.

              Are they fighting against each other ???

              Comment


              • #22
                resolved by:
                - deleting grails.mime.types xml part in the config.groovy
                - changing urlmappings to

                class UrlMappings {
                static mappings = {
                "/$controller/$action?/$id?"{
                constraints {
                controller(matches:/.*[^(services)].*/)
                }
                }
                "500"(view:'/error')
                }
                }

                Comment


                • #23
                  Revisiting SAAJ0511

                  Hello Ralph, Arjen

                  I have read your trail of posts regarding SAAJ0511 error code.

                  I am trying out my first Spring-Ws and seem to have hit the problem
                  straightaway . When I use TcpMon, The request goes out correctly , but
                  the response falls over because of the above error code.

                  I am running my test class in Eclipse, and my JRE is 1.6.0_12 -

                  My client pom.xml does nt have any entries for xalan and xerces but somehow xalan version 2.6.0 and xercesImpl 2.6.2 jars get put in. Think it is a transitive dependency.

                  version of other jars are :

                  spring - 2.5.6
                  maven - 2.0.9
                  spring-ws - 1.5.6
                  jaxen - 1.1
                  saaj-api - 1.3
                  saaj-impl - 1.3

                  I am running this on tomcat 6.0.16 .

                  Please find snippet of error logs below. Any help greatly appreciated. I am going around in circles playing with jars, and jre's for the last 8 hours.


                  02-Apr-2009 21:43:20 org.springframework.xml.xsd.commons.CommonsXsdSche maCollection afterPropertiesSet
                  INFO: Loaded URL [file:/E:/tomcat6/webapps/ecaptain/WEB-INF/classes/spring-ws-xsd/hr.xsd],URL [file:/E:/tomcat6/webapps/ecapt
                  ain/WEB-INF/classes/spring-ws-xsd/hr-response.xsd]
                  02-Apr-2009 21:43:21 org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory afterPropertiesSet
                  INFO: Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
                  02-Apr-2009 21:43:21 org.springframework.web.servlet.FrameworkServlet initServletBean
                  INFO: FrameworkServlet 'springws': initialization completed in 1141 ms
                  02-Apr-2009 21:43:21 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
                  SEVERE: SAAJ0511: Unable to create envelope from given source
                  02-Apr-2009 21:49:05 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
                  SEVERE: SAAJ0511: Unable to create envelope from given source
                  02-Apr-2009 21:49:32 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope

                  SEVERE: SAAJ0511: Unable to create envelope from given source

                  Thanks

                  Kasi

                  Comment


                  • #24
                    SAAJ0511 continues to occur on Java 1.6

                    Hello Ralph, Arjen

                    I have read your trail of posts regarding SAAJ0511 error code.

                    I am trying out my first Spring-Ws and seem to have hit the problem
                    straightaway . When I use TcpMon, The request goes out correctly , but
                    the response falls over because of the above error code.

                    I am running my test class in Eclipse, and my JRE is 1.6.0_12 -

                    My client pom.xml does nt have any entries for xalan and xerces but somehow xalan version 2.6.0 and xercesImpl 2.6.2 jars get put in. Think it is a transitive dependency.

                    version of other jars are :

                    spring - 2.5.6
                    maven - 2.0.9
                    spring-ws - 1.5.6
                    jaxen - 1.1
                    saaj-api - 1.3
                    saaj-impl - 1.3

                    I am running this on tomcat 6.0.16 .

                    Please find snippet of error logs below. Any help greatly appreciated. I am going around in circles playing with jars, and jre's for the last 8 hours.


                    02-Apr-2009 21:43:20 org.springframework.xml.xsd.commons.CommonsXsdSche maCollection afterPropertiesSet
                    INFO: Loaded URL [file:/E:/tomcat6/webapps/ecaptain/WEB-INF/classes/spring-ws-xsd/hr.xsd],URL [file:/E:/tomcat6/webapps/ecapt
                    ain/WEB-INF/classes/spring-ws-xsd/hr-response.xsd]
                    02-Apr-2009 21:43:21 org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory afterPropertiesSet
                    INFO: Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
                    02-Apr-2009 21:43:21 org.springframework.web.servlet.FrameworkServlet initServletBean
                    INFO: FrameworkServlet 'springws': initialization completed in 1141 ms
                    02-Apr-2009 21:43:21 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
                    SEVERE: SAAJ0511: Unable to create envelope from given source
                    02-Apr-2009 21:49:05 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
                    SEVERE: SAAJ0511: Unable to create envelope from given source
                    02-Apr-2009 21:49:32 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
                    SEVERE: SAAJ0511: Unable to create envelope from given source

                    Thanks

                    Kasi

                    Comment


                    • #25
                      Hi,
                      i've got this SAAJ0511: Unable to create envelope from given source too.

                      i'm trying to build up a spring-ws client.

                      my pojo were created using org.apache.cxf - cxf-codegen-plugin (version 2.5.2).

                      i'm using spring-ws 2.0.4.RELEASE

                      i get this exception just by running a simple junit test.

                      my configuration is very simple

                      <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
                      <property name="contextPath" value="commerce.connect" />
                      </bean>

                      <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory" />

                      I can't really put my hands on the server side.

                      Comment


                      • #26
                        I have added xerces and xalan on the server side and the problem was fixed.
                        Attachment
                        Attached Files

                        Comment


                        • #27
                          Originally posted by dtreece View Post
                          I am experiencing the same exception as described in this thread. I downloaded the jars (Xerces 2.8.1 and Xalan 2.7.0). I included them in my project dependencies and I am still getting the same Error. What am I missing? I didnt install properly?
                          Well, you have to make sure that the more recent versions are actually used. Some app servers override any JAXP libraries you provide in the WAR with their own internal versions. What app server are you running on?

                          __________________
                          download 5000 backlinks

                          Comment


                          • #28
                            Thanks! Adding Xerces 2.8.1 an Xalan 2.7.0 does actually work! I'm not getting the exception anymore after days of moving in circles!

                            Comment


                            • #29
                              fix in .pom file

                              If you are using jaxen, you can also fix it by excluding xom in you maven .pom file:
                              <dependency>
                              <groupId>jaxen</groupId>
                              <artifactId>jaxen</artifactId>
                              <version>1.1</version>
                              <exclusions>
                              <exclusion>
                              <groupId>xom</groupId>
                              <artifactId>xom</artifactId>
                              </exclusion>
                              </exclusions>
                              </dependency>

                              Comment

                              Working...
                              X