Announcement Announcement Module
Collapse
No announcement yet.
WebLogic 9.2 generate message with invalid namespace Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebLogic 9.2 generate message with invalid namespace

    Hello:
    I've installed the sprint-ws-1.03 and successfully run the airline sample using jetty.
    But I got following error in client side when running the sample in webloigc 9.2 server
    Code:
         
    Exception in thread "main" org.springframework.ws.soap.saaj.SaajSoap
    EnvelopeException: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
    ...
    
    Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: 
    An attempt is made to create or change an object in a way 
    which is incorrect with regard to namespaces.
    I found out that the weblogic generate a response with invalid namespace

    Code:
    <GetFlightsResponse xmlns="http://www.springframework.org/spring-ws/samples/airline/schemas" 
    xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">
    <flight xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">
    <number xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">KL1653</number>
    <departureTime xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">2006
    -01-31T10:05:00.000+08:00</departureTime>
    <from xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">
    <code xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">AMS</code>
    <name xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">Schiphol Airport</name>
    <city xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">Amster
    dam</city>
    </from>
    <arrivalTime xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">2006-01-31T12:25:00.000+08:00</arrivalTime>
    <to xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">
    <code xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">VCE</code>
    <name xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">Marco Polo Airport</name>
    <city xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">Venice</city>
    </to><serviceClass xmlns:="http://www.springframework.org/spring-ws/samples/airline/schemas">economy</serviceClass>
    </flight>
    </GetFlightsResponse>
    Is there any way to resolve it?

    Thanks in advnace.

  • #2
    Did you find a solution to this problem? I'm experiencing it, on tomcat 5.5 no is running correctly

    nbtux

    Comment


    • #3
      We had the same error message, and it was related to the Xalan version on classpath. 2.6.0 did not work, but 2.7.0 worked for us. Xalan got added to classpath transitively from Xom via Jaxen, so by just removing the Jaxen dependency, we got the correct version of Xalan. I don't know why we had Jaxen as a dependency originally, but removing it caused no side effects (so far)


      May be a long shot, but well worth the try. :-)

      Regards,
      Paul

      Comment


      • #4
        Hi ,
        We have our webservice working fine on jdk 1.5 build 4 weblogic 9.2 . When we switch to jdk 1.5 build 10 started to get NAMESPACE_ERR exception. Appreciate any
        pointers on resolving this

        Stack trace is :
        [org.springframework.ws.soap.server.SoapMessageDisp atcher] Endpoint invocation resulted in exception - responding with SOAP Fault
        javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
        at com.sun.org.apache.xalan.internal.xsltc.trax.Trans formerImpl.transform(TransformerImpl.java:651)
        at com.sun.org.apache.xalan.internal.xsltc.trax.Trans formerImpl.transform(TransformerImpl.java:281)
        at org.springframework.ws.server.endpoint.support.Pay loadRootUtils.getPayloadRootQName(PayloadRootUtils .java:83)
        at org.springframework.ws.server.endpoint.mapping.Pay loadRootAnnotationMethodEndpointMapping.getLookupK eyForMessage(PayloadRootAnnotationMethodEndpointMa pping.java:57)
        at org.springframework.ws.server.endpoint.mapping.Abs tractMethodEndpointMapping.getEndpointInternal(Abs tractMethodEndpointMapping.java:54)
        at org.springframework.ws.server.endpoint.mapping.Abs tractEndpointMapping.getEndpoint(AbstractEndpointM apping.java:83)
        at org.springframework.ws.server.MessageDispatcher.ge tEndpoint(MessageDispatcher.java:242)
        at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:195)
        at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:162)
        at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:87)
        at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)
        at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:197)

        Comment


        • #5
          I tried to use xlanaj 2.7.0 I still get the same exception. Appreciate any pointers to resolving this
          [2008-03-20 16:14:26,592] [32] [WARN] [org.springframework.ws.soap.server.SoapMessageDisp atcher] Endpoint invocation resulted in exception - responding with SOAP Fault
          javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
          at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:501)
          at org.springframework.ws.server.endpoint.support.Pay loadRootUtils.getPayloadRootQName(PayloadRootUtils .java:83)
          at org.springframework.ws.server.endpoint.mapping.Pay loadRootAnnotationMethodEndpointMapping.getLookupK eyForMessage(PayloadRootAnnotationMethodEndpointMa pping.java:57)
          at org.springframework.ws.server.endpoint.mapping.Abs tractMethodEndpointMapping.getEndpointInternal(Abs tractMethodEndpointMapping.java:54)
          at org.springframework.ws.server.endpoint.mapping.Abs tractEndpointMapping.getEndpoint(AbstractEndpointM apping.java:83)
          at org.springframework.ws.server.MessageDispatcher.ge tEndpoint(MessageDispatcher.java:242)
          at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:195)
          at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:162)
          at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:87)
          at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)

          Comment


          • #6
            There Can be TWO issues here :

            1.

            move xalan.jar at a higher priority than xerces.jar (Also moved the saaj-impl.jar 1st priority) in order to solve the NAMESPACE_ERR

            2.

            Weblogic has sometimes got a caching issue. If your schemas had changed and you redeployed your service. Please remove cache, undeploy the war and redeploy the war.

            Hope, this is of some help.

            Thanks,
            Milan

            Comment


            • #7
              Thanks. But I would like to know the root cuase of the error. I have some flexibility in changing class path order in development environment but not in higher environments. Can you please point me to where I can find on building the spring webservice source code. I see there is a patch for jira SWS-275 which has a patch for NAMESPACE_ERR. I dont know if its the same issue that I am getting but would like to see if that patch fixes it

              Comment


              • #8
                I have tried using JDK1.5-15 it solved the problem, I don't have any xalan in my class path. I had this issue with Java1.5_11.

                Comment


                • #9
                  Hi,
                  If I use xalanj 2.7 and the patch provided in http://jira.springframework.org/secu.../SWS-275.patch
                  the error gets resolved. It would be interesting to know the root cuase

                  Comment

                  Working...
                  X