Announcement Announcement Module
No announcement yet.
Handling xmlns="" in Soap Envelope Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling xmlns="" in Soap Envelope

    Hi All,

    I am writing a web service interface and my user are sending me xmlns="" all over the place. They claim it is valid and is the way TIBCO works. This sucks for me because I get an exception that it is not valid from JDOM. Here is a snippet of what they are sending me:

    <SOAP-ENV:Envelope xmlns=""
    <SOAP-ENV:Header xmlns=""

    Does anyone have any suggestions on how to handle this in Spring WS?


  • #2
    What's the Exception? I got my tests working with "empty namespaces" with Spring WS 1.0.3.

    I had some issues which were fixed by updating the Xerces and Xalan dependencies to versions: Xerces 2.8.1 and Xalan 2.7.0.


    • #3
      namespace &quot;&quot; not valid

      The exception I got was:

      org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
      at org.jdom.Namespace.getNamespace( )
      at org.jdom.input.SAXHandler.startPrefixMapping(SAXHa
      at org.xml.sax.helpers.XMLFilterImpl.startPrefixMappi ng(Unknown Source)
      at org.jdom.transform.JDOMResult$ tPrefixMapping(
      at XHandler.startPrefixMapping(Unknown Source)
      at XHandler.namespaceAfterStartElement(Unknown Source)
      at O.parse(Unknown Source)
      at O.parse(Unknown Source)
      at formerImpl.transformIdentity(Unknown Source)
      at formerImpl.transform(Unknown Source)
      at formerImpl.transform(Unknown Source)
      at org.springframework.xml.transform.TransformerObjec tSupport.transform( 2)
      at mPayloadEndpoint.invoke(AbstractJDomPayloadEndpoin
      at loadEndpointAdapter.invoke(PayloadEndpointAdapter. java:48)
      at spatch(
      at ceive(
      at eMessageReceiverObjectSupport.handleConnection(Web
      at ssageReceiverHandlerAdapter.handle(WebServiceMessa
      at tcherServlet.doService(MessageDispatcherServlet.ja va:197)
      at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
      at org.springframework.web.servlet.FrameworkServlet.d oPost(
      at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)

      My pom.xml file is all over the place. There is no good example and the Maven repositories are not always correct. I wish there was a pom.xml file that I could get that actually worked without having to mess around with it. The reason I say that is because I am not sure if there is a clash of the jar files. I don't have xalan or xerces specifically in my pom file and I don't see it anywhere. Do you have it in your pom? Could you share your pom file with me?

      Anyway, I fixed the issue by changing me endpoint to extend AbstractDomPayloadEndpoint instead of the AbstractJDomPayloadEndpoint. I had to change my code to use the standard DOM libraries instead of JDOM.

      Thanks for your reply