Examples of testXop()


Examples of org.apache.cxf.mime.TestMtom.testXop()

            ((BindingProvider)mtomPort).getRequestContext().put("schema-validation-enabled",
                                                                Boolean.TRUE);
           
            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            Holder<String> name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
            param.value.getInputStream().close();
           
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

                                                                                fileSize);
            }
           
            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            Holder<String> name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            fail("Expect the exception here !");
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
            param.value.getInputStream().close();
           
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

            Holder<byte[]> param = new Holder<byte[]>();
            param.value = new byte[(int) fileSize];
            this.getClass().getResourceAsStream("/wsdl/mtom_xop.wsdl").read(param.value);
            String target = new String(param.value);
            Holder<String> name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertEquals("attachinfo changed", target, new String(param.value));
        } catch (UndeclaredThrowableException ex) {
            throw (Exception) ex.getCause();
        }
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

            byte[] data = new byte[(int)fileSize];
            this.getClass().getResourceAsStream("/wsdl/mtom_xop.wsdl").read(data);

            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            Holder<String> name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
        }
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

        System.out.println("Sending out the me.bmp Image content to server, data size is " + fileSize);

        InputStream in = client.getClass().getResourceAsStream("me.bmp");
        in.read(param.value);
        Holder<String> name = new Holder<String>("call detail");
        port.testXop(name, param);
        System.out.println("received byte[] back from server, the size is " + param.value.length);

        Image image = ImageIO.read(new ByteArrayInputStream(param.value));
        System.out.println("build image with the returned byte[] back from server successfully, hashCode="
                + image.hashCode());
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

           
            ((BindingProvider)mtomPort).getRequestContext().put("schema-validation-enabled",
                                                                Boolean.TRUE);
            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
           
            in = param.value.getInputStream();
            bytes = IOUtils.readBytesFromStream(in);
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

            assertEquals(data.length, bytes.length);
            in.close();

            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
           
            in = param.value.getInputStream();
            bytes = IOUtils.readBytesFromStream(in);
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

                                                                Boolean.FALSE);
            SAAJOutInterceptor saajOut = new SAAJOutInterceptor();
            SAAJInInterceptor saajIn = new SAAJInInterceptor();
            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
           
            in = param.value.getInputStream();
            bytes = IOUtils.readBytesFromStream(in);
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

           
            ClientProxy.getClient(mtomPort).getInInterceptors().add(saajIn);
            ClientProxy.getClient(mtomPort).getInInterceptors().add(saajOut);
            param.value = new DataHandler(new ByteArrayDataSource(data, "application/octet-stream"));
            name = new Holder<String>("call detail");
            mtomPort.testXop(name, param);
            assertEquals("name unchanged", "return detail + call detail", name.value);
            assertNotNull(param.value);
           
            in = param.value.getInputStream();
            bytes = IOUtils.readBytesFromStream(in);
View Full Code Here

Examples of org.apache.cxf.mime.TestMtom.testXop()

           
            ((BindingProvider)mtomPort).getRequestContext().put("schema-validation-enabled",
                                                                Boolean.TRUE);
            param.value = new DataHandler(fileURL);
            name = new Holder<String>("have name");
            mtomPort.testXop(name, param);
            assertEquals("can't get file name", "return detail + me.bmp", name.value);
            assertNotNull(param.value);
                     
          
        } catch (UndeclaredThrowableException ex) {
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.