Petals BC SOAP

Problem with WS-Addressing namespace (trailing / )

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.0.3
  • Fix Version/s: 4.1
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    When sending WS-addressing headers to a BC-SOAP consumes endpoint, the WSA namespace MUST end with a trailing "/" (like in xmlns:wsa="http://www.w3.org/2005/08/addressing/" ).
    If, instead, no "/" is provided (like in xmlns:wsa="http://www.w3.org/2005/08/addressing"), an axis fault is thrown.

    Examples follow: the ONLY difference in the request message being a "/" at the end of the WSA namespace...

    The problem is, that Axis2 clients generate WSA namespaces without trailing "/" when WSA is activated... so when an Axis2 client (with WSA activated) tries to contact a Petals endpoint, it simply fails !

    Note that this problem (or at least something similar) had been pointed out a long time ago (Feb. 2008), here:
    http://mail-archive.ow2.org/petals-users/2008-02/msg00024.html
    Looks like the issue is still there ?

    Successful exchange:
    --------------------

    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing/">
    <wsa:To>http://localhost:8888/petals/services/NoAuthentification</wsa:To>
    <wsa:MessageID>urn:uuid:725595239BF6E311C51289837850575</wsa:MessageID>
    <wsa:Action>verifierAuth</wsa:Action></soapenv:Header>
    <soapenv:Body><ns1:verifierAuth xmlns:ns1="http://ws.air.defense.gouv.fr/"><arg0><uid>bob</uid><pwd>petals</pwd></arg0></ns1:verifierAuth></soapenv:Body></soapenv:Envelope>

    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns3:verifierAuthResponse xmlns:ns3="http://ws.air.defense.gouv.fr/" xmlns:ns2="http://webdef.air.defense.gouv.fr/" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><return><out>false</out></return></ns3:verifierAuthResponse></soapenv:Body></soapenv:Envelope>

    Unsuccessful exchange:
    ----------------------

    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:To>http://localhost:8888/petals/services/NoAuthentification</wsa:To>
    <wsa:MessageID>urn:uuid:725595239BF6E311C51289837850575</wsa:MessageID>
    <wsa:Action>verifierAuth</wsa:Action></soapenv:Header>
    <soapenv:Body><ns1:verifierAuth xmlns:ns1="http://ws.air.defense.gouv.fr/"><arg0><uid>bob</uid><pwd>petals</pwd></arg0></ns1:verifierAuth></soapenv:Body></soapenv:Envelope>

    ?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action><wsa:RelatesTo>urn:uuid:725595239BF6E311C51289837850575</wsa:RelatesTo><wsa:FaultDetail><wsa:ProblemAction><wsa:Action>verifierAuth</wsa:Action></wsa:ProblemAction></wsa:FaultDetail></soapenv:Header><soapenv:Body><soapenv:Fault xmlns:wsa="http://www.w3.org/2005/08/addressing"><faultcode>wsa:ActionNotSupported</faultcode><faultstring>The [action] cannot be processed at the receiver.</faultstring><detail><Exception>org.apache.axis2.AxisFault: The [action] cannot be processed at the receiver.
    at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373)
    at org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336)
    at org.apache.axis2.handlers.addressing.AddressingValidationHandler.checkAction(AddressingValidationHandler.java:149)
    at org.apache.axis2.handlers.addressing.AddressingValidationHandler.invoke(AddressingValidationHandler.java:55)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
    at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doPost(SoapServlet.java:122)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:320)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

    Show
    When sending WS-addressing headers to a BC-SOAP consumes endpoint, the WSA namespace MUST end with a trailing "/" (like in xmlns:wsa="http://www.w3.org/2005/08/addressing/" ). If, instead, no "/" is provided (like in xmlns:wsa="http://www.w3.org/2005/08/addressing"), an axis fault is thrown. Examples follow: the ONLY difference in the request message being a "/" at the end of the WSA namespace... The problem is, that Axis2 clients generate WSA namespaces without trailing "/" when WSA is activated... so when an Axis2 client (with WSA activated) tries to contact a Petals endpoint, it simply fails ! Note that this problem (or at least something similar) had been pointed out a long time ago (Feb. 2008), here: http://mail-archive.ow2.org/petals-users/2008-02/msg00024.html Looks like the issue is still there ? Successful exchange: -------------------- <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing/"> <wsa:To>http://localhost:8888/petals/services/NoAuthentification</wsa:To> <wsa:MessageID>urn:uuid:725595239BF6E311C51289837850575</wsa:MessageID> <wsa:Action>verifierAuth</wsa:Action></soapenv:Header> <soapenv:Body><ns1:verifierAuth xmlns:ns1="http://ws.air.defense.gouv.fr/"><arg0><uid>bob</uid><pwd>petals</pwd></arg0></ns1:verifierAuth></soapenv:Body></soapenv:Envelope> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns3:verifierAuthResponse xmlns:ns3="http://ws.air.defense.gouv.fr/" xmlns:ns2="http://webdef.air.defense.gouv.fr/" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><return><out>false</out></return></ns3:verifierAuthResponse></soapenv:Body></soapenv:Envelope> Unsuccessful exchange: ---------------------- <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:To>http://localhost:8888/petals/services/NoAuthentification</wsa:To> <wsa:MessageID>urn:uuid:725595239BF6E311C51289837850575</wsa:MessageID> <wsa:Action>verifierAuth</wsa:Action></soapenv:Header> <soapenv:Body><ns1:verifierAuth xmlns:ns1="http://ws.air.defense.gouv.fr/"><arg0><uid>bob</uid><pwd>petals</pwd></arg0></ns1:verifierAuth></soapenv:Body></soapenv:Envelope> ?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action><wsa:RelatesTo>urn:uuid:725595239BF6E311C51289837850575</wsa:RelatesTo><wsa:FaultDetail><wsa:ProblemAction><wsa:Action>verifierAuth</wsa:Action></wsa:ProblemAction></wsa:FaultDetail></soapenv:Header><soapenv:Body><soapenv:Fault xmlns:wsa="http://www.w3.org/2005/08/addressing"><faultcode>wsa:ActionNotSupported</faultcode><faultstring>The [action] cannot be processed at the receiver.</faultstring><detail><Exception>org.apache.axis2.AxisFault: The [action] cannot be processed at the receiver. at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373) at org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336) at org.apache.axis2.handlers.addressing.AddressingValidationHandler.checkAction(AddressingValidationHandler.java:149) at org.apache.axis2.handlers.addressing.AddressingValidationHandler.invoke(AddressingValidationHandler.java:55) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doPost(SoapServlet.java:122) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:320) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
  • Environment:
    Petals 3.1 Linux

Activity

Hide
Christophe DENEUX added a comment - Thu, 18 Nov 2010 - 09:56:36 +0100

If I correctly understand, the problem is on the client side. So, against the provider mode, I think that the BC SOAP has not to compensate client bugs.

Show
Christophe DENEUX added a comment - Thu, 18 Nov 2010 - 09:56:36 +0100 If I correctly understand, the problem is on the client side. So, against the provider mode, I think that the BC SOAP has not to compensate client bugs.
Hide
Christophe DENEUX added a comment - Thu, 18 Nov 2010 - 10:00:56 +0100

According to the XSD available on the W3C: http://www.w3.org/2002/ws/addr/ns/ws-addr

The namespace has no slash at the end. So, are you sure it's a problem of the client ? I'm not sure.

Show
Christophe DENEUX added a comment - Thu, 18 Nov 2010 - 10:00:56 +0100 According to the XSD available on the W3C: http://www.w3.org/2002/ws/addr/ns/ws-addr The namespace has no slash at the end. So, are you sure it's a problem of the client ? I'm not sure.
Hide
Pierre-Yves Gibello added a comment - Thu, 18 Nov 2010 - 11:31:20 +0100

No, it's a problem in the server.

What I said is, if I add a "/" on the client side... then it works.

But it is a non-standard workaround : I should never have to do that, the spec says "no /", and the Axis WSA-enabled clients never put any "/" at the end of WSA headers (in other words... my workaround is not WSA-compliant !)

The problem seems to exist only with Petals : an Axis2+Rampart server works fine without modifying the client headers.

Show
Pierre-Yves Gibello added a comment - Thu, 18 Nov 2010 - 11:31:20 +0100 No, it's a problem in the server. What I said is, if I add a "/" on the client side... then it works. But it is a non-standard workaround : I should never have to do that, the spec says "no /", and the Axis WSA-enabled clients never put any "/" at the end of WSA headers (in other words... my workaround is not WSA-compliant !) The problem seems to exist only with Petals : an Axis2+Rampart server works fine without modifying the client headers.
Hide
noddoux added a comment - Fri, 19 Nov 2010 - 10:25:33 +0100

If there is a "/", Axis2 does not process WSA-Addressing because it considers there is no WSA-Addressing header in the incoming SOAP message so it works

Show
noddoux added a comment - Fri, 19 Nov 2010 - 10:25:33 +0100 If there is a "/", Axis2 does not process WSA-Addressing because it considers there is no WSA-Addressing header in the incoming SOAP message so it works
Hide
noddoux added a comment - Fri, 19 Nov 2010 - 11:01:54 +0100

A parameter soap:enable-wsa is added to the jbi.xml of a SU consume. The WSA-Addressing is disabled by default. To enable it, set the parameter to true.

Show
noddoux added a comment - Fri, 19 Nov 2010 - 11:01:54 +0100 A parameter soap:enable-wsa is added to the jbi.xml of a SU consume. The WSA-Addressing is disabled by default. To enable it, set the parameter to true.
Christophe DENEUX made changes - Fri, 30 Sep 2011 - 12:20:17 +0200
Fix Version/s 4.1_4.0 [ 10269 ]
Fix Version/s 4.1 [ 10186 ]
Sébastien Rebiere made changes - Thu, 16 Feb 2012 - 17:06:35 +0100
Fix Version/s 4.1 [ 10186 ]
Fix Version/s 4.1_4.0 [ 10269 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
3d 18h 5m
1
noddoux
Fri, 19 Nov 2010 - 11:39:15 +0100
Open Open In Progress In Progress
2s
1
noddoux
Fri, 19 Nov 2010 - 11:39:17 +0100
In Progress In Progress Resolved Resolved
8s
1
noddoux
Fri, 19 Nov 2010 - 11:39:25 +0100



People

Dates

  • Created:
    Mon, 15 Nov 2010 - 17:33:57 +0100
    Updated:
    Thu, 16 Feb 2012 - 17:06:35 +0100
    Resolved:
    Fri, 19 Nov 2010 - 11:39:25 +0100