Package org.apache.muse.core

Examples of org.apache.muse.core.Environment


            throw new RuntimeException("Invalid SOAP envelope: no body element.");

        Element requestData = XmlUtils.getFirstElement(body);
       
        ResourceRouter router = getRouter();
        Environment env = router.getEnvironment();

        MessageHeaders addressing = null;

        try
        {
            //
            // WS-A info provides resource context for this request
            //
            addressing = new MessageHeaders(header);
            env.addAddressingContext(addressing);
        }

        catch (Throwable error)
        {
            LoggingUtils.logError(router.getLog(), error);
        }

        if (!hasFailedToInitialize())
            LoggingUtils.logMessage(router.getLog(), request, true);

        //
        // actually perform the operation with the given parameters
        //
        Element result = router.invoke(requestData);
       
        //
        // the standard response wsa:Action name is Action + "Response"
        //
        MessageHeaders replyAddressing = null;

        //
        // send back fault headers on exception
        //
        if (SoapUtils.isFault(result))
            replyAddressing = addressing.createFaultHeaders();

        else
            replyAddressing = addressing.createReplyHeaders();

        //
        // DONE - must be sure to remove the request context, or
        // we'll have a memory leak
        //
        env.removeAddressingContext();

        //
        // import all of the headers into the response envelope...
        //       
        Element replyXML = replyAddressing.toXML();
View Full Code Here


    OSGiResourceManager manager = new OSGiResourceManager();
    return manager;
  }
 
  public Bundle getDelegateBundle(){
        Environment env = getEnvironment();
        EndpointReference epr = env.getAddressingContext().getToAddress();
        String address = epr.getAddress().toString();
       
        Iterator keys = contextToBundleMap.keySet().iterator();
        while(keys.hasNext()){
          String currentKey = (String)keys.next();
View Full Code Here

  public static void run(File[] files, String outputFileName, String outputRMDFileName, boolean overwrite, String uri, String address) throws FileNotFoundException {   
    Document[] wsdls = new Document[files.length];
    MetadataDescriptor[] metadatas = new MetadataDescriptor[files.length];

    for(int i=0; i < files.length; i++) {
      Environment env = new WsdlEnvironment(files[i].getAbsoluteFile().getParentFile());
      wsdls[i] = WsdlUtils.createWSDL(env, files[i].getName(), true);
     
      //
      // wsdl4j will get angry when it tries to resolve these because we're not
      // providing the base directory since we've already read them in. So
View Full Code Here

              WsrmdConstants.DESCRIPTOR_LOCATION_ATTR_QNAME);
         
          LOGGER.debug(Messages.QMAN_200034_RMD_NAME, rmdName);
          LOGGER.debug(Messages.QMAN_200035_RMD_PATH, rmdPath);
         
          Environment env = getEnvironment();
          String path = env.createRelativePath(getWsdlPath(), rmdPath);       
          Document rmdDoc = env.getDocument(path);
         
          Element[] additionalProperties =
            ThreadSessionManager
              .getInstance()
              .getSession()
View Full Code Here

            throw new RuntimeException(_MESSAGES.get("IncompleteMetadataAttributes"));
       
        //
        // load the doc and parse into a descriptor
        //
        Environment env = getEnvironment();
        String path = env.createRelativePath(getWsdlPath(), rmdPath);       
        Document rmdDoc = env.getDocument(path);
       
        Element descriptorXML = WsrmdUtils.getMetadataDescriptor(rmdDoc, rmdName);
       
        if (descriptorXML == null)
        {
View Full Code Here

      throw new IllegalArgumentException(_MESSAGES.get("NonExistantWSDL"));
    }
   
    File parent = new File(wsdlFile.getAbsoluteFile().getParent());
   
    Environment environment = new LocalEnvironment(parent.getAbsoluteFile());
   
    try {
      Document wsdl = WsdlUtils.createWSDL(
          environment,
          wsdlFile.getName(),
View Full Code Here

            throw new RuntimeException("Invalid SOAP envelope: no body element.");

        Element requestData = XmlUtils.getFirstElement(body);
       
        ResourceRouter router = getRouter();
        Environment env = router.getEnvironment();

        MessageHeaders addressing = null;

        try
        {
            //
            // WS-A info provides resource context for this request
            //
            addressing = new MessageHeaders(header);
            env.addAddressingContext(addressing);
        }

        catch (Throwable error)
        {
            LoggingUtils.logError(router.getLog(), error);
        }

        if (!hasFailedToInitialize())
            LoggingUtils.logMessage(router.getLog(), request, true);

        //
        // actually perform the operation with the given parameters
        //
        Element result = router.invoke(requestData);
       
        //
        // the standard response wsa:Action name is Action + "Response"
        //
        MessageHeaders replyAddressing = null;

        //
        // send back fault headers on exception
        //
        if (SoapUtils.isFault(result))
            replyAddressing = addressing.createFaultHeaders();

        else
            replyAddressing = addressing.createReplyHeaders();

        //
        // DONE - must be sure to remove the request context, or
        // we'll have a memory leak
        //
        env.removeAddressingContext();

        //
        // import all of the headers into the response envelope...
        //       
        Element replyXML = replyAddressing.toXML();
View Full Code Here

     */
    protected NotificationConsumerClient createConsumerClient()
    {
        EndpointReference consumer = getConsumerReference();
        EndpointReference producer = getProducerReference();
        Environment env = getEnvironment();
       
        NotificationConsumerClient client = new NotificationConsumerClient(consumer, producer, env);
        client.setTrace(isUsingTrace());
       
        return client;
View Full Code Here

TOP

Related Classes of org.apache.muse.core.Environment

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.