Package org.objectweb.celtix.wsdl

Examples of org.objectweb.celtix.wsdl.WSDLManager


        URL url = getClass().getResource("/wsdl/hello_world.wsdl");
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService");
        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


        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

        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

        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

        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

   
    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

     * 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

     */
    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

    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

    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

TOP

Related Classes of org.objectweb.celtix.wsdl.WSDLManager

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.