Package org.apache.ws.addressing

Examples of org.apache.ws.addressing.EndpointReference


             //m_serverResource = (IntegrationserverResource)createInstance(aKey);
             m_serverResource = new IntegrationserverResource(aKey, createParams );
             //The EPRs should be build using "http://schemas.xmlsoap.org/ws/2003/03/addressing" addressing namespace. It introduces spec conflicts
         //To work around thes problem the "http://schemas.xmlsoap.org/ws/2004/08/addressing" is used as namespace for addressing
             //EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , aKey, SPEC_NAMESPACE_SET.getAddressingNamespace());
             EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , aKey, ExampleConstants.getAddressingNamespace());
            
              ((IntegrationserverResource)m_serverResource).setEndpointReference( epr );
              m_serverResource.init();
        add(aKey, m_serverResource);
          }
View Full Code Here


            if (id.equals("ipmi1") || id.equals("ipmi2"))
            {
                try
                {
                    resource = (IpmiserverResource)createInstance(key);
                    EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
                    resource.setEndpointReference(epr);                   
                }
                catch (Exception e)
                {
                    throw new ResourceException(e);
View Full Code Here

   throws CallbackFailedException
   {
      try
      {
         DiscoveryDocument disc = DiscoveryDocument.Factory.newInstance(  );
         EndpointReference epr = null;
         InitialContext    ctx = new InitialContext(  );

         prop.clear(  );
         ResourceadminHome aHome     = (ResourceadminHome) ( ctx.lookup( ResourceadminHome.HOME_LOCATION ) );
         Map               resources = aHome.getResources(  );
         Collection        values    = resources.values(  );
         Iterator          iter      = values.iterator(  );
         int               size      = values.size(  );

         // If there are the Resources registered to ResourceAdmin build array of their EPRs
         if ( size > 0 )
         {
            EndpointReferenceType[] eprs = new EndpointReferenceType[size];
            int                     i = 0;
            while ( iter.hasNext(  ) )
            {
               Object resource = iter.next(  );
               if ( resource instanceof ApplicationResource )
               {
                  ApplicationResource appResource = (ApplicationResource) resource;
                  epr = appResource.getEndpointReference(  );
                  System.out.println( "Application " + epr.toString(  ) );
               }
               else if ( resource instanceof HostResource )
               {
                  HostResource hostResource = (HostResource) resource;
                  epr = hostResource.getEndpointReference(  );
                  System.out.println( "Host " + epr.toString(  ) );
               }
               else if ( resource instanceof IntegrationserverResource )
               {
                  IntegrationserverResource integrationResource = (IntegrationserverResource) resource;
                  epr = integrationResource.getEndpointReference(  );
                  System.out.println( "Integration " + epr.toString(  ) );
               }
               else if ( resource instanceof BusinessprocesstypeResource )
               {
                  BusinessprocesstypeResource bpResource = (BusinessprocesstypeResource) resource;
                  epr = bpResource.getEndpointReference(  );
                  System.out.println( "BP " + epr.toString(  ) );
               }
               else
               {
                  throw new Exception( " unknown resource type" );
               }

               if ( ( epr != null ) && epr instanceof XmlBeansEndpointReference )
               {
                  XmlBeansEndpointReference eprType = (XmlBeansEndpointReference) epr;
                  XmlObject                 obj = eprType.getXmlObject(  );
                  if ( obj instanceof EndpointReferenceType )
                  {
                     eprs[i] = (EndpointReferenceType) obj;
                     i++;
                  }
                  else
                  {
                     System.out.println( "Exception " + epr.toString(  ) );
                     throw new Exception( "Expected type - EndpointReferenceType" + resource.toString(  ) );
                  }
               }
               else
               {
View Full Code Here

            m_adminResource = (ResourceadminResource) createInstance( null );

            //The EPRs should be build using "http://schemas.xmlsoap.org/ws/2003/03/addressing" addressing namespace. It introduces spec conflicts
            //To work around thes problem the "http://schemas.xmlsoap.org/ws/2004/08/addressing" is used as namespace for addressing
            //EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , null, SPEC_NAMESPACE_SET.getAddressingNamespace());
            EndpointReference epr =
               getEndpointReference( resourceContext.getBaseURL(  ) + "/" + getServiceName(  ).getLocalPart(  ),
                                     null,
                                     ExampleConstants.getAddressingNamespace(  ) );
            m_adminResource.setEndpointReference( epr );
            add( null, m_adminResource );
View Full Code Here

                    resource = (WeatherstationResource)createInstance(key);
                    FCCIDDocument fccidDocument = FCCIDDocument.Factory.newInstance();
                    //set the same value for both instances
                    fccidDocument.setFCCID(InteropConstants.FCCID);
                    ((WeatherstationResource) resource).setFCCID(fccidDocument);
                    EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
                    resource.setEndpointReference(epr);

                }
                catch (Exception e)
                {
View Full Code Here

            if (id.equals("bb1") || id.equals("bb2"))
            {
                try
                {
                    resource = (BlackberryResource)createInstance(key);
                    EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
                    resource.setEndpointReference(epr);
                }
                catch (Exception e)
                {
                    throw new ResourceException(e);
View Full Code Here

   public org.apache.ws.muse.example.resourceadmin.properties.CreateResponseDocument Create( org.apache.ws.muse.example.resourceadmin.properties.CreateDocument requestDoc )
   throws org.apache.ws.muse.example.resourceadmin.InvalidResourcePropertiesException,
          org.apache.ws.muse.example.resourceadmin.ResourceUnknownFaultException,
          org.apache.ws.muse.example.resourceadmin.CreateFaultException
   {
      EndpointReference                                                                         epr              =
         null;
      org.apache.ws.muse.example.resourceadmin.properties.CreateResponseDocument                responseDocument =
         org.apache.ws.muse.example.resourceadmin.properties.CreateResponseDocument.Factory.newInstance(  );
      org.apache.ws.muse.example.resourceadmin.properties.CreateResponseDocument.CreateResponse response         =
         responseDocument.addNewCreateResponse(  );
View Full Code Here

         resource = new BusinessprocesstypeResource( aKey, params );

         //The EPRs should be build using "http://schemas.xmlsoap.org/ws/2003/03/addressing" addressing namespace. It introduces spec conflicts
         //To work around thes problem the "http://schemas.xmlsoap.org/ws/2004/08/addressing" is used as namespace for addressing
         //EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , null, SPEC_NAMESPACE_SET.getAddressingNamespace());
         EndpointReference epr =
            getEndpointReference( resourceContext.getBaseURL(  ) + "/" + getServiceName(  ).getLocalPart(  ),
                                  aKey,
                                  ExampleConstants.getAddressingNamespace(  ) );
         ( (BusinessprocesstypeResource) resource ).setEndpointReference( epr );
         resource.init(  );
View Full Code Here

                                      byte[] base64Data,
                                      PrinterPortResource printerResource )
    {
        ++m_jobId;
        String jobId = "Job" + m_jobId;
        EndpointReference jobEpr = getEndpointReference( jobId );
        JobPortResource job = new JobPortResource( jobEpr, jobId, jobName, printerResource, origUserName );
        job.init();
        try
        {
            add( job );
View Full Code Here

                                      String jobName,
                                      PrinterPortResource printerResource )
    {
        ++m_jobId;
        String jobId = "Job" + m_jobId;
        EndpointReference jobEpr = getEndpointReference( jobId );
        JobPortResource job = new JobPortResource( jobEpr, jobId, jobName, printerResource );
        job.init();
        try
        {
            add( job );
View Full Code Here

TOP

Related Classes of org.apache.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.