Package javax.xml.ws.wsaddressing

Examples of javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder


                endpoint);
        expect(endpoint.getProperties()).andStubReturn(slPropertiesImpl);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);

        EndpointTransformerImpl transformer = new EndpointTransformerImpl();

        DOMResult result = new DOMResult();
        transformer.writePropertiesTo(slPropertiesImpl, result);
        Document docResult = (Document) result.getNode();

        builder.metadata(docResult.getDocumentElement());

        expectedRef = builder.build();

        endpointRef = lps.lookupEndpoint(SERVICE_NAME, null);

        assertTrue(endpointRef.toString().equals(expectedRef.toString()));
View Full Code Here


        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        LookupRequestType lrt = new LookupRequestType();
        lrt.setServiceName(SERVICE_NAME);
        LookupEndpointResponse ler = lps.lookupEndpoint(lrt);
        endpointRef = ler.getEndpointReference();
View Full Code Here

        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        LookupRequestType lrt = new LookupRequestType();
        lrt.setServiceName(SERVICE_NAME);
        LookupEndpointsResponse ler = lps.lookupEndpoints(lrt);
        endpointRef = ler.getEndpointReference().get(0);
View Full Code Here

        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();
        List<W3CEndpointReference> refs;

        refs = lps.lookupEndpoints(SERVICE_NAME, null);
        endpointRef = refs.get(0);
View Full Code Here

     * @param serviceName
     * @param adress
     * @return
     */
    private W3CEndpointReference buildEndpoint(QName serviceName, String adress) {
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(serviceName);
        builder.address(adress);
        SLEndpoint endpoint = null;
        try {
            endpoint = locatorClient.getEndpoint(serviceName, adress);
        } catch (ServiceLocatorException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        } catch (InterruptedException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        }
        if (endpoint != null) {
            SLProperties properties = endpoint.getProperties();
            if (properties != null && !properties.getPropertyNames().isEmpty()) {
                EndpointTransformerImpl transformer = new EndpointTransformerImpl();

                DOMResult result = new DOMResult();
                transformer.writePropertiesTo(properties, result);
                Document docResult = (Document) result.getNode();

                builder.metadata(docResult.getDocumentElement());
            }
        }
        return builder.build();
    }
View Full Code Here

     * @param adress
     * @return
     */
    private W3CEndpointReference buildEndpoint(QName serviceName, String adress)
            throws ServiceLocatorFault, InterruptedExceptionFault {
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(serviceName);
        builder.address(adress);
        SLEndpoint endpoint = null;
        try {
            endpoint = locatorClient.getEndpoint(serviceName, adress);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (endpoint != null) {
            SLProperties properties = endpoint.getProperties();
            if (properties != null && !properties.getPropertyNames().isEmpty()) {
                EndpointTransformerImpl transformer = new EndpointTransformerImpl();

                DOMResult result = new DOMResult();
                transformer.writePropertiesTo(properties, result);
                Document docResult = (Document) result.getNode();

                builder.metadata(docResult.getDocumentElement());
            }
        }
        return builder.build();
    }
View Full Code Here

        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        endpointRef = lps.lookupEndpoint(SERVICE_NAME, null);

        assertTrue(endpointRef.toString().equals(expectedRef.toString()));
View Full Code Here

        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        //builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        endpointRef = lps.lookupEndpoint(SERVICE_NAME.toString(),
                new ArrayList<String>());

       assertTrue(endpointRef.toString().equals(expectedRef.toString()));
View Full Code Here

                endpoint);
        expect(endpoint.getProperties()).andStubReturn(slPropertiesImpl);
        replayAll();

        W3CEndpointReference endpointRef, expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        // builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);

        EndpointTransformerImpl transformer = new EndpointTransformerImpl();

        DOMResult result = new DOMResult();
        transformer.writePropertiesTo(slPropertiesImpl, result);
        Document docResult = (Document) result.getNode();

        builder.metadata(docResult.getDocumentElement());

        expectedRef = builder.build();

        endpointRef = lps.lookupEndpoint(SERVICE_NAME.toString(), new ArrayList<String>());

        assertTrue(endpointRef.toString().equals(expectedRef.toString()));
View Full Code Here

        expect(endpoint.getProperties()).andStubReturn(
                SLPropertiesImpl.EMPTY_PROPERTIES);
        replayAll();

        W3CEndpointReference expectedRef;
        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        //builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        EndpointReferenceList erlt = lps.lookupEndpoints(
                SERVICE_NAME.toString(), new ArrayList<String>());
        if (erlt.getEndpointReference().get(0).equals(expectedRef))
            fail();
View Full Code Here

TOP

Related Classes of javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder

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.