Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.RolePlayer


    }

    @Override
    @SuppressWarnings("unchecked")
    public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(final String[] actors) {
        RolePlayer rolePlayer = null;
        if (!ObjectUtils.isEmpty(actors)) {
            rolePlayer = new RolePlayer() {

                public List<?> getRoles() {
                    return Arrays.asList(actors);
                }
View Full Code Here


    @Override
    @SuppressWarnings("unchecked")
    public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(final String[] roles, final boolean isUltimateDestination)
            throws SoapHeaderException {
        RolePlayer rolePlayer = null;
        if (!ObjectUtils.isEmpty(roles)) {
            rolePlayer = new RolePlayer() {

                public List<?> getRoles() {
                    return Arrays.asList(roles);
                }
View Full Code Here

    protected void runTest() throws Throwable {
        SOAPEnvelope env = getTestMessage("roleMessage.xml");
        SOAPHeader soapHeader = env.getHeader();

        String roles [] = { CUSTOM_ROLE };
        RolePlayer rp = new MyRolePlayer(true, roles);

        Iterator headers = soapHeader.getHeadersToProcess(rp);
        assertTrue("No headers!", headers.hasNext());

        int numHeaders = 0;
View Full Code Here

        Message m = messageCtx.getMessage();
        JAXBBlockContext jbc = new JAXBBlockContext(jaxbcontext);
       
        // If allRoles is not specified, pass in a set of roles.
        // The headers must support that role.
        RolePlayer rolePlayer = null;
        if (allRoles == false) {
            rolePlayer = getRolePlayer();
        }
       
        if(m.getNumHeaderBlocks()>0){
View Full Code Here

          OMElement roleElement = (OMElement) iterator.next();
          roles.add(roleElement.getText());
        }
        final List unmodifiableRoles = Collections.unmodifiableList(roles);
        try{
          RolePlayer rolePlayer = new RolePlayer(){
            public List getRoles() {
              return unmodifiableRoles;
            }
            public boolean isUltimateDestination() {
              return isUltimateReceiever;
View Full Code Here

          OMElement roleElement = (OMElement) iterator.next();
          roles.add(roleElement.getText());
        }
        final List unmodifiableRoles = Collections.unmodifiableList(roles);
        try{
          RolePlayer rolePlayer = new RolePlayer(){
            public List getRoles() {
              return unmodifiableRoles;
            }
            public boolean isUltimateDestination() {
              return isUltimateReceiever;
View Full Code Here

    String filename =
            AbstractTestCase.basedir + "/test-resources/deployment/soaproleconfiguration";
    AxisConfiguration axisConfig = ConfigurationContextFactory
            .createConfigurationContextFromFileSystem(filename)
            .getAxisConfiguration();
    RolePlayer rolePlayer = (RolePlayer)axisConfig.getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
    assertNotNull(rolePlayer);
    assertFalse(rolePlayer.isUltimateDestination());
    assertEquals(1, rolePlayer.getRoles().size());
    assertEquals("http://my/custom/role", rolePlayer.getRoles().get(0));
  }
View Full Code Here

        }
    }
   
    public void testExtractAddressingInformationFromHeadersCustomRole() throws Exception{
      testFileName = "soapmessage.customrole.xml";
      Options options = extractAddressingInformationFromHeaders(new RolePlayer(){
      public List getRoles() {
        ArrayList al = new ArrayList();
        al.add("http://my/custom/role");
        return al;
      }
View Full Code Here

    }
   
    public void testExtractAddressingInformationFromHeadersCustomRoleSOAP12() throws Exception{
      testFileName = "soapmessage.customrole.soap12.xml";
      Options options = extractAddressingInformationFromHeaders(new RolePlayer(){
      public List getRoles() {
        ArrayList al = new ArrayList();
        al.add("http://my/custom/role");
        return al;
      }
View Full Code Here

        assertNotNull(options.getTo());
    }
   
    public void testExtractAddressingInformationFromHeadersCustomRole() throws Exception{
      testFileName = "soapmessage.customrole.xml";
      extractAddressingInformationFromHeaders(new RolePlayer(){
      public List getRoles() {
        ArrayList al = new ArrayList();
        al.add("http://my/custom/role");
        return al;
      }
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.RolePlayer

Copyright © 2018 www.massapicom. 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.