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

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


The problem is actually related to a lack of a CRLF before the first MIME 
boundary when chunking is enabled. Chunking requires one CRLF after the chunk 
size, but the MIME boundary also requires a preceding CRLF: 
http://www.freesoft.org/CIE/RFC/1521/16.htm

"Note that the encapsulation boundary must occur at the beginning of a line, 
i.e., following a CRLF"

The HTTPTracer output for a chunked Axis2 client invocation:


==============
Listen Port: 8888
Target Host: rtigdev.axa-equitable.com
Target Port: 5005
==== Request ====
POST /iPipelineService HTTP/1.1
SOAPAction: ""
User-Agent: Axis2
Host: rtigdev.axa-equitable.com:8888
Transfer-Encoding: chunked
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621; 
type="text/xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>"; charset=UTF-8

22a6
--MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621
content-type: text/xml; charset=UTF-8
content-transfer-encoding: 8bit
content-id: <0.urn:uuid:[EMAIL PROTECTED]>

A successful chunked client invocation using cURL includes 2 CRLFs:


==============
Listen Port: 8888
Target Host: rtigdev.axa-equitable.com
Target Port: 5005
==== Request ====
POST /iPipelineService HTTP/1.1
User-Agent: curl/7.16.0 (i586-pc-mingw32msvc) libcurl/7.16.0 OpenSSL/0.9.7e 
zlib/1.2.2
Host: rtigdev.axa-equitable.com:8888
Accept: */*
Content-Type: multipart/related; type="text/xml"; 
boundary="MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501"; 
start="<0.urn:uuid:[EMAIL PROTECTED]>"
Transfer-Encoding: chunked
Expect: 100-continue

3ff4

--MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501
content-type: text/xml; charset=UTF-8
content-transfer-encoding: 8bit
content-id: <0.urn:uuid:[EMAIL PROTECTED]>
 

> Extraneous characters before first MIME bounadry in 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