Package javax.xml.ws.wsaddressing

Examples of javax.xml.ws.wsaddressing.W3CEndpointReference


        ReceiverComponent receiver = new ReceiverComponent();
        receiver.setService(new QName("receiver"));
        receiver.setEndpoint("endpoint");
        jbi.activateComponent(new ActivationSpec("receiver", receiver));

        W3CEndpointReference epr = AbstractWSAClient.createWSA("http://localhost:8192/Receiver/?http.soap=true");
        wsnBroker.subscribe(epr, "myTopic", null);
        wsnBroker.notify("myTopic", parse("<hello>world</hello>"));

        receiver.getMessageList().assertMessagesReceived(1);
    }
View Full Code Here


            QName wsaEpr = new QName(Names.WSA_NAMESPACE_NAME, "EndpointReference");
            while (extensionElements.hasNext()) {
                ExtensibilityElement ext = extensionElements.next();
                if (ext instanceof UnknownExtensibilityElement && wsaEpr.equals(ext.getElementType())) {
                    DOMSource domSource = new DOMSource(((UnknownExtensibilityElement)ext).getElement());
                    W3CEndpointReference w3cEPR = new W3CEndpointReference(domSource);
                    EndpointReferenceType ref = ProviderImpl.convertToInternal(w3cEPR);
                    endpoint.getTarget().setMetadata(ref.getMetadata());
                    endpoint.getTarget().setReferenceParameters(ref.getReferenceParameters());
                    endpoint.getTarget().getOtherAttributes().putAll(ref.getOtherAttributes());
                }
View Full Code Here

        private ResolveMatchesType handleResolve(ResolveType resolve) {
            ResolveMatchType rmt = new ResolveMatchType();
            EndpointReference ref = resolve.getEndpointReference();
            EndpointReferenceType iref = ProviderImpl.convertToInternal(ref);
            for (HelloType hello : registered) {
                W3CEndpointReference r = hello.getEndpointReference();
                if (matches(iref, r)) {
                    rmt.setEndpointReference(r);
                    rmt.setScopes(hello.getScopes());
                    rmt.getTypes().addAll(hello.getTypes());
                    rmt.getXAddrs().addAll(hello.getXAddrs());
View Full Code Here

                }
            }
            pmts = c.probe(pt);
            System.out.println("3");

            W3CEndpointReference ref = null;
            if  (pmts != null) {
                for (ProbeMatchType pmt : pmts.getProbeMatch()) {
                    ref = pmt.getEndpointReference();
                    System.out.println("Found " + pmt.getEndpointReference());
                    System.out.println(pmt.getTypes());
View Full Code Here

        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        builder.address("http://localhost:" + greeterPort + "/SOAPDispatchService/SoapDispatchPort");
        builder.serviceName(SERVICE_NAME);
        builder.endpointName(PORT_NAME);
        W3CEndpointReference w3cEpr = builder.build();
        Dispatch<SOAPMessage> disp = service.createDispatch(w3cEpr, SOAPMessage.class, Service.Mode.MESSAGE);
        InputStream is = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq.xml");
        SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is);
        assertNotNull(soapReqMsg);
        SOAPMessage soapResMsg = disp.invoke(soapReqMsg);
View Full Code Here

    @Override
    public LookupEndpointResponse lookupEndpoint(LookupRequestType parameters)
            throws ServiceLocatorFault, InterruptedExceptionFault {

        W3CEndpointReference epr = lookupEndpoint(parameters.getServiceName(),
                parameters.getMatcherData());
        LookupEndpointResponse response = new LookupEndpointResponse();
        response.setEndpointReference(epr);
        return response;
    }
View Full Code Here

        .concat(";param=")
        .concat(URLEncoder.encode(key.concat(",").concat(value),
            "UTF-8")));
    wc.accept(MediaType.APPLICATION_XML);
    try {
      W3CEndpointReference w3cEndpointReference = wc
          .get(W3CEndpointReference.class);
      System.out.println(w3cEndpointReference.toString());
    } catch (WebApplicationException ex) {
      System.out.println(ex.getMessage());
    }
  }
View Full Code Here

        LookupRequestType request = new LookupRequestType();
        request.setServiceName(new QName("http://talend.org/esb/examples/",
                "GreeterService"));

        LookupEndpointResponse response = client.lookupEndpoint(request);
        W3CEndpointReference endpointReference = response
                .getEndpointReference();
        System.out.println(endpointReference.toString());

        javax.xml.ws.Service jaxwsServiceObject = Service.create(new QName(
                "http://talend.org/esb/examples/", "GreeterService"));

        Greeter greeterProxy = jaxwsServiceObject.getPort(endpointReference,
View Full Code Here

                endpoint);
        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(sl.getEndpoint(SERVICE_NAME, ENDPOINTURL)).andStubReturn(
                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

TOP

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

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.