Package org.apache.muse.ws.addressing

Examples of org.apache.muse.ws.addressing.EndpointReference


        String defaultURI = getDefaultURI();
       
        if (defaultURI == null)
            throw new IllegalStateException(_MESSAGES.get("NoDefaultURI"));
       
        return new EndpointReference(URI.create(defaultURI));
    }
View Full Code Here


       
        //
        // create the unique EPR for the resource using the
        // ID factory specified
        //
        EndpointReference uniqueEPR = env.getDeploymentEPR();
       
        ResourceIdFactory idFactory = getResourceIdFactory();
       
        if (idFactory != null)
        {
            QName id = idFactory.getIdentifierName();
            String value = idFactory.getNextIdentifier();
            uniqueEPR.addParameter(id, value);
        }
       
        resource.setEndpointReference(uniqueEPR);
       
        //
View Full Code Here

        MessageHeaders wsa = env.getAddressingContext();
       
        if (wsa == null)
            throw new RuntimeException(_MESSAGES.get("NoAddressingContext"));
       
        EndpointReference epr = wsa.getToAddress();
       
        Resource resource = manager.getResource(epr);
       
        if (resource == null)
        {
View Full Code Here

    else if(contribution instanceof ServiceContribution)
      proxy = (ManagementContributionProxy)manager.createResource("/OSGiServiceResource");
    proxy.setContribution(contribution);
    proxy.initialize();
    //fix up the EPR with the resource ID
    EndpointReference epr = proxy.getEndpointReference();
    epr.addParameter(WsaConstants.DEFAULT_RESOURCE_ID_QNAME ,contribution.getIdentifier());
    manager.addResource(proxy.getEndpointReference(),proxy);
    return proxy;
  }
View Full Code Here

           
            //
            // create EPR for test resource
            //
            URI address = getLocalAddress(contextPath, port);
            EndpointReference epr = new EndpointReference(address);
           
            addReferenceParameter(epr);

            //
            // create proxy - turn on tracing of SOAP messages
            //
            WsResourceClient client = new WsResourceClient(epr);
            client.setTrace(tracing);
           
            ServiceGroupClient sg = new ServiceGroupClient(epr);
            sg.setTrace(tracing);
           
            WsResourceClient[] members = sg.getMembers();
           
            System.out.println("Addresses of each service group entry:\n");
           
            EndpointReference repr = null;
            EndpointReference sepr = null;
            EndpointReference curr = null;

            for (int n = 0; n < members.length; ++n){
              System.out.println(members[n].getEndpointReference());
            }
            for (int n = 0; n < members.length; ++n){
                System.out.println(members[n].getEndpointReference().getAddress());
                curr = members[n].getEndpointReference();
                if(curr.getAddress().toString().endsWith("OSGiBundleResource")){
                  String id = curr.getParameterString(new QName("http://ws.apache.org/muse/addressing", "ResourceId"));
                  if(repr == null && id != null && id.startsWith("dummy.bundle")){
                    repr = curr;
                  }
                }
                if(curr.getAddress().toString().endsWith("OSGiServiceResource")){
                  String id = curr.getParameterString(new QName("http://ws.apache.org/muse/addressing", "ResourceId"));
                  if(sepr == null && id != null && id.startsWith(("org.apache.muse.util.osgi.ResourceManagementImplementation"))){
                    sepr = curr;
                  }
                }
            }
           

            //Query bundle relationships
            epr = new EndpointReference(repr.getAddress());
           
            Element[] parms = repr.getParameters();
            for(int i=0;i<parms.length;i++){
              epr.addParameter(parms[i]);
            }
           
            WsResourceClient resource_client = new WsResourceClient(repr);
            resource_client.setTrace(tracing);
           
            resource_client.getResourcePropertyDocument();

            RelationshipsClient rc = new RelationshipsClient(epr);
            rc.setTrace(tracing);
            QName names[] = {
                new QName("http://resource.management.osgi/Bundle","Requires","osgi")
            };
            rc.queryRelationshipsByType(names);
           
            //Query service relationships
            epr = new EndpointReference(sepr.getAddress());
            parms = sepr.getParameters();
            for(int i=0;i<parms.length;i++){
              epr.addParameter(parms[i]);
            }
           
View Full Code Here

    }

    public void notify(NotificationMessage[] messages)
        throws SoapFault
    {
        EndpointReference epr = getProducerReference();
       
        for (int n = 0; n < messages.length; ++n)
            messages[n].setProducerReference(epr);
       
        Element notify = XmlUtils.createElement(WsnConstants.NOTIFY_QNAME);
View Full Code Here

        throws SoapFault
    {
        Element[] entries = getResourceProperty(WssgConstants.ENTRY_QNAME);
        WsResourceClient[] clients = new WsResourceClient[entries.length];
       
        EndpointReference src = getSource();
        EndpointReference dest = null;
       
        for (int n = 0; n < entries.length; ++n)
        {
            //
            // convert ws-sg entry XML -> EPRs -> clients
            //
            Element eprXML = XmlUtils.getElement(entries[n], WssgConstants.MEMBER_SERVICE_EPR_QNAME);
            dest = new EndpointReference(eprXML);
            clients[n] = new WsResourceClient(dest, src);           
        }
       
        return clients;       
    }
View Full Code Here

  private Logger _logger = Logger.getLogger(ResourceInspector.class.getPackage().getName());
   
    private Object createBaseProxy(WsResourceClient resource)
        throws Exception
    {
        EndpointReference src = resource.getSource();
        EndpointReference dest = resource.getDestination();
       
        Class[] paramTypes = new Class[]{
                EndpointReference.class, EndpointReference.class
        };
        Constructor ctor = getBaseProxyClass().getConstructor(paramTypes);
View Full Code Here

   
    public synchronized void addSubscription(WsResource sub)
    {
        SubscriptionManager subMgr =
            (SubscriptionManager)sub.getCapability(WsnConstants.SUBSCRIPTION_MGR_URI);
        EndpointReference epr = sub.getEndpointReference();
        _subscriptionsByEPR.put(epr, subMgr);
    }
View Full Code Here

        // use the subscription capability to set all the subscription fields
        //
        SubscriptionManager subMgr =
            (SubscriptionManager)sub.getCapability(WsnConstants.SUBSCRIPTION_MGR_URI);
       
        EndpointReference producerEPR = producer.getEndpointReference();
        subMgr.setProducerReference(producerEPR);
       
        subMgr.setConsumerReference(consumer);
        subMgr.setFilter(filter);
        subMgr.setSubscriptionPolicy(policy);
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.addressing.EndpointReference

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.