Examples of EchoPictureResponse


Examples of org.codehaus.xfire.mtom.EchoPictureResponse

       
        EchoPicture req = new EchoPicture();
        FileDataSource source = new FileDataSource(getTestFile("src/test-resources/xfire.jpg"));
        req.setImage(new DataHandler(source));
       
        EchoPictureResponse res = picClient.EchoPicture(req);
        assertNotNull(res.getImage());
    }
View Full Code Here

Examples of org.codehaus.xfire.mtom.EchoPictureResponse

    /* (non-Javadoc)
     * @see org.codehaus.xfire.jaxb2.IPictureService#EchoPicture(org.codehaus.xfire.mtom.EchoPicture)
     */
    public EchoPictureResponse EchoPicture(EchoPicture req)
    {
        EchoPictureResponse response = new EchoPictureResponse();
        Assert.assertNotNull(req.getImage());
       
        try
        {
            InputStream is = req.getImage().getInputStream();
           
            int i = 0;
            while (is.read() != -1)
                i++;
           
            Assert.assertEquals(27364, i);
        }
        catch (IOException e)
        {
            Assert.fail(e.getMessage());
            e.printStackTrace();
        }
       
        FileDataSource source = new FileDataSource(getTestFile("src/test-resources/xfire.jpg"));
        response.setImage(new DataHandler(source));
       
        return response;
    }
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.