Examples of StringSource


Examples of org.apache.camel.converter.jaxp.StringSource

    public Object evaluateAsStringSource(Exchange exchange) throws Exception {
        initialize(exchange);

        String text = evaluateAsString(exchange);
        return new StringSource(text);
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.StringSource

       
        int nbMsgs = 10;
        for (int i = 0; i < nbMsgs; i++) {
            InOnly me = client.createInOnlyExchange();
            me.setService(new QName("http://test", "entryPoint"));
            me.getInMessage().setContent(new StringSource(
                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.sendSync(me);
        }       
        ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace2")).getMessageList().assertMessagesReceived(1 * nbMsgs);
 
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.StringSource

    public void testInOnlyNoTxNoRb() throws Exception {
        createRoute(Transacted.None, false, false, false);

        Channel client = nmr1.createChannel();
        Exchange exchange = client.createExchange(Pattern.InOnly);
        exchange.getIn().setBody(new StringSource("<hello/>"));
        exchange.setTarget(nmr1.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, PROXY_ENDPOINT_NAME)));
        client.sendSync(exchange);
        assertEquals(Status.Done, exchange.getStatus());
        client.close();
        receiver.assertExchangesReceived(1, TIMEOUT);
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.impl.StringSource

    public List<String> tokenizeEntities(String queryTerm) {
        // obtain entities about query term through Enhancer
        ContentItem ci = null;
        boolean error = false;
        try {
            ci = ciFactory.createContentItem(new StringSource(queryTerm));
            enhancementJobManager.enhanceContent(ci);
        } catch (UnsupportedEncodingException e) {
            log.error("Failed to get bytes of query term: {}", queryTerm, e);
            error = true;
        } catch (EnhancementException e) {
View Full Code Here

Examples of org.exist.source.StringSource

//        querySource = SourceFactory.getSource(broker, null, scriptURI, false);
//      } catch(Exception e) {
//        //LOG.error(e);
//      }
    } else if(script != null && !script.isEmpty()) {
      return new StringSource(script);
    }
 
    return null;
  }
View Full Code Here

Examples of org.htmlparser.lexer.StringSource

     */
    public void testStringSourceNull () throws IOException
    {
        Source source;

        source = new StringSource (null);
        assertTrue ("erroneous character", -1 == source.read ());
    }
View Full Code Here

Examples of org.milyn.payload.StringSource

            } else if ( object instanceof Reader ) {
                source =  new StreamSource( ( Reader ) object );
            } else if ( object instanceof Resource ) {
                source =  new StreamSource( ( ( Resource ) object).getReader() );
            } else if ( object instanceof String ) {
                source =  new StringSource( (String) object);
            } else {
                throw new IllegalArgumentException( "signal object must be instance of Source, InputStream, Reader, Resource or String" );
            }
           
            this.smooks.filter( source,
View Full Code Here

Examples of org.mortbay.util.ajax.JSON.StringSource

        catch(Exception e)
        {
            e.printStackTrace();
            return null;
        }       
        return (Token)_json.parse(new StringSource(value));
    }
View Full Code Here

Examples of org.servicemix.jbi.jaxp.StringSource

        // START SNIPPET: content
        InOnly exchange = client.createInOnlyExchange();
        NormalizedMessage message = exchange.getInMessage();

        message.setContent(new StringSource("<hello>world!</hello>"));

        client.sendSync(exchange);
        // END SNIPPET: content
    }
View Full Code Here

Examples of org.springframework.xml.transform.StringSource

        expect(connectionMock.hasFault()).andReturn(false);
        connectionMock.close();

        replay(connectionMock, extractorMock);

        Object result = template.sendSourceAndReceive(new StringSource("<request />"), extractorMock);
        assertEquals("Invalid response", extracted, result);

        verify(connectionMock, extractorMock);
    }
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.