Java 8 W3CEndpointReference - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 W3CEndpointReference class.

This code example shows how to use the following methods:
        } 
     
        NestedCallback callbackObject = new NestedCallback();
 
        Source source = EndpointReferenceUtils.convertToXML(ref);
        W3CEndpointReference  w3cEpr = new W3CEndpointReference(source);
         
         
        callbackObject.setCallback(w3cEpr);
        String resp = port.registerCallback(callbackObject);
 
        assertEquals("registerCallback called", resp);
             
    } 
     
     
} 
5
CodeRank
This code example shows how to use the following methods:toString
        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
         
        W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/1", "Number"));
        String eprString = epr.toString();
        assertTrue(eprString.contains("Metadata"));
        assertTrue(eprString.contains("wsdlLocation=\"http://service/1 wsdlLoc\""));
    } 
     
    @Test
    public void testLookupEndpointAndVerifyWsdlLocationOnly() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
        assertNotNull(wsdl);
 
        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
         
        W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/2", "Number"));
4
CodeRank
This code example shows how to use the following methods:toString
This code example shows how to use the following methods:toString
                "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,
                Greeter.class); 
        String reply = greeterProxy.greetMe("HI");
        System.out.println("Server said: " + reply);
 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getPort
    public String registerCallback(W3CEndpointReference callback) {
         
        try { 
 
            WebServiceFeature[] wfs = new WebServiceFeature[] {};
            CallbackPortType port = (CallbackPortType)callback.getPort(CallbackPortType.class, wfs);
 
            System.out.println("Invoking callback object");
            String resp = port.serverSayHi(System.getProperty("user.name"));
            System.out.println("Response from callback object: " + resp);
   
 
             
        } catch (Exception ex) {
            ex.printStackTrace();
            return null; 
        } 
         
        return "registerCallback called";      
    } 
4
CodeRank
This code example shows how to use the following methods:toString
                                     "</Metadata>" + 
                                     "<test:testElement1/>" + 
                                     "<test:testElement2/>" + 
                                 "</EndpointReference>"; 
             
            assertXMLEqual(expectedEPR, w3cEpr.toString());
        } finally { 
            XMLUnit.setIgnoreWhitespace(false); 
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:toString
    /** 
     * save the endpoint reference to the coordinator for this participant 
     */ 
    protected void saveEndpointReference(OutputObjectState oos) throws IOException {
        // the toString method will do what we need 
        oos.packString(endpoint.toString());
    } 
 
    /** 
     * restore the endpoint reference to the coordinator for this participant 
     */ 
    protected void restoreEndpointReference(InputObjectState ios) throws IOException {
        String endpointString = ios.unpackString();
        Source source = new StreamSource(new StringReader(endpointString));
        endpoint = new W3CEndpointReference(source);
    } 
 
    /** 
     * create a participant engine to manage commit or rollback processing for the 
     * participant and install it in the active participants table 
4
CodeRank
This code example shows how to use the following methods:toString
    /** 
     * save the endpoint reference to the coordinator for this participant 
     */ 
    protected void saveEndpointReference(OutputObjectState oos) throws IOException {
        // the toString method will do what we need 
        oos.packString(endpoint.toString());
    } 
 
    /** 
     * restore the endpoint reference to the coordinator for this participant 
     */ 
    protected void restoreEndpointReference(InputObjectState ios) throws IOException {
        String endpointString = ios.unpackString();
        Source source = new StreamSource(new StringReader(endpointString));
        endpoint = new W3CEndpointReference(source);
    } 
 
    /** 
     * create a participant engine to manage commit or rollback processing for the 
     * participant and install it in the active participants table 
4
CodeRank
This code example shows how to use the following methods:writeTo
        } 
    } 
 
    public String getWSAAddress(W3CEndpointReference ref) {
        Element element = DOMUtils.createDocument().createElement("elem");
        ref.writeTo(new DOMResult(element));
        NodeList nl = element.getElementsByTagNameNS("http://www.w3.org/2005/08/addressing", "Address");
        if (nl != null && nl.getLength() > 0) {
            Element e = (Element) nl.item(0);
            return DOMUtils.getContent(e).trim();
        } 
        return null; 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:
        } 
        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReferenceWithId(NUMBER_SERVICE_QNAME,
                                                                                      portName, id,
                                                                                      bus);
        Source source = EndpointReferenceUtils.convertToXML(epr);
        return new W3CEndpointReference(source);
    } 
 
    protected synchronized EndpointReferenceType manageNumberServantInitialisation() { 
        if (null == templateEpr) {
            initDefaultServant(); 
        } 
        return templateEpr;
    } 
    protected String getServantAddressRoot() {
        return "http://localhost:" + port + "/NumberService/NumberPort/";
    } 
    protected void initDefaultServant() { 
 
        servant = new NumberImpl();
4
CodeRank
See Code Examples for Java 8 W3CEndpointReference Methods: