Hi,
I experience the following exception when dealing with specifically formated XML. The soap message looks like this:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body>
<n1:PAYLOAD_ROOT
xmlns:n1="http://www.company.com/namespace">
<n1:something1
xmlns:n1="http://www.company.com/namespace">
value1
</n1:something1>
<n1:something2
xmlns:n1="http://www.company.com/namespace">
value2
</n1:something2>
<n1:something3
xmlns:n1="http://www.company.com/namespace">
value3
</n1:something3>
</n1:PAYLOAD_ROOT>
</env:Body>
</env:Envelope>
note the declaration of the namespace (mlns:n1="http://www.company.com/namespace" on payload root and on all elements under the payload root).
The exception stacktrace follows:
2008-04-11 17:09:33,330 DEBUG org.springframework.ws.soap.server.SoapMessageDisp atcher - Endpoint invocation resulted in exception - responding with Fault
nu.xom.IllegalNameException: Attribute objects are not used to represent namespace declarations
at nu.xom.Attribute._setNamespace(Attribute.java:489)
at nu.xom.Attribute.<init>(Attribute.java:168)
at nu.xom.Attribute.<init>(Attribute.java:122)
at nu.xom.converters.DOMConverter.makeElement(DOMConv erter.java:388)
at nu.xom.converters.DOMConverter.convert(DOMConverte r.java:349)
at org.springframework.ws.server.endpoint.AbstractXom PayloadEndpoint.handleDomSource(AbstractXomPayload Endpoint.java:97)
at org.springframework.ws.server.endpoint.AbstractXom PayloadEndpoint.invoke(AbstractXomPayloadEndpoint. java:56)
at org.springframework.ws.server.endpoint.adapter.Pay loadEndpointAdapter.invoke(PayloadEndpointAdapter. java:48)
at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:216)
at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:163)
at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:88)
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)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
etc.
Spring-WS is 1.5, Java 1.6, xom as provided by maven dependencies. Thanks for help (even sending me to XOM mailinglist, if it is XOM bug).


Reply With Quote
