Search in sources :

Example 1 with XopStringType

use of org.apache.cxf.mime.types.XopStringType in project cxf by apache.

the class ClientMtomXopTest method testMtoMString.

// see CXF-1395
@org.junit.Ignore
@Test
public void testMtoMString() throws Exception {
    TestMtom mtomPort = createPort(MTOM_SERVICE, MTOM_PORT, TestMtom.class, true, false);
    InputStream pre = this.getClass().getResourceAsStream("/wsdl/mtom_xop.wsdl");
    long fileSize = 0;
    for (int i = pre.read(); i != -1; i = pre.read()) {
        fileSize++;
    }
    byte[] data = new byte[(int) fileSize];
    this.getClass().getResourceAsStream("/wsdl/mtom_xop.wsdl").read(data);
    String stringValue = new String(data, "utf-8");
    XopStringType xsv = new XopStringType();
    xsv.setAttachinfo(stringValue);
    xsv.setName("eman");
    XopStringType r = mtomPort.testXopString(xsv);
    assertNotNull(r);
}
Also used : InputStream(java.io.InputStream) XopStringType(org.apache.cxf.mime.types.XopStringType) TestMtom(org.apache.cxf.mime.TestMtom) Endpoint(org.apache.cxf.endpoint.Endpoint) Test(org.junit.Test)

Example 2 with XopStringType

use of org.apache.cxf.mime.types.XopStringType in project cxf by apache.

the class TestMtomJMSImpl method testXopString.

public XopStringType testXopString(XopStringType data) {
    XopStringType d2 = new XopStringType();
    d2.setAttachinfo("This is the cereal shot from guns" + data.getAttachinfo());
    return d2;
}
Also used : XopStringType(org.apache.cxf.mime.types.XopStringType)

Example 3 with XopStringType

use of org.apache.cxf.mime.types.XopStringType in project cxf by apache.

the class TestMtomImpl method testXopString.

public XopStringType testXopString(XopStringType data) {
    XopStringType d2 = new XopStringType();
    d2.setAttachinfo("This is the cereal shot from guns" + data.getAttachinfo());
    return d2;
}
Also used : XopStringType(org.apache.cxf.mime.types.XopStringType)

Aggregations

XopStringType (org.apache.cxf.mime.types.XopStringType)3 InputStream (java.io.InputStream)1 Endpoint (org.apache.cxf.endpoint.Endpoint)1 TestMtom (org.apache.cxf.mime.TestMtom)1 Test (org.junit.Test)1