Package org.talend.esb.servicelocator.client.ws.addressing

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


        }
    }

    @Override
    public void addEndpointReference(Node parent) throws ServiceLocatorException {
        EndpointReferenceType wsAddr = createEndpointReference(null);

        try {
            JAXBElement<EndpointReferenceType> ep =
                WSA_OBJECT_FACTORY.createEndpointReference(wsAddr);
            JAXBContext jc = getContext();
View Full Code Here

    }

    private EndpointReferenceType createEndpointReference(PropertiesTransformer transformer) {
        AttributedURIType endpoint = new AttributedURIType();
        endpoint.setValue(addr);
        EndpointReferenceType epr = new EndpointReferenceType();
        epr.setAddress(endpoint);
        if (props != null) {
            DOMResult result = new DOMResult();
            transformer.writePropertiesTo(props, result);
            Document docResult = (Document)result.getNode();
            MetadataType metadata = new MetadataType();
            epr.setMetadata(metadata);
           
            metadata.getAny().add(docResult.getDocumentElement());
        }
        return epr;
    }
View Full Code Here

    private final boolean isLive;

    public SLEndpointProvider(QName serviceName, EndpointDataType endpointData, boolean live) {
        super(serviceName, null, extractBinding(endpointData), extractTransport(endpointData), null);
        EndpointReferenceType epr = toEndPointReference((Element) endpointData.getEndpointReference());

        init(extractAddress(epr),
                extractProperties(epr));

        lastTimeStarted = endpointData.getLastTimeStarted();
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private EndpointReferenceType toEndPointReference(Element root) {

        EndpointReferenceType epr = null;
        if (root != null) {
            try {
                JAXBContext jc = JaxbContextHandler.getAddressingContext();
                JAXBElement<EndpointReferenceType> eprElem =
                    (JAXBElement<EndpointReferenceType>) jc.createUnmarshaller().unmarshal(root);
                epr = eprElem.getValue();
            } catch (JAXBException e) {
                if (LOG.isLoggable(Level.SEVERE)) {
                    LOG.log(Level.SEVERE,
                            "Failed to deserialize endpoint reference", e);
                }
            }
        } else {
            LOG.log(Level.SEVERE, "No endpoint reference found in content");
        }
        return epr != null ? epr : new EndpointReferenceType();
    }
View Full Code Here

TOP

Related Classes of org.talend.esb.servicelocator.client.ws.addressing.EndpointReferenceType

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.