Package javax.xml.ws.wsaddressing

Examples of javax.xml.ws.wsaddressing.W3CEndpointReference


    }
   
    @org.junit.Test
    public void testCreateW3CEprNoMetadataEmptyCustomMetadata() throws Exception {
        ProviderImpl impl = new ProviderImpl();
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
            "http://myaddress", null, null, new ArrayList<Element>(), null, null);
       
        java.io.StringWriter sw = new java.io.StringWriter();
        StreamResult result = new StreamResult(sw);
        w3Epr.writeTo(result);
        assertTrue("Address is expected", sw.toString().contains("Address"));
        assertFalse("empty Metadata element should be dropped", sw.toString().contains("Metadata"));
    }
View Full Code Here


   
    @org.junit.Test
    public void testCreateW3CEprMetadataInterfaceNameOnly() throws Exception {
        QName serviceName = new QName("http://cxf.apache.org", "IntfName");
        ProviderImpl impl = new ProviderImpl();
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
                         "http://myaddress", serviceName, null, null, null, null, null, null, null);
       
        java.io.StringWriter sw = new java.io.StringWriter();
        StreamResult result = new StreamResult(sw);
        w3Epr.writeTo(result);
        assertTrue("Address is expected", sw.toString().contains("Address"));
        assertTrue("Metadata element expected", sw.toString().contains("Metadata"));
        assertTrue("Interface element expected", sw.toString().contains("Interface"));
        assertFalse("ServiceName is unexpected", sw.toString().contains("ServiceName"));
    }
View Full Code Here

   
    @org.junit.Test
    public void testCreateW3CEprMetadataServiceNameOnly() throws Exception {
        QName serviceName = new QName("http://cxf.apache.org", "ServiceName");
        ProviderImpl impl = new ProviderImpl();
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
                         "http://myaddress", null, serviceName, null, null, null, null, null, null);
       
        java.io.StringWriter sw = new java.io.StringWriter();
        StreamResult result = new StreamResult(sw);
        w3Epr.writeTo(result);
        assertTrue("Address is expected", sw.toString().contains("Address"));
        assertTrue("Metadata element expected", sw.toString().contains("Metadata"));
        assertFalse("Interface element unexpected", sw.toString().contains("Interface"));
        assertTrue("ServiceName is expected", sw.toString().contains("ServiceName"));
    }
View Full Code Here

    }
   
    public W3CEndpointReference createAccount(String accountName) {
        System.out.println("[Bank] Called createAccount( " + accountName + " )...");
        System.out.println();
        W3CEndpointReference ref = null;
        ref = createAccountReference(accountName);
        if (ref != null) {
            accountList.put(accountName, ref);
        }
        return ref;
View Full Code Here

    }

    public W3CEndpointReference createEprAccount(String accountName) {
        System.out.println("[Bank] Called createEprAccount( " + accountName + " )...");
        System.out.println();
        W3CEndpointReference ref = createAccountReference(accountName);
        if (ref != null) {
            accountList.put(accountName, ref);
        }
        return ref;
    }
View Full Code Here

        handleNotify(notify);
    }

    protected void handleNotify(Notify notify) {
        for (NotificationMessageHolderType messageHolder : notify.getNotificationMessage()) {
            W3CEndpointReference producerReference = messageHolder.getProducerReference();
            AbstractPublisher publisher = getPublisher(producerReference);
            if (publisher != null) {
                publisher.notify(messageHolder);
            }
        }
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory bf = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
       
        // Create the JAX-B object... a W3CEndpointReference
        W3CEndpointReference obj = w3cEPR;
      
       
        // Create the JAXBContext
        Class[] classes = new Class[] {W3CEndpointReference.class};
        //JAXBContext jaxbContext = JAXBContext.newInstance(classes);
View Full Code Here

        String addressingNamespace =
          EndpointReferenceUtils.getAddressingNamespace(W3CEndpointReference.class);     
        org.apache.axis2.addressing.EndpointReference axis2EPR =
          EndpointReferenceUtils.createAxis2EndpointReference(address, serviceName, portName, wsdlDocumentLocation, addressingNamespace);
       
        W3CEndpointReference w3cEPR = null;
       
        try {
            if (metadata != null)
                EndpointReferenceUtils.addMetadata(axis2EPR, metadata.toArray(ZERO_LENGTH_ARRAY));
         
View Full Code Here

        handleNotify(notify);
    }

    protected void handleNotify(Notify notify) {
        for (NotificationMessageHolderType messageHolder : notify.getNotificationMessage()) {
            W3CEndpointReference producerReference = messageHolder.getProducerReference();
            AbstractPublisher publisher = getPublisher(producerReference);
            if (publisher != null) {
                publisher.notify(messageHolder);
            }
        }
View Full Code Here

           
            System.out.println("Size:" + pmts.getProbeMatch().size());
           
            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

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.