Package javax.xml.ws.wsaddressing

Examples of javax.xml.ws.wsaddressing.W3CEndpointReference$AttributedURIType


        updateAddressPort(factory, PORT);
       
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        W3CEndpointReference numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        ClientProxy.getClient(num).getConduit().close();
       
        W3CEndpointReference numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
       
        ClientProxy.getClient(num).getConduit().close();
        ClientProxy.getClient(factory).getConduit().close();
View Full Code Here


       

        // use values >= 30 to create JMS eprs - see NumberFactoryImpl.create
       
        // verify it is JMS, 999 for JMS will throw a fault
        W3CEndpointReference ref = factory.create("999");
        String s = NumberService.WSDL_LOCATION.toString();
        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(), s);
        NumberService numService = new NumberService();

        assertNotNull("reference", ref);
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

    @org.junit.Test
    public void testCreateW3CEpr() throws Exception {
        QName serviceName = new QName("http://cxf.apache.org", "ServiceName");
        QName portName = new QName("http://cxf.apache.org", "PortName");
        ProviderImpl impl = new ProviderImpl();
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference("http://myaddress", serviceName,
                                                                      portName, null, "wsdlLoc",
                                                                      null);
       
        java.io.StringWriter sw = new java.io.StringWriter();
        StreamResult result = new StreamResult(sw);
        w3Epr.writeTo(result);
        String expected = "<wsdl:definitions";
        assertTrue("Embeded wsdl element is not generated", sw.toString().indexOf(expected) > -1);
        assertTrue("wsdlLocation attribute has the wrong value",
                   sw.toString().contains("wsdli:wsdlLocation=\"http://cxf.apache.org wsdlLoc\""));
    }
View Full Code Here

    }

    @org.junit.Test
    public void testCreateW3CEprNoMetadata() throws Exception {
        ProviderImpl impl = new ProviderImpl();
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
                         "http://myaddress", null, 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"));
        assertFalse("empty Metadata element should be dropped", sw.toString().contains("Metadata"));
    }
View Full Code Here

    }
   
    @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

        ProviderImpl impl = new ProviderImpl();
        DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        Element element = builder.newDocument().createElement("customMetadata");
        List<Element> metadata = new ArrayList<Element>();
        metadata.add(element);
        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
                         "http://myaddress", null, null,
                         metadata, 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("Custom Metadata element expected", sw.toString().contains("customMetadata"));
        assertFalse("Interface element unexpected", sw.toString().contains("Interface"));
        assertFalse("ServiceName unexpected", sw.toString().contains("ServiceName"));
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

TOP

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

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.