Package org.jdom

Examples of org.jdom.Element.addContent()


    public void testSoapAction()
            throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Transport transport = getTransportManager().getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");
View Full Code Here


        throws Exception
    {
        binding.setUndefinedEndpointAllowed(false);
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");

        Transport transport = getTransportManager()
                .getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");
View Full Code Here

   
    public void testAsync()
        throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");

        Transport transport = getTransportManager()
                .getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, asyncService, "http://localhost:8391/AsyncService");
View Full Code Here

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        Client client = ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient();
        client.setProperty(Channel.USERNAME, "user");
        client.setProperty(Channel.PASSWORD, "pass");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

  private static final String VERSION_NS = "http://xfire.codehaus.org/Book";

  public void invoke(MessageContext ctx) throws Exception {
   
    Element header = ctx.getOutMessage().getOrCreateHeader();
    header.addContent(new Element(VERSION_TAG ,VERSION_NS).addContent("1.0"));
   
  }

}
View Full Code Here

    }
   
    public void testTextChild() throws Exception
    {
        Element e = new Element("root", "urn:test");
        e.addContent("Hello World");
       
        JDOMStreamReader reader = new JDOMStreamReader(e);
        testTextChild(reader);
    }
View Full Code Here

        Protocol protocol = new Protocol("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 8443);
        Protocol.registerProtocol("https", protocol);
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        client.setProperty(HttpTransport.CHUNKING_ENABLED, "true");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
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.