Package org.jboss.soa.esb.addressing

Examples of org.jboss.soa.esb.addressing.PortReference$Extension


        // basic request generation with nonce
        OCSPReqBuilder gen = new OCSPReqBuilder();

        gen.addRequest(id);

        Extension ext = new Extension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, false, new DEROctetString(new DEROctetString(PdfEncryption.createDocumentId()).getEncoded()));
        gen.setRequestExtensions(new Extensions(new Extension[]{ext}));

        return gen.build();
    }
View Full Code Here


        // basic request generation with nonce
        OCSPReqBuilder gen = new OCSPReqBuilder();

        gen.addRequest(id);

        Extension ext = new Extension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, false, new DEROctetString(new DEROctetString(PdfEncryption.createDocumentId()).getEncoded()));
        gen.setRequestExtensions(new Extensions(new Extension[]{ext}));

        return gen.build();
    }
View Full Code Here

       
        // request
        //create a nonce to avoid replay attack
        BigInteger nonce = BigInteger.valueOf(nonceTimeinMillis);
        DEROctetString nonceDer = new DEROctetString(nonce.toByteArray());
        Extension ext = new Extension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, true, nonceDer);
        Extensions exts = new Extensions(ext);
       
        OCSPReqBuilder ocspReqBuilder = new OCSPReqBuilder();
        ocspReqBuilder.addRequest(certId);
        ocspReqBuilder.setRequestExtensions(exts);
View Full Code Here

      DigestCalculatorProvider digestCalculatorProvider = digestCalculatorProviderBuilder.build();
      DigestCalculator digestCalculator = digestCalculatorProvider.get(CertificateID.HASH_SHA1);

      BasicOCSPRespBuilder builder = new BasicOCSPRespBuilder(keyInfo, digestCalculator);

      Extension ocspNonce = ocspReq.getExtension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce);
      if (ocspNonce != null) {
        builder.setResponseExtensions(new Extensions(new Extension[] { ocspNonce }));
      }

      Req[] list = ocspReq.getRequestList();
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EXTENSION: {
            Extension extension = (Extension) theEObject;
            T result = caseExtension(extension);
            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
View Full Code Here

        @Override
        public void endElement(String uri, String localName, String name) {
            // Detect Extension object
            EObject peekObject = objects.peek();
            if (peekObject instanceof Extension) {
                Extension extension = (Extension) peekObject;
                if (extension.isMustUnderstand() && null != extension.getXsdDefinition()) {
                    loadExtensionSchema(extension.getXsdDefinition());
                }
            }
            super.endElement(uri, localName, name);
        }
View Full Code Here

   * @deprecated
   */
 
  public void setURL (URL url)
  {
    super.setAddr(new PortReference(url.toString()));
  }
View Full Code Here

        }
      }
    }
    if (uri != null) {
      final String address = getJmsAddress(uri, name) ;
      setAddr(new PortReference(address));
    }
  }
View Full Code Here

      if (destinationType.equals(QUEUE_TYPE)
          || destinationType.equals(TOPIC_TYPE))
      {
        String uri = null;
        String name = null;
        PortReference addr = new PortReference();
       
                if (environment!=null) {
                    for (Object key : environment.keySet()) {
                      if (key.toString().equals(JNDI_URL_TAG))
                        uri = environment.getProperty(key.toString());
                      else
                      {
                        if (key.toString().equals(DESTINATION_NAME_TAG))
                        {
                          name = environment.getProperty(key.toString());
                         
                          if ((destinationName != null) && !name.equals(destinationName))
                            throw new IllegalArgumentException("Destination name inconsistency: < "+name+", "+destinationName+" >");
                        }
                        else
                          addr.addExtension(key.toString(), environment.getProperty(key.toString()));
                      }
                    }
                }
               
                if (uri == null) {
                    uri = addr.getExtensionValue(Context.PROVIDER_URL) ;
                }
               
                if (uri == null) {
                    uri = Configuration.getJndiServerURL() ;
                }
 
                if (name == null)
                  name = destinationName;
               
                addr.setAddress(getJmsAddress(uri, name));

        addr.addExtension(DESTINATION_TYPE_TAG, destinationType);
        addr.addExtension(DESTINATION_NAME_TAG, destinationName);
       
        addr.addExtension(SPECIFICATION_VERSION_TAG, protocol);

        if (connection != null)
          addr.addExtension(CONNECTION_FACTORY_TAG, connection);

        if (messageSelector != null)
          addr.addExtension(MESSAGE_SELECTOR_TAG, messageSelector);
               
        addr.addExtension(PERSISTENT_TAG, String.valueOf(peristent));
       
        addr.addExtension(ACKNOWLEDGE_MODE_TAG, String.valueOf(AcknowledgeMode.getAckMode(acknowledgeModeStr)));
       
        setAddr(addr);
       
        if(username != null)
          addr.addExtension(JMS_SECURITY_PRINCIPAL_TAG, username);
       
        if(password != null)
          addr.addExtension(JMS_SECURITY_CREDENTIAL_TAG, password);
       
        addr.addExtension(TRANSACTED_TAG, String.valueOf(transacted));
      }
      else
        throw new IllegalArgumentException("Invalid destination type! "+destinationType);
    }
    else
View Full Code Here

     * @return the replyTo EPR of the JBpmCallbackService.
     */
    protected EPR createReplyTo(String esbToJBpmXml, Boolean globalProcessScope, ExecutionContext executionContext)
    {
        EPR replyTo = new LogicalEPR(ServiceInvoker.INTERNAL_SERVICE_CATEGORY, JBpmCallback.JBPM_CALL_BACK_SERVICE_NAME);
        PortReference portReference = replyTo.getAddr();
        if (globalProcessScope!=null) {
            portReference.addExtension(Constants.PROCESS_SCOPE_ATTR, globalProcessScope.toString());
        }
        final Token token = executionContext.getToken() ;
        final long tokenId = token.getId();
        portReference.addExtension(Constants.TOKEN_ID, String.valueOf(tokenId));
        String nodeId = "";
        if (executionContext.getNode()!=null) {
            nodeId = String.valueOf(executionContext.getNode().getId());
            portReference.addExtension(Constants.NODE_ID, nodeId);
           
        }
        portReference.addExtension(Constants.PROCESS_INSTANCE_ID, String.valueOf(executionContext.getProcessInstance().getId()));
       
        String counterName = Constants.PROCESS_NODE_VERSION_COUNTER  + nodeId + '_' + tokenId;
        Long counter = Long.getLong(String.valueOf(executionContext.getVariable(counterName)));
        if (counter!=null) {
            counter = counter + 1;
        } else {
            counter = 0l;
        }
        //Adding to the jBPM variableMap
        executionContext.getContextInstance().setVariableLocally(counterName, counter.toString(), token);
        //Adding same value to the message
        portReference.addExtension(counterName, counter.toString());
        return replyTo;
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.PortReference$Extension

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.