List of usage examples for javax.xml.soap AttachmentPart getSize
public abstract int getSize() throws SOAPException;
From source file:org.apache.axis2.saaj.AttachmentTest.java
@Test public void testBadAttSize() throws Exception { MessageFactory factory = MessageFactory.newInstance(); SOAPMessage message = factory.createMessage(); ByteArrayInputStream ins = new ByteArrayInputStream(new byte[5]); DataHandler dh = new DataHandler(new Src(ins, "text/plain")); AttachmentPart part = message.createAttachmentPart(dh); assertEquals("Size should match", 5, part.getSize()); }