Package javax.xml.ws

Examples of javax.xml.ws.WebServiceClient


        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(ClientMetadataGeneratedService.class, dbcInServiceDesc.getCorrespondingClass());
        // There is WebServiceClient on the generated Service and it wasn't overriden in the composite
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNotNull(wsClient);
        assertEquals(originalWsdl, wsClient.wsdlLocation());
        assertEquals("originalTNS", wsClient.targetNamespace());
        assertEquals("", wsClient.name());
       
        // No WSDL override specified in the composite, so generated Service should use the annotation value
        assertTrue("Wrong WSDL Used", validatePort(service, originalWsdl_portLocalPart));

    }
View Full Code Here


        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(ClientMetadataGeneratedService.class, dbcInServiceDesc.getCorrespondingClass());
        // There is WebServiceClient on the generated Service and it wasn't overriden in the composite
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNotNull(wsClient);
        assertEquals(originalWsdl, wsClient.wsdlLocation());
        assertEquals("originalTNS", wsClient.targetNamespace());
        assertEquals("", wsClient.name());

        // WSDL was specified on the generated Service constructor, and none in the composite
        // so should get the WSDL specified on the constructor
        assertTrue("Wrong WSDL used", validatePort(service, otherWsdl_portLocalPart));
    }
View Full Code Here

        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(Service.class, dbcInServiceDesc.getCorrespondingClass());
        // This is a generic Service with overrides, there will be WebServiceClient annotation
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNull(wsClient);
        wsClient = dbcInServiceDesc.getWebServiceClientAnnot(serviceDelegate);
        assertNotNull(wsClient);
        assertEquals(getWsdlLocation(overridenWsdl), wsClient.wsdlLocation());
        assertNull(wsClient.targetNamespace());
        assertNull(wsClient.name());
       
        // WSDL override specified in the composite
        assertTrue("Wrong WSDL used", validatePort(service, overridenWsdl_portLocalPart));
    }
View Full Code Here

        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(Service.class, dbcInServiceDesc.getCorrespondingClass());
        // The target namespace for the key should be overriden; it should not be overriden for
        // no key.
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNull(wsClient);
       
        WebServiceClient wsClientKeyed = dbcInServiceDesc.getWebServiceClientAnnot(serviceDelegate);
        assertNotNull(wsClientKeyed);
        assertNull(wsClientKeyed.wsdlLocation());
        assertEquals("overrideTNS", wsClientKeyed.targetNamespace());
        assertNull(wsClientKeyed.name());

    }
View Full Code Here

   
    URL getSparseCompositeWsdlURL(DescriptionBuilderComposite sparseComposite) {
        // Use the WSDL file if it is specified in the composite
        URL url = null;
        if (sparseComposite != null) {
            WebServiceClient wsc = (WebServiceClient) sparseComposite.getWebServiceClientAnnot();
            if (wsc != null && wsc.wsdlLocation() != null) {
                String wsdlLocation = wsc.wsdlLocation();
                URL wsdlUrl = getWSDLURL(wsdlLocation);
               
                if (wsdlUrl == null) {
                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr4", wsdlLocation));
                } else {
View Full Code Here

        processor.setContext(env);
        processor.execute();

        Class clz = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://cxf.apache.org/w2j/hello_world_soap_http/service",
                     webServiceClient.targetNamespace());
        File file = new File(output,
                             "org/apache/cxf/w2j/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
View Full Code Here

           
            String address1 = "http://localhost:" + PORT1 + "/SoapExtHeader/SampleService";
            JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
            sf.setServiceClass(SamplePortTypeImpl.class);
           
            WebServiceClient webService = SampleService.class.getAnnotation(WebServiceClient.class);
            sf.setServiceName(new QName(webService.targetNamespace(), webService.name()));
            sf.setWsdlLocation(webService.wsdlLocation());
            sf.setAddress(address1);

            extserver = sf.create();
        }
View Full Code Here

        processor.setContext(env);
        processor.execute();

        Class clz = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://cxf.apache.org/w2j/hello_world_soap_http/service",
                     webServiceClient.targetNamespace());
        File file = new File(output,
                             "org/apache/cxf/w2j/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
View Full Code Here

        processor.setContext(env);
        processor.execute();

        Class clz = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://cxf.apache.org/w2j/hello_world_soap_http/service",
                     webServiceClient.targetNamespace());
        File file = new File(output,
                             "org/apache/cxf/w2j/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
View Full Code Here

        DescriptionBuilderComposite svcDescComposite = svcDescImpl.getDescriptionBuilderComposite();
        assertNotNull(svcDescComposite);
        assertNotSame(composite, svcDescComposite);
        assertSame(composite, svcDescComposite.getSparseComposite(compositeKey));
       
        WebServiceClient wsClient = svcDescComposite.getWebServiceClientAnnot();
        assertNotNull(wsClient);
        assertEquals("originalWsdlLocation", wsClient.wsdlLocation());
        assertEquals("originalTNS", wsClient.targetNamespace());
        // We're testing the composite, not the metadata layer, so none of the defaulting logic
        // is exercised.
        assertEquals("", wsClient.name());
       
    }
View Full Code Here

TOP

Related Classes of javax.xml.ws.WebServiceClient

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.