Package org.jdom

Examples of org.jdom.Document


    {
        ((ObjectServiceFactory) getServiceFactory()).setStyle(SoapConstants.STYLE_DOCUMENT);
        Service service = getServiceFactory().create(Echo.class);
        getServiceRegistry().register(service);
       
        Document document = invokeService("Echo", "/org/codehaus/xfire/aegis/type/xml/test.xml");
        addNamespace("e", "urn:PrimitiveService");
        assertValid("//e:echoInt", document);
    }
View Full Code Here


    getServiceRegistry().register(service);
  }

  public void testGetStrings() throws Exception {

    Document doc = getWSDLDocument("InterfaceService");
    //printNode(doc);
    addNamespace("xsd","http://www.w3.org/2001/XMLSchema");
    assertValid("//xsd:complexType[@name=\"BeanImpl\"]/xsd:sequence/xsd:element[@name=\"exposedName\"]",doc);
    assertValid("//xsd:complexType[@name=\"BeanImpl\"]/xsd:sequence/xsd:element[@name=\"exposedParentName\"]",doc);
  }
View Full Code Here

        assertFalse(parent instanceof IChild);

        IGrandChild grandChild = client.getGrandChild();
        assertEquals("parent", grandChild.getParentName());
       
        Document wsdl = getWSDLDocument("IInterfaceService");
        assertValid("//xsd:complexType[@name='IGrandChild']", wsdl);
        assertValid("//xsd:complexType[@name='IGrandChild']//xsd:element[@name='grandChildName']", wsdl);
        assertValid("//xsd:complexType[@name='IGrandChild']//xsd:element[@name='childName'][1]", wsdl);
        assertInvalid("//xsd:complexType[@name='IGrandChild']//xsd:element[@name='childName'][2]", wsdl);
        assertValid("//xsd:complexType[@name='IChild']", wsdl);
View Full Code Here

        assertEquals("", strings[2]);
        reader.getXMLStreamReader().close();
       
        // Test writing
        Element element = new Element("strings", "t", "urn:test");
        Document doc = new Document(element);
        JDOMWriter writer = new JDOMWriter(element);
        type.writeObject(strings, writer, new MessageContext());
        writer.close();
   
        addNamespace("xsi", SoapConstants.XSI_NS);
View Full Code Here

       
        reader.getXMLStreamReader().close();
       
        // Test writing
        Element element = new Element("ints", "t", "urn:test");
        Document doc = new Document(element);
        JDOMWriter writer = new JDOMWriter(element);
        type.writeObject(ints, writer, new MessageContext());
        writer.close();

        assertValid("/t:ints/t:int[text()='" + ints[0] +"']", element);
View Full Code Here

        }
    }
   
    public void testService() throws Exception
    {
        Document response = invokeService(name, "authenticate12.xml");

        addNamespace("f", "urn:xfire:authenticate:fault");
        addNamespace("s12", Soap12.getInstance().getNamespace());
        assertValid("//s12:Detail/f:AuthenticationFault/f:message[text()='Invalid username/password']", response);
      
View Full Code Here

        }
    }
   
    public void testFaultWSDL() throws Exception
    {
        Document wsdl = getWSDLDocument(service.getSimpleName());

        String ns = service.getTargetNamespace();
        addNamespace("xsd", SoapConstants.XSD);
        addNamespace("w", WSDLBuilder.WSDL11_NS);
        addNamespace("ws", WSDLBuilder.WSDL11_SOAP_NS);
View Full Code Here

        Channel channel2 = getTransport().createChannel(peer2);
        channel2.setEndpoint(new JDOMEndpoint());

        // Document to send
        StaxBuilder builder = new StaxBuilder();
        Document doc = builder.build(getResourceAsStream("/org/codehaus/xfire/transport/jms/echo.xml"));

        MessageContext mc = new MessageContext();

        OutMessage msg = new OutMessage(peer2);
        msg.setSerializer(new JDOMSerializer());
View Full Code Here

    }

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

        addNamespace("l", "http://collection.type.aegis.xfire.codehaus.org");
        assertValid("//l:out/l:SomeDoubles/l:double[text()='1.0']", response);
    }
View Full Code Here

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

        addNamespace("l", "http://collection.type.aegis.xfire.codehaus.org");
        assertValid("//l:out/l:string[text()='bleh']", response);
    }
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.