You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Paul O'Connor (JIRA)" <ji...@apache.org> on 2007/02/21 20:30:05 UTC

[jira] Created: (AXIS2-2236) Extraneous characters before first MIME bounadry in SwA messages

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....@apache.org>"; 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....@apache.org>

<?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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [jira] Created: (AXIS2-2236) Extraneous characters before first MIME bounadry in SwA messages

Posted by Thilina Gunarathne <cs...@gmail.com>.
Those numbers are due to the http chunking [1]. It seems your server
do not have support for it.. Try disabling chunking.. Refer to point 3
in here [2] to find out more on how to disable it..

options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.TRUE);

Thilina
[1] http://www.google.lk/search?q=http+chunking
[2] http://wso2.org/library/209

On 2/22/07, Paul O'Connor (JIRA) <ji...@apache.org> wrote:
> 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....@apache.org>"; 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....@apache.org>
>
> <?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: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Thilina Gunarathne
WSO2, Inc.; http://www.wso2.com/
Home page: http://webservices.apache.org/~thilina/
Blog: http://thilinag.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2236) Extraneous characters before first MIME bounadry in SwA messages

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilina Gunarathne resolved AXIS2-2236.
---------------------------------------

    Resolution: Invalid

Those numbers are due to the http chunking [1]. It seems your server
do not have support for it.. Try disabling chunking.. Refer to point 3
in this [2] kb to find out more on how to disable it..

options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.TRUE);

[1] http://www.google.lk/search?q=http+chunking
[2] http://wso2.org/library/209

> 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....@apache.org>"; 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....@apache.org>
> <?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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2236) Missing CRLF Before First MIME Boundary in Chunked SwA Messages

Posted by "Stuart Charlton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476063 ] 

Stuart Charlton commented on AXIS2-2236:
----------------------------------------

A close reading of RFC 2046 shows that the first MIME boundary in a multipart body does not require a preceeding CRLF.   It's considered optional (i.e. shouldn't be rejected, but shouldn't be required either).

Here's an excerpt of the BNF from Section 5.1.1:

dash-boundary := "--" boundary
; boundary taken from the value of boundary paremeter of the Content-Type field

multipart-body := [preamble CRLF] 
dash-boundary transport-padding CRLF
body-part *encapsulation
close-delimiter transport-padding
[CRLF epilogue]

encapsulation := delimiter transport-padding
CRLF body-part

delimiter := CRLF dash-boundary


> Missing CRLF Before First MIME Boundary 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
>
> There is a missing CRLF before the first MIME boundary in SwA messages 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....@apache.org>"; charset=UTF-8 
> 22a6 
> --MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
> 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....@apache.org>" 
> Transfer-Encoding: chunked 
> Expect: 100-continue 
> 3ff4 
> --MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
>   

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Reopened: (AXIS2-2236) Extraneous characters before first MIME bounadry in SwA messages

Posted by "Paul O'Connor (JIRA)" <ji...@apache.org>.
     [ 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....@apache.org>"; charset=UTF-8

22a6
--MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621
content-type: text/xml; charset=UTF-8
content-transfer-encoding: 8bit
content-id: <0....@apache.org>

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....@apache.org>"
Transfer-Encoding: chunked
Expect: 100-continue

3ff4

--MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501
content-type: text/xml; charset=UTF-8
content-transfer-encoding: 8bit
content-id: <0....@apache.org>
 

> 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....@apache.org>"; 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....@apache.org>
> <?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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2236) Missing CRLF Before First MIME Boundary in Chunked SwA Messages

Posted by "Paul O'Connor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Description: 
There is a missing CRLF before the first MIME boundary in SwA messages 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....@apache.org>"; charset=UTF-8 

22a6 
--MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621 
content-type: text/xml; charset=UTF-8 
content-transfer-encoding: 8bit 
content-id: <0....@apache.org> 

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....@apache.org>" 
Transfer-Encoding: chunked 
Expect: 100-continue 

3ff4 

--MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501 
content-type: text/xml; charset=UTF-8 
content-transfer-encoding: 8bit 
content-id: <0....@apache.org> 
  

  was:
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....@apache.org>"; 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....@apache.org>

<?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);


> Missing CRLF Before First MIME Boundary 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
>
> There is a missing CRLF before the first MIME boundary in SwA messages 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....@apache.org>"; charset=UTF-8 
> 22a6 
> --MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
> 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....@apache.org>" 
> Transfer-Encoding: chunked 
> Expect: 100-continue 
> 3ff4 
> --MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
>   

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2236) Missing CRLF Before First MIME Boundary in Chunked SwA Messages

Posted by "Paul O'Connor (JIRA)" <ji...@apache.org>.
     [ 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 Boundary in Chunked SwA Messages  (was: Missing CRLF Before First MIME bounadry in Chunked SwA Messages)

> Missing CRLF Before First MIME Boundary 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....@apache.org>"; 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....@apache.org>
> <?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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2236) Missing CRLF Before First MIME bounadry in Chunked SwA Messages

Posted by "Paul O'Connor (JIRA)" <ji...@apache.org>.
     [ 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....@apache.org>"; 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....@apache.org>
> <?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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2236) Missing CRLF Before First MIME Boundary in Chunked SwA Messages

Posted by "Paul O'Connor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul O'Connor resolved AXIS2-2236.
----------------------------------

    Resolution: Invalid

Stuart is correct, judging by the ABNF from the spec

> Missing CRLF Before First MIME Boundary 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
>
> There is a missing CRLF before the first MIME boundary in SwA messages 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....@apache.org>"; charset=UTF-8 
> 22a6 
> --MIMEBoundaryurn_uuid_F93DD7B5E1A1F48B2E11721590520621 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
> 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....@apache.org>" 
> Transfer-Encoding: chunked 
> Expect: 100-continue 
> 3ff4 
> --MIMEBoundaryurn_uuid_C4BC93C65C31CE0E7D11721557687501 
> content-type: text/xml; charset=UTF-8 
> content-transfer-encoding: 8bit 
> content-id: <0....@apache.org> 
>   

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org