jax-ws
  1. jax-ws
  2. JAX_WS-1073

ws-addressing: when Action used, MessageId becomes mandatory

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I'm getting an error using ws-addressing to connect to a JAX-WS server. It appears to expect that when ws-addressing Action header is used then the server assumes MessageId becomes mandatory.

      The w3.org ws-addressing spec says MessageId is mandatory when ReplyTo or FaultTo is being used but these are not in the request.

      e.g.

      Request:

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
      xmlns:ns="urn://aaaa/"
      xmlns:wsa5="http://www.w3.org/2005/08/addressing">
      <soap:Header>
      <wsa5:From><wsa5:Address>http://localhost:12801</wsa5:Address></wsa5:From>
      <wsa5:To soap:mustUnderstand="true">http://localhost:8005/Simulator</wsa5:To>
      <wsa5:Action soap:mustUnderstand="true">/BootNotification</wsa5:Action>
      <ns:chargeBoxIdentity soap:mustUnderstand="true">REE001</ns:chargeBoxIdentity>
      </soap:Header>
      <soap:Body>
      <ns:bootNotificationRequest>
      </ns:bootNotificationRequest>
      </soap:Body>
      </soap:Envelope>

      Response:
      <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
      <S:Header>
      <Action xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/fault</Action>
      <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:3c295bea-86fb-47e8-a1ae-86cea8bccc29</MessageID>
      <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
      </S:Header>
      <S:Body>
      <env:Fault xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Code>
      <env:Value>env:Sender</env:Value>
      <env:Subcode>
      <env:Value xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageAddressingHeaderRequired</env:Value>
      <env:Subcode>
      <env:Value xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageAddressingHeaderRequired</env:Value>
      </env:Subcode>
      </env:Subcode>
      </env:Code>
      <env:Reason>
      <env:Text xml:lang="en-GB">A required header representing a Message Addressing Property is not present</env:Text>
      </env:Reason>
      <env:Detail>
      <ns2:ProblemHeaderQName xmlns:ns2="http://www.w3.org/2005/08/addressing">ns2:MessageID</ns2:ProblemHeaderQName>
      </env:Detail>
      </env:Fault>
      </S:Body>
      </S:Envelope>

      Stack:
      12-Jul-2012 10:08:40 com.sun.xml.ws.addressing.WsaTube validateInboundHeaders
      WARNING: A required header representing a Message Addressing Property is not present, Problem header:

      {http://www.w3.org/2005/08/addressing}

      MessageID
      com.sun.xml.ws.addressing.model.MissingAddressingHeaderException: Missing WS-Addressing header: "

      {http://www.w3.org/2005/08/addressing}

      MessageID"
      at com.sun.xml.ws.addressing.W3CWsaServerTube.checkMandatoryHeaders(W3CWsaServerTube.java:96)
      at com.sun.xml.ws.addressing.WsaTube.checkCardinality(WsaTube.java:362)
      at com.sun.xml.ws.addressing.WsaTube.checkMessageAddressingProperties(WsaTube.java:208)
      at com.sun.xml.ws.addressing.WsaServerTube.checkMessageAddressingProperties(WsaServerTube.java:335)
      at com.sun.xml.ws.addressing.WsaTube.validateInboundHeaders(WsaTube.java:165)
      at com.sun.xml.ws.addressing.WsaServerTube.processRequest(WsaServerTube.java:175)
      ....

      If wsa5:Action element is removed from the request it works ok.

      I'm using 2.26u2. Is this a bug?

        Issue Links

          Activity

          Hide
          miroslav.kos added a comment -

          According to WSA spec this behaviour is correct. See linked issue for details.

          Show
          miroslav.kos added a comment - According to WSA spec this behaviour is correct. See linked issue for details.

            People

            • Assignee:
              miroslav.kos
              Reporter:
              amountney
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: