Package org.jdom

Examples of org.jdom.Document


   
    public void testYOMReader()
        throws Exception
    {
        StaxBuilder builder = new StaxBuilder();
        Document doc = builder.build(getResourceAsReader("/org/codehaus/xfire/message/document/bean11.xml"));

        testReading(new JDOMReader(doc.getRootElement()));
    }
View Full Code Here


       
        Binding binding = service.getBinding(SoapHttpTransport.SOAP11_HTTP_BINDING);
        MessagePartContainer headers = binding.getHeaders(operation.getOutputMessage());
        assertEquals(1, headers.size());
       
        Document response =
                invokeService("MultipleOutService",
                              "/org/codehaus/xfire/inout/echo.xml");

        addNamespace("m", "urn:MultipleOutService");
        assertValid("/s:Envelope/s:Body/m:echoResponse/m:out[text()='Yo Yo']", response);
View Full Code Here

    }

    public void testWSDL()
            throws Exception
    {
        Document doc = getWSDLDocument("MultipleOutService");

        String ns = "urn:MultipleOutService";
       
        addNamespace("wsdl", WSDLWriter.WSDL11_NS);
        addNamespace("wsdlsoap", WSDLWriter.WSDL11_SOAP_NS);
View Full Code Here

        getServiceRegistry().register(service);

        // END SNIPPET: types
       
        final Document response =
                invokeService("BeanService",
                              "/org/codehaus/xfire/message/wrapped/WrappedCustomTypeTest.bean11.xml");

        addNamespace("sb", "http://services.xfire.codehaus.org");
        assertValid("/s:Envelope/s:Body/sb:getSubmitBeanResponse", response);
        assertValid("//sb:getSubmitBeanResponse/sb:out", response);
        assertValid("//sb:getSubmitBeanResponse/sb:out[text()=\"blah\"]", response);

        final Document doc = getWSDLDocument("BeanService");

        addNamespace("wsdl", WSDLWriter.WSDL11_NS);
        addNamespace("wsdlsoap", WSDLWriter.WSDL11_SOAP_NS);
        addNamespace("xsd", SoapConstants.XSD);
View Full Code Here

        JAXWSServiceFactory sf = new JAXWSServiceFactory(getTransportManager());
       
        Service service = sf.create(Echo.class);
        getServiceRegistry().register(service);
       
        Document res = invokeService(service.getSimpleName(), "echo.xml");
       
        addNamespace("x", "http://jaxws.xfire.codehaus.org");
        assertValid("//detail/x:EchoFault/x:someMessage", res);
    }
View Full Code Here

    {
        Service service = new JibxServiceFactory().create(AccountService.class, null, "http://xfire.codehaus.org/jibx", null);
        service.setInvoker(new BeanInvoker(new AccountServiceImpl()));
        getServiceRegistry().register(service);
       
        Document response = invokeService("AccountService", "/org/codehaus/xfire/jibx/getAccountStatus.xml");
        addNamespace("a", "http://xfire.codehaus.org/jibx");
        assertValid("//s:Body/a:getAccountStatusResponse/a:AccountInfo/a:amount[text()='0']", response);
       
        Document wsdl = getWSDLDocument("AccountService");
        printNode(wsdl);
    }
View Full Code Here

        props.put("overrideTypesList", types);
        Service service = getServiceFactory().create(TestService.class, props);
        getServiceRegistry().register(service);

        Document wsdl = getWSDLDocument(service.getSimpleName());
        assertValid("//xsd:element[@name='testValue'][@type='tns:TestValue']", wsdl);
    }
View Full Code Here

        writer.flush();
        bos.close();
       
        System.out.println(bos.toString());
        StaxBuilder builder = new StaxBuilder();
        Document doc = builder.build(new StringReader(bos.toString()));
       
        testWrite(doc);
    }
View Full Code Here

    }

    public void testReceiveStrings()
            throws Exception
    {
        Document response = invokeService("ListService",
                                          "/org/codehaus/xfire/aegis/type/collection/ReceiveTooManyStrings.xml");

        addNamespace("l", "http://collection.type.aegis.xfire.codehaus.org");
        assertValid("//s:Fault", response);
       
View Full Code Here

    }
   
    public void testYOM()
        throws Exception
    {
        Document doc = new Document(new Element("root", "urn:test"));
       
        write(new JDOMWriter(doc.getRootElement()));
       
        testWrite(doc);
    }
View Full Code Here

TOP

Related Classes of org.jdom.Document

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.