[ 
https://issues.apache.org/jira/browse/AXIS2-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul O'Connor updated AXIS2-2236:
---------------------------------

    Summary: Missing CRLF Before First MIME bounadry in Chunked SwA Messages  
(was: Extraneous characters before first MIME bounadry in SwA messages)

> Missing CRLF Before First MIME bounadry in Chunked SwA Messages
> ---------------------------------------------------------------
>
>                 Key: AXIS2-2236
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2236
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1, 1.1, nightly
>         Environment: WinXP, Java 1.5.0_07-B03
>            Reporter: Paul O'Connor
>
> Extraneous characters appear before the first MIME boundary in SwA messages 
> (both client and service) under Axis2. Axis2 client -to- Axis2 service has no 
> problem moving past the extraneous characters to the first MIME boundary. 
> Other infrastructure elements added as proxies are expecting only <CR><LF>s 
> preceding the first boundary.
> The following HTTPTracer output lists the problem (includes HTTP headers). 
> Note the extraneous '2291' before the first MIME boundary':
> POST /iPipelineService HTTP/1.1
> Content-Type: multipart/related; 
> boundary=MIMEBoundaryurn_uuid_836F9BE5DD4ED2CFC81172084603850; 
> type="text/xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>"; charset=UTF-8
> SOAPAction: "TXLifeRequestWithAttachment"
> User-Agent: Axis2
> Host: rtigdev.axa-equitable.com:8888
> Transfer-Encoding: chunked
> 2291
> --MIMEBoundaryurn_uuid_836F9BE5DD4ED2CFC81172084603850
> content-type: text/xml; charset=UTF-8
> content-transfer-encoding: 8bit
> content-id: <0.urn:uuid:[EMAIL PROTECTED]>
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><q0:TXLifeRequest
>  xmlns:q0="http://ACORD.org/Standards/Life/2";>
>                               <q0:TransRefGUID />
>                               <q0:TransType tc="1" />
>                       </q0:TXLifeRequest></soapenv:Body></soapenv:Envelope>
> --MIMEBoundaryurn_uuid_836F9BE5DD4ED2CFC81172084603850
> content-type: application/octet-stream
> content-transfer-encoding: binary
> content-id: <foo.pdf>
> The client code segement used to generate the message is as follows:
>                       XMLStreamReader parser = 
> XMLInputFactory.newInstance().createXMLStreamReader(soapBodyStream);
>                       StAXOMBuilder builder = new StAXOMBuilder(parser);
>                       OMElement soapBodyPayload =  
> builder.getDocumentElement();
>                       Options options = new Options();
>                       options.setTo(new EndpointReference(args[3]));
>                       options.setProperty(Constants.Configuration.ENABLE_SWA, 
> Constants.VALUE_TRUE);
>                       
> options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION, 
> Constants.VALUE_TRUE);
>                       
> options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>                       
>                       // Increase the time out when sending large attachments
>                       options.setTimeOutInMilliSeconds(10000);
>                       ServiceClient sender = new ServiceClient();
>                       sender.setOptions(options);
>               
>                       OperationClient mepClient = 
> sender.createClient(ServiceClient.ANON_OUT_IN_OP);
>                       MessageContext mc = new MessageContext();
>                       FileDataSource fileDataSource = new FileDataSource(new 
> File(args[2]));
>                       // Create a dataHandler using the fileDataSource. Any 
> implementation of
>                       // javax.activation.DataSource interface can fit here.
>                       DataHandler dataHandler = new 
> DataHandler(fileDataSource);
>                       mc.addAttachment(filename, dataHandler);
>                       
>                       SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
>                       SOAPEnvelope env = fac.getDefaultEnvelope();
>                       env.getBody().addChild(soapBodyPayload);
>                       mc.setEnvelope(env);

-- 
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