Sample 51 not working
---------------------

                 Key: SYNAPSE-483
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-483
             Project: Synapse
          Issue Type: Bug
    Affects Versions: NIGHTLY
            Reporter: Andreas Veithen
             Fix For: 1.3
         Attachments: request.txt

When executing the first part (MTOM) of sample 51, the following exception is 
triggered in the MTOMSwASampleService service deployed on the sample Axis2 
server:

java.lang.NullPointerException
  at 
samples.services.MTOMSwASampleService.uploadFileUsingMTOM(MTOMSwASampleService.java:45)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at 
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:97)
  ... 10 more

The NPE is triggered by the last instruction in the following piece of code:

        OMText binaryNode = (OMText) request.
            getFirstChildWithName(new QName("http://services.samples";, 
"request")).
            getFirstChildWithName(new QName("http://services.samples";, 
"image")).
            getFirstOMChild();
        DataHandler dataHandler = (DataHandler) binaryNode.getDataHandler();
        InputStream is = dataHandler.getInputStream();

Obviously the service is unable to retrieve the DataHandler.

A dump of the request (see attachment) suggests there is an issue with the 
content ID. Indeed the SOAP message contains:

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include"; 
href="cid:1.urn:uuid:[EMAIL PROTECTED]" />

On the other hand the headers of the referenced MIME part are:

Content-Type: image/gif
Content-Transfer-Encoding: binary
Content-ID: <cid:1.urn:uuid:[EMAIL PROTECTED]>

I believe the Content-ID should not have the "cid:" prefix and that the correct 
value would be <1.urn:uuid:[EMAIL PROTECTED]>.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to