Examples of WSDLManager


Examples of org.objectweb.celtix.wsdl.WSDLManager

        assertNotNull("Could not find WSDL", url);
        QName serviceName = new QName("http://tempuri.org/", "PingService");
        String portName = "WSHttpBinding_IPing";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

        URL url = getClass().getResource("resources/hello_world_rmassertion.wsdl");
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService1");
        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

        URL url = getClass().getResource("resources/hello_world_rmassertion.wsdl");
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService2");
        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

        URL url = getClass().getResource("resources/hello_world_rmassertion.wsdl");
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService3");
        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

   
    public String registerCallback(EndpointReferenceType callback) {
       
        try {
            Bus bus = Bus.init();
            WSDLManager manager = new WSDLManagerImpl(bus);
       
            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback);
            String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
            QName serviceName = EndpointReferenceUtils.getServiceName(callback);
            String portString = EndpointReferenceUtils.getPortName(callback);
           
            QName portName = new QName(serviceName.getNamespaceURI(), portString);
           
            StringBuffer seiName = new StringBuffer();
            seiName.append(JAXBUtils.namespaceURIToPackage(interfaceName.getNamespaceURI()));
            seiName.append(".");
            seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(),
                                                      JAXBUtils.IdentifierType.INTERFACE));
           
            Class<?> sei = null;   
            try {
                sei = Class.forName(seiName.toString(),
                                    true, manager.getClass().getClassLoader());
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            }
           
            URL wsdlURL = new URL(wsdlLocation);           
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

     * Test method for 'org.objectweb.celtix.bus.WSDLManagerImpl.getDefinition(URL)'
     */
    public void testGetDefinitionURL() throws Exception {
        URL url = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull("Could not find WSDL", url);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);
        Definition def = wsdlManager.getDefinition(url);
        assertNotNull(def);

        Definition def2 = wsdlManager.getDefinition(url);
        assertTrue(def == def2);

        url = null;
        System.gc();
        System.gc();
        url = getClass().getResource("/wsdl/hello_world.wsdl");
        Definition def3 = wsdlManager.getDefinition(url);
        assertTrue(def != def3);
    }
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

     */
    public void testGetDefinitionString() throws Exception {
        URL neturl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull("Could not find WSDL", neturl);
        String url = neturl.toString();
        WSDLManager wsdlManager = new WSDLManagerImpl(null);
        Definition def = wsdlManager.getDefinition(url);
        assertNotNull(def);

        Definition def2 = wsdlManager.getDefinition(url);
        assertTrue(def == def2);

        url = null;
        System.gc();
        System.gc();
        url = getClass().getResource("/wsdl/hello_world.wsdl").toString();
        Definition def3 = wsdlManager.getDefinition(url);
        assertTrue(def != def3);
    }
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

    public void testExtensions() throws Exception {
        URL neturl = getClass().getResource("/wsdl/jms_test.wsdl");
        assertNotNull("Could not find WSDL", neturl);
        String url = neturl.toString();
        WSDLManager wsdlManager = new WSDLManagerImpl(null);
        JAXBExtensionHelper.addExtensions(wsdlManager.getExtenstionRegistry(),
                                          javax.wsdl.Port.class,
                                          JMSAddressPolicyType.class);

        Definition def = wsdlManager.getDefinition(url);
        assertNotNull(def);

        StringWriter writer = new StringWriter();
        wsdlManager.getWSDLFactory().newWSDLWriter().writeWSDL(def, writer);
        assertTrue(writer.toString().indexOf("jms:address") != -1);
    }
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

    public void testExtensionReturnsProperJAXBType() throws Exception {
        URL neturl = getClass().getResource("/wsdl/jms_test.wsdl");
        Bus bus = Bus.init();
        assertNotNull("Could not find WSDL", neturl);
        WSDLManager wsdlManager = bus.getWSDLManager();
        JAXBExtensionHelper.addExtensions(wsdlManager.getExtenstionRegistry(),
                                          javax.wsdl.Port.class,
                                         JMSAddressPolicyType.class);

        QName serviceName = new QName("http://celtix.objectweb.org/hello_world_jms", "HelloWorldService");
View Full Code Here

Examples of org.objectweb.celtix.wsdl.WSDLManager

        }
        assertNotNull(jmsAddressDetails);
    }

    public void testPlugableWSDLManager() throws Exception {
        WSDLManager wsdlManager = new WSDLManagerImpl(null);
        Map<String, Object> properties = new WeakHashMap<String, Object>();
        properties.put("celtix.WSDLManager", wsdlManager);
        Bus bus = Bus.init(new String[0], properties);

        WSDLManager wsdlManagerNew = bus.getWSDLManager();

        //Verify that the WSDLManger is the one we plugged into bus previously
        assertEquals("wsdlManager is the one we expected", wsdlManager, wsdlManagerNew);
    }
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.