Examples of WSS4JInInterceptor


Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

        //inProps.put("encryptionKeyIdentifier", "IssuerSerial");

        inProps.put("signaturePropFile", "wssecurity/etc/Server_SignVerf.properties");
        inProps.put("signatureKeyIdentifier", "DirectReference");

        return new WSS4JInInterceptor(inProps);

   
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

      Map<String, Object> inPropertyMap = WSSConfiguration.getWSS4JInterceptorConfiguration(true, true);
      Map<String, Object> outPropertyMap = WSSConfiguration.getWSS4JInterceptorConfiguration(true, false);

      if (inPropertyMap != null && handleSpecialProperties(inPropertyMap))
      {
         WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inPropertyMap);
         client.getInInterceptors().add(inInterceptor);
      }

      if (outPropertyMap != null && handleSpecialProperties(outPropertyMap))
      {
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

            cxfEndpoint.getOutInterceptors().add(wssOut);
        }
       
        if (!wss4jInProps.isEmpty()) {
            // pass the security properties to the WSS4J in interceptor
            WSS4JInInterceptor wssIn = new WSS4JInInterceptor(wss4jInProps);
            cxfEndpoint.getInInterceptors().add(wssIn);
        }
              
    }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

         server.getEndpoint().getInInterceptors().add(sci);
      }
     
      if (inPropertyMap != null)
      {
         WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inPropertyMap);
         server.getEndpoint().getInInterceptors().add(inInterceptor);
      }
     
      if (outPropertyMap != null)
      {
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

      Map<String, Object> inPropertyMap = getWSS4JInInterceptorProperties();
      Map<String, Object> outPropertyMap = getWSS4JOutInterceptorProperties();

      if (inPropertyMap != null && handleSpecialProperties(inPropertyMap))
      {
         WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inPropertyMap);
         client.getInInterceptors().add(inInterceptor);
      }

      if (outPropertyMap != null && handleSpecialProperties(outPropertyMap))
      {
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

        Map<String,Object> inProps= new HashMap<String,Object>();
        inProps.put("action", "Timestamp Signature Encrypt");
        inProps.put("signaturePropFile", "src_cxf/META-INF/alice.properties");
        inProps.put("passwordCallbackClass", "org.jboss.test.ws.jaxws.samples.wssecurity.KeystorePasswordCallback");
        inProps.put("decryptionPropFile", "src_cxf/META-INF/alice.properties");
        WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps); //response
        cxfEndpoint.getInInterceptors().add(wssIn);
        cxfEndpoint.getInInterceptors().add(new SAAJInInterceptor());
    }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
        endpoint.getOutInterceptors().add(wssOut);

        Map<String, Object> inProps = new HashMap<String, Object>();
        inProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
        WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
        endpoint.getInInterceptors().add(wssIn);

        assertEquals(12, calc.multiply(3, 4));
    }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

    public static final void setupWSS4JChain(Endpoint endpoint, Map<String, Object> inProps, Map<String, Object> outProps) {

        if (null != inProps && !inProps.isEmpty()) {
            endpoint.getInInterceptors().add(new SAAJInInterceptor());
            endpoint.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            // if WS Security is used with a JAX-WS handler (See EjbInterceptor), we have to deal with mustUnderstand flag
            // in WS Security headers. So, let's add an interceptor
            endpoint.getInInterceptors().add(new WSSPassThroughInterceptor());
        }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

        DocumentBuilder db = dbf.newDocumentBuilder();
        db.setEntityResolver(new NullResolver());
        doc = StaxUtils.read(db, reader, false);

        WSS4JInInterceptor inHandler = new WSS4JInInterceptor(inProperties);

        SoapMessage inmsg = new SoapMessage(new MessageImpl());
        ex.setInMessage(inmsg);
        inmsg.setContent(SOAPMessage.class, saajMsg);

        inHandler.handleMessage(inmsg);

        final List<WSHandlerResult> handlerResults =
            CastUtils.cast((List<?>)inmsg.get(WSHandlerConstants.RECV_RESULTS));
        return handlerResults;
    }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

            Map<String, Object> inProps = new HashMap<String, Object>();
            inProps.put("action", "UsernameToken Timestamp");
            inProps.put("passwordType", "PasswordText");
            inProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.