Examples of EndpointReferenceType


Examples of org.opensaml.ws.wsaddressing.EndpointReferenceType

public class EndpointReferenceTypeUnmarshaller extends AbstractWSAddressingObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
        throws UnmarshallingException {
        EndpointReferenceType epr = (EndpointReferenceType) parentXMLObject;
        if (childXMLObject instanceof Address) {
            epr.setAddress((Address) childXMLObject);
        } else if (childXMLObject instanceof Metadata) {
            epr.setMetadata((Metadata) childXMLObject);
        } else if (childXMLObject instanceof ReferenceParameters) {
            epr.setReferenceParameters((ReferenceParameters) childXMLObject);
        } else {
            epr.getUnknownXMLObjects().add(childXMLObject);
        }
    }
View Full Code Here

Examples of org.picketlink.identity.federation.ws.addressing.EndpointReferenceType

        if (tokenType != null) {
            writeTokenType(writer, tokenType);
        }

        // Deal with Issuer
        EndpointReferenceType endpoint = requestToken.getIssuer();
        if (endpoint != null) {
            StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ISSUER, BASE_NAMESPACE);
            StaxUtil.writeStartElement(writer, WSAddressingConstants.WSA_PREFIX, WSAddressingConstants.ADDRESS,
                    WSAddressingConstants.WSA_NS);
            StaxUtil.writeCharacters(writer, endpoint.getAddress().getValue());
            StaxUtil.writeEndElement(writer);
            StaxUtil.writeEndElement(writer);
        }

        // deal with the token lifetime.
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType

        XMLStreamHelper.writeEndElement(WS_ADDRESSING_QNAME, contentHandler);
        contentHandler.endDocument();

        XmlObject object = buffer.getObject();
        if (object instanceof EndpointReferenceType) {
            EndpointReferenceType endpointReference = (EndpointReferenceType) object;
            System.out.println("Parsed endpoint reference: " + endpointReference);
            AddressingContext.setCurrentContext(null);
        }
        else {
            AddressingContext.setCurrentContext(null);
View Full Code Here

Examples of org.talend.esb.servicelocator.client.ws.addressing.EndpointReferenceType

    @Override
    public void writeEndpointReferenceTo(Result result, PropertiesTransformer transformer)
        throws ServiceLocatorException {

        EndpointReferenceType epr = createEndpointReference(transformer);
        try {
            JAXBElement<EndpointReferenceType> ep =
                WSA_OBJECT_FACTORY.createEndpointReference(epr);
            JAXBContext jc =  getContext();
            jc.createMarshaller().marshal(ep, result);
View Full Code Here

Examples of org.w3._2005._08.addressing.EndpointReferenceType

    }

    protected abstract String createAddress();

    public static EndpointReferenceType createEndpointReference(String address) {
        EndpointReferenceType epr = new EndpointReferenceType();
        AttributedURIType addressUri = new AttributedURIType();
        addressUri.setValue(address);
        epr.setAddress(addressUri);
        return epr;
    }
View Full Code Here

Examples of org.w3.x2005.x08.addressing.EndpointReferenceType

      throws GFacProviderException {
    UnicoreHostType host = (UnicoreHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType();
       
        String factoryUrl = host.getUnicoreHostAddressArray()[0];

        EndpointReferenceType eprt = EndpointReferenceType.Factory.newInstance();
        eprt.addNewAddress().setStringValue(factoryUrl);

        CreateActivityDocument cad = CreateActivityDocument.Factory
                .newInstance();
       
        try {
      cad.addNewCreateActivity().addNewActivityDocument()
              .setJobDefinition(JSDLGenerator.buildJSDLInstance(jobExecutionContext).getJobDefinition());
    } catch (Exception e1) {
      throw new GFacProviderException("Cannot generate JSDL instance from the JobExecutionContext.",e1);
    }
       
        FactoryClient factory = null;
        try {
            factory = new FactoryClient(eprt, secProperties);
        } catch (Exception e) {
            throw new GFacProviderException("");
        }
        CreateActivityResponseDocument response = null;
        try {
            log.info(String.format("Activity Submitting to %s ... \n", factoryUrl));
            response = factory.createActivity(cad);
            log.info(String.format("Activity Submitted to %s \n", factoryUrl));
        } catch (Exception e) {
          e.printStackTrace();
            throw new GFacProviderException("Cannot create activity.", e);
        }
        EndpointReferenceType activityEpr = response
                .getCreateActivityResponse().getActivityIdentifier();
       
        log.debug("Activity EPR: "+activityEpr);
       
        log.info("Activity: "+activityEpr.getAddress().getStringValue()" Submitted.");
       
        //factory.waitWhileActivityIsDone(activityEpr, 1000);
        jobId = WSUtilities.extractResourceID(activityEpr);
        if (jobId == null) {
            jobId = new Long(Calendar.getInstance().getTimeInMillis())
                    .toString();
        }
       
        log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(), factory.getActivityStatus(activityEpr)
                .toString()));
       
       
        //TODO publish the status messages to the message bus
        while ((factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FINISHED) &&
                (factory.getActivityStatus(activityEpr) != ActivityStateEnumeration.FAILED)){
         
            ActivityStatusType activityStatus = null;
        try {
          activityStatus = getStatus(factory, activityEpr);
          log.info (subStatusAsString(activityStatus));
        } catch (UnknownActivityIdentifierFault e) {
          throw new GFacProviderException(e.getMessage(), e.getCause());
        }
 
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
            }
            continue;
        }
       
        ActivityStatusType activityStatus = null;
    try {
      activityStatus = getStatus(factory, activityEpr);
    } catch (UnknownActivityIdentifierFault e) {
      throw new GFacProviderException(e.getMessage(), e.getCause());
    }
       
        log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(), activityStatus.getState().toString()));
       
    if ((activityStatus.getState() == ActivityStateEnumeration.FAILED)) {
        log.info(activityStatus.getFault().getFaultcode().getLocalPart()
            + "\n" + activityStatus.getFault().getFaultstring());
        log.info("EXITCODE: "+activityStatus.getExitCode());
View Full Code Here

Examples of org.wso2.carbon.event.client.stub.generated.addressing.EndpointReferenceType

            if (!topic.startsWith("/")){
               topic = "/" + topic;
            }
            EventBrokerServiceStub service = new EventBrokerServiceStub(configurationContext, brokerUrl + topic);
            configureCookie(service._getServiceClient());
            EndpointReferenceType epr = new EndpointReferenceType();
            epr.setAddress(createURI(eventSinkUrl));
           
            DeliveryType deliveryType = new DeliveryType();
            EndpointReferenceType eventSink = new EndpointReferenceType();
            eventSink.setAddress(createURI(eventSinkUrl));
            deliveryType.setNotifyTo(eventSink);

           
            ExpirationType expirationType = null;
            if(expirationTime > 0){
View Full Code Here

Examples of org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType

            QueryExpressionType selector,
            @WebParam(name = "SubscriptionPolicy", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            Object subscriptionPolicy,
            @WebParam(name = "InitialTerminationTime", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            XMLGregorianCalendar terminationTime) throws ResourceUnknownFault, SubscribeCreationFailedFault {
      EndpointReferenceType ref = new EndpointReferenceType();
      ServiceNameType sn = new ServiceNameType();
      sn.setPortName("myPort");
      ref.setServiceName(sn);
      return ref;
    }
View Full Code Here

Examples of org.xmlsoap.schemas.ws._2004._08.addressing.EndpointReferenceType

    protected boolean specifyExpires = false;

    public void testCreateAndTerminateSequence() throws Exception {
        CreateSequenceType createArguments = new CreateSequenceType();

        EndpointReferenceType reference = new EndpointReferenceType();
        reference.setAddress(new AttributedURI());
        reference.getAddress().setValue("http://localhost/test/" + getClass().getName() + "/" + getName());
        createArguments.setAcksTo(reference);

        if (specifyExpires) {
            Expires expires = new Expires();
            createArguments.setExpires(expires);
View Full Code Here

Examples of org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType

    * @throws Exception DOCUMENT_ME
    */
   public void testBuildingNotificationMessages(  )
   throws Exception
   {
      EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance(  );
      AttributedURI         uri = AttributedURI.Factory.newInstance(  );
      uri.setStringValue( "http://consumer" );
      epr1.setAddress( uri );
      EndpointReference       epr           = new XmlBeansEndpointReference( epr1 );
      TopicExpressionDocument topicExprType = null;
      try
      {
         topicExprType =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.