Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4641035

ERROR: Namespace for prefix 'http://schemas.xmlsoap.org/soap/envelope/' has not

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2.0
    • CPU:
      sparc
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      The following error occurs on attempting to do a SaveBusiness with the
      UDDI registry server cli script.

      run-cli-request:
           [echo] -- Running CLI client to process request: xml/SaveBusiness.xml --
           [java] ERROR: Namespace for prefix 'http://schemas.xmlsoap.org/soap/envelope/' has not been declared.
           [java] Exception in thread "main" java.lang.RuntimeException: SOAPException: Unable to get header stream in saveChanges: SOAP exception while trying to externalize: Unable to create envelope from given source: java.lang.RuntimeException: Namespace for prefix 'http://schemas.xmlsoap.org/soap/envelope/' has not been declared.
           [java] at com.sun.registry_server.util.CLIClient.main(CLIClient.java:158)
           [java] Java Result: 1

      We knew this problem was due to XSLTC being the default tranform implementation,
      rather than Xalan. If you delete xsltc.jar. The problem goes away. I tried to get more information by setting com.sun.log.registry_server=debug
      and com.sun.log.registry=debug. But catalina.out doesn't show anything
      when the error occurs.

      I removed xsltc.jar and before restarting Tomcat tried to do a SaveBusiness
      again and got the following error, and stack trace which definitely
      showed that XSLTC was involved. Don't understand why there was not
      a class no found error, since the xsltc.jar was gone.

       org.w3c.dom.DOMException: DOM002 Illegal character at
       org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:547)
       at
       org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:179)

      I thought the problem was occuring in the following code from

        com/sun/registry_server/server/RegistryServerServlet.java

      and in fact a problem with creating the DOMResult was found, but
      even with it fixed, the original SOAP exception still occurs.
      Back to the draving board.

      > //-------------------------------------------------------------------------
      > protected org.w3c.dom.Node extractBodyContentsFromSoapMessage(
      > SOAPMessage message)
      > throws SOAPFaultException {
      >
      > org.w3c.dom.Node uddiMessageNode = null;
      > try {
      > // decompose the SOAP message to get at the <Body>
      > SOAPPart soapPart = message.getSOAPPart();
      > Source contentAsSource = soapPart.getContent();
      >
      > // turn input source into a DOM for easier manipulation
      > DOMResult domResult = new DOMResult();
      > TransformerFactory transformerFactory =
      > TransformerFactory.newInstance();
      > Transformer transformer = transformerFactory.newTransformer();
      > transformer.transform(contentAsSource, domResult);
      >
      > // there is only 1 SOAP <Body> element
      > Document document = (Document)domResult.getNode();
      > NodeList nodeList = document.getElementsByTagNameNS(
      > SOAPConstants.URI_NS_SOAP_ENVELOPE,
      > UDDIConstants.SOAP_BODY);
      > Element soapBodyElement = (Element)nodeList.item(0);
      >
      > // there is only 1 child Element of <Body> and it's the UDDI message
      > NodeList soapBodyElements = soapBodyElement.getElementsByTagName("*");
      > uddiMessageNode = soapBodyElements.item(0);
      >
      > // only support v2 messages, check generic="2.0" attribute


      It may the same bug as reported in bugzilla 6417


      > XSLTC TRAX API produces a incorrect DOM Structure when using a DOMResult.
      >
      > The org.apache.xalan.xsltc.trax.SAX2DOM class automatically adds a Element with
      > the name "root" to the top of the DOM tree on the startDocument method. On a
      > successful transform call, the node returned from the DOMResult.getNode()
      > method is the document node, with this "root" element attached as the first
      > child. Xalan and Saxon both have the output document top nodes directly
      > attached below the Document node.
      >
      > Also, as a side issue, the TransformerImpl and SAX2DOM Classes does not respect
      > any node already set in the DOMResult.
      >
      > Tim Elcott

      Note also that the Xalan test harness API test DOMResultAPITest shows
      some fails that may also be due to the same problem.

      Here's the stack dump showing the error that occurs on attempting to run
      the UDDI registry server run-cli-save target when xsltc.jar is moved out
      of the waythat led me to these conclusions.

           [java] CLIClient: response =
           [java] <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/
      "><soap-env:Header/><soap-env:Body><soap-env:Fault><soap-env:Detail><registry-server:RegistryServerServlet xmlns:registry-server="
      http://sun.com/registry_server"/>javax.xml.transform.TransformerException: org.w3c.dom.DOMException: DOM002 Illegal character at
      org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:547) at
      org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:179) at
      com.sun.registry_server.server.RegistryServerServlet.extractBodyContentsFromSoapMessage(RegistryServerServlet.java:315) at
      com.sun.registry_server.server.RegistryServerServlet.onMessage(RegistryServerServlet.java:99) at
      javax.xml.messaging.JAXMServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
      javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2348) at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1024) at
      org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1119) at
      java.lang.Thread.run(Thread.java:484) --------- org.w3c.dom.DOMException: DOM002 Illegal character at
      org.apache.xerces.dom.CoreDocumentImpl.createAttribute(CoreDocumentImpl.java:484) at
      org.apache.xerces.dom.ElementImpl.setAttribute(ElementImpl.java:452) at
      org.apache.xalan.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:125) at
      org.apache.xalan.xsltc.runtime.TextOutput.closeStartTag(TextOutput.java:280) at
      org.apache.xalan.xsltc.runtime.TextOutput.startElement(TextOutput.java:488) at
      org.apache.xalan.xsltc.dom.DOMImpl.copyElement(DOMImpl.java:2746) at org.apache.xalan.xsltc.dom.DOMImpl.copy(DOMImpl.java:2630) at
      org.apache.xalan.xsltc.dom.DOMImpl.copy(DOMImpl.java:2648) at org.apache.xalan.xsltc.dom.DOMImpl.copy(DOMImpl.java:2606) at
      org.apache.xalan.xsltc.dom.DOMAdapter.copy(DOMAdapter.java:215) at GregorSamsa.applyTemplates() at GregorSamsa.transform() at
      org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:547) at
      org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:539) at
      org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:179) at
      com.sun.registry_server.server.RegistryServerServlet.extractBodyContentsFromSoapMessage(RegistryServerServlet.java:315) at
      com.sun.registry_server.server.RegistryServerServlet.onMessage(RegistryServerServlet.java:99) at
      javax.xml.messaging.JAXMServlet.doPost(Unknown Source) at
      javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2348) at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577) at
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469) at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575) at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483) at
      org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
      org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1024) at
      org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1119) at
      java.lang.Thread.run(Thread.java:484)</soap-env:Detail><soap-env:faultcode>soap-env:Server</soap-env:faultcode><soap-env:faultstring>org.w3c.dom.DOMException:
      DOM002 Illegal
      character</soap-env:faultstring><soap-env:faultactor></soap-env:faultactor></soap-env:Fault></soap-env:Body></soap-env:Envelope>


        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: