tags:

views:

14

answers:

0

I'm working on a web service in Java that takes in a SOAP request and needs to fail if the request doesn't contain an attachment. I'm testing using soapUI, sending a message to an instance of WSO2 ESB, passing it to an instance of Apache ActiveMQ and later converting it into an org.oasis_open.docs.ns.cmis.messaging._200908.SetContentStream object.

My first thought was to check whether setContentStream.getContentStream() came back null, but the stream contains a few garbage characters if no file is attached. Is there a reliable way to know whether the incoming request contains a real attachment? If so, what is it?