Package javax.xml.ws

Examples of javax.xml.ws.WebServiceClient.targetNamespace()


        // There is WebServiceClient on the generated Service and it was overriden in the composite
        // for the key.  The annotation with no key should be unchanged.
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNotNull(wsClient);
        assertEquals(originalWsdl, wsClient.wsdlLocation());
        assertEquals("originalTNS", wsClient.targetNamespace());
        assertEquals("", wsClient.name());

        WebServiceClient wsClientKeyed = dbcInServiceDesc.getWebServiceClientAnnot(serviceDelegate);
        assertNotSame(wsClient, wsClientKeyed);
        assertEquals(fullWsdlLocation, wsClientKeyed.wsdlLocation());
View Full Code Here


        assertEquals("", wsClient.name());

        WebServiceClient wsClientKeyed = dbcInServiceDesc.getWebServiceClientAnnot(serviceDelegate);
        assertNotSame(wsClient, wsClientKeyed);
        assertEquals(fullWsdlLocation, wsClientKeyed.wsdlLocation());
        assertEquals("originalTNS", wsClientKeyed.targetNamespace());
        assertEquals("", wsClientKeyed.name());

        // WSDL override specified in the composite
        assertTrue("Wrong WSDL used", validatePort(service, overridenWsdl_portLocalPart));
    }
View Full Code Here

        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

        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.execute();

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

         {
            Class serviceClass = loader.loadClass(serviceImplClass);
            if (serviceClass.getAnnotation(WebServiceClient.class) != null)
            {
               WebServiceClient clientDecl = (WebServiceClient)serviceClass.getAnnotation(WebServiceClient.class);
               serviceRef.setServiceQName(new QName(clientDecl.targetNamespace(), clientDecl.name()));
            }
         }
         catch (ClassNotFoundException e)
         {
            WSFException.rethrow("Cannot extract service QName for target service", e);
View Full Code Here

         {
            Class serviceClass = loader.loadClass(serviceImplClass);
            if (serviceClass.getAnnotation(WebServiceClient.class) != null)
            {
               WebServiceClient clientDecl = (WebServiceClient)serviceClass.getAnnotation(WebServiceClient.class);
               serviceRef.setServiceQName(new QName(clientDecl.targetNamespace(), clientDecl.name()));
            }
         }
         catch (ClassNotFoundException e)
         {
            WSFException.rethrow("Cannot extract service QName for target service", e);
View Full Code Here

                WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class);
                if(wsc==null)
                    throw new WebServiceException("Service Interface Annotations required, exiting...");

                String name = wsc.name();
                String tns = wsc.targetNamespace();
                serviceQName = new QName(tns, name);
                try {
                    wsdlLocation = JAXWSUtils.getFileOrURL(wsc.wsdlLocation());
                } catch (IOException e) {
                    // TODO: report a reasonable error message
View Full Code Here

        processor.execute();

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

        if (webServiceProvider != null) {
            return getServiceQName(clazz, webServiceProvider.targetNamespace(), webServiceProvider.serviceName());
        }
        WebServiceClient webServiceClient = clazz.getAnnotation(WebServiceClient.class);
        if (webServiceClient != null) {
            return getServiceQName(clazz, webServiceClient.targetNamespace(), webServiceClient.name());
        }
        throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
    }

    private static QName getPortQName(Class<?> clazz, String namespace, String name, String portName) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.