wsit
  1. wsit
  2. WSIT-1613

SOAPFaultException on client not created, if STS returns a FaultMessage

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      If a RuntimeException occurs in a service with Mutual Certificate Security, the Metro client throws this error:

      [java] 03.11.2011 09:37:24 com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier verifyPolicy
      [java] SCHWERWIEGEND: Policy is null
      [java] 03.11.2011 09:37:24 com.sun.xml.wss.jaxws.impl.SecurityClientTube processClientResponsePacket
      [java] SCHWERWIEGEND: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
      [java] com.sun.xml.wss.impl.PolicyViolationException: ERROR: Policy for the service could not be obtained
      [java] at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:134)
      [java] at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.createMessage(SecurityRecipient.java:983)
      [java] at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:232)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:450)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientResponsePacket(SecurityClientTube.java:434)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processResponse(SecurityClientTube.java:362)
      [java] at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:651)
      [java] at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
      [java] at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
      [java] at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
      [java] at com.sun.xml.ws.client.Stub.process(Stub.java:323)
      [java] at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
      [java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
      [java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
      [java] at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
      [java] at $Proxy39.getAccountBalance(Unknown Source)
      [java] at simple.client.FinancialServiceClient.main(FinancialServiceClient.java:75)
      [java] javax.xml.ws.WebServiceException: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
      [java] Caught Exception: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
      [java] at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientResponsePacket(SecurityClientTube.java:439)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processResponse(SecurityClientTube.java:362)
      [java] at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:651)
      [java] at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
      [java] at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
      [java] at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
      [java] at com.sun.xml.ws.client.Stub.process(Stub.java:323)
      [java] at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
      [java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
      [java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
      [java] at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
      [java] at $Proxy39.getAccountBalance(Unknown Source)
      [java] at simple.client.FinancialServiceClient.main(FinancialServiceClient.java:75)
      [java] Caused by: javax.xml.ws.soap.SOAPFaultException: Invalid Security Header
      [java] at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.getSOAPFaultException(SecurityTubeBase.java:696)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.getSOAPFaultException(SecurityTubeBase.java:714)
      [java] ... 13 more
      [java] Caused by: com.sun.xml.wss.impl.WssSoapFaultException: Invalid Security Header
      [java] at com.sun.xml.wss.impl.SecurableSoapMessage.newSOAPFaultException(SecurableSoapMessage.java:348)
      [java] at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.getSOAPFaultException(SecurityTubeBase.java:710)
      [java] ... 13 more

      To reproduce, use sample from /wsit/wsit/samples/ws-security/src folder :
      i ) mcs : Mutual Certificate Security

      and change line 75 to

      String balance = stub.getAccountBalance(null);

      This leads to a NullPointerException in the service and on the client to error described above.

        Activity

        Hide
        andreasnagel added a comment -

        please delete this issue. I accidently used the clone feature.

        Show
        andreasnagel added a comment - please delete this issue. I accidently used the clone feature.
        Hide
        kumarjayanti added a comment -

        We are confused. This bug is the same as 1591 and we are sure we fixed the problem. We created the exact same testcase that you describe and it is working as expected now.

        Show
        kumarjayanti added a comment - We are confused. This bug is the same as 1591 and we are sure we fixed the problem. We created the exact same testcase that you describe and it is working as expected now.
        Hide
        kumarjayanti added a comment -

        Duplicate of 1591

        Show
        kumarjayanti added a comment - Duplicate of 1591

          People

          • Assignee:
            kumarjayanti
            Reporter:
            andreasnagel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: