Package org.jdom

Examples of org.jdom.Element.addContent()


            throws Exception
    {
        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, EchoImpl.class);

        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");

        Client client = new Client(transport, service, "xfire.local://Echo", "xfire.local://Client");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
View Full Code Here


            throws Exception
    {
        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, BadEcho.class);

        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");

        Client client = new Client(transport, service, "xfire.local://Echo");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
View Full Code Here

        JDOMEndpoint endpoint = new JDOMEndpoint();
        channel2.setEndpoint(endpoint);

        // Document to send
        Element root = new Element("root");
        root.addContent("hello");
        Document doc = new Document(root);
       
        MessageContext context = new MessageContext();
       
        OutMessage msg = new OutMessage("urn:xfire:local://Peer2");
View Full Code Here

    }
   
    public void testInvoke() throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(service, transport, "xfire.local://Echo");
       
        Element e = echo.echo(root);
View Full Code Here

    }
   
    public void testInvokeDifferentBinding() throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Service serviceModel = new ObjectServiceFactory(new MessageBindingProvider()).create(Echo.class);
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "xfire.local://Echo");
       
View Full Code Here

    // Coverages (owcs) [1]
    Element coveragesElem = new Element( "Coverages", owcsNS );
    coveragesElem.addNamespaceDeclaration( owsNS );
    coveragesElem.addNamespaceDeclaration( xlinkNS );

    coveragesElem.addContent( genCoverage( this.identifier ) );

    return new Document( coveragesElem );
  }

  public Element genCoverage( String covId )
View Full Code Here

        parseValueCollection(field, value);
        return;
      }

      value = stripQuotes(value);
      field.addContent(value);
    }
  }

  void parseValueCollection(Element field, String value) {
    if (value.startsWith("(")) value = value.substring(1);
View Full Code Here

        if ( curException.getTextMessages() != null )
        {
          for ( String curMessage : curException.getTextMessages() )
          {
            // ToDo - somehow seperate multiple text messages.
            exceptionElem.addContent( curMessage );
          }
        }
        rootElem.addContent( exceptionElem );
      }
View Full Code Here

    // <CoverageOfferingBrief>/description [0..1]
    // <CoverageOfferingBrief>/name [1]
    // <CoverageOfferingBrief>/label [1]
    if ( covDescription != null && covDescription.length() != 0)
      briefElem.addContent( new Element( "description", wcsNS ).addContent( covDescription ) );
    briefElem.addContent( new Element( "name", wcsNS ).addContent( covName ) );
    briefElem.addContent( new Element( "label", wcsNS ).addContent( covLabel ) );

    // <CoverageOfferingBrief>/lonLatEnvelope [1]
    briefElem.addContent( genLonLatEnvelope( gridCoordSys ) );
View Full Code Here

    // <CoverageOfferingBrief>/description [0..1]
    // <CoverageOfferingBrief>/name [1]
    // <CoverageOfferingBrief>/label [1]
    if ( covDescription != null && covDescription.length() != 0)
      briefElem.addContent( new Element( "description", wcsNS ).addContent( covDescription ) );
    briefElem.addContent( new Element( "name", wcsNS ).addContent( covName ) );
    briefElem.addContent( new Element( "label", wcsNS ).addContent( covLabel ) );

    // <CoverageOfferingBrief>/lonLatEnvelope [1]
    briefElem.addContent( genLonLatEnvelope( gridCoordSys ) );
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.