## Include script - failed post transaction trans1 - fails on 2nd chunk
#
# Client creates a POST trans action - trans1. 
#
# Body data - 
# post_data_1_driver.txt in 3 parts; 1a, 1b, 1c
#
# Header data - 
# Accept : application/vnd.wap.wmlc
# Content-Type : application/x-www-form-urlencoded.
#
# SDU type, URI info and header info is 29 bytes.
#
# Overall data size is known
#
# Stub validates the headers and body data and Server sends the cnf
#
# The method will be in the Waiting state
#
SCRIPT trans1_post_multibody_driver
#
# Create a POST method transaction - first part
#
	SEND
		INVOKE OpenTransactionL
			PARAMETER aMethod POST
			PARAMETER aUri http://wap.symbian.com/
			STOREITEM :RETURN: trans1
		ENDINVOKE
		INVOKE trans1 AddHeaderL
			PARAMETER aFieldName Accept
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue application/vnd.wap.wmlc
		ENDINVOKE
		INVOKE trans1 AddHeaderL
			PARAMETER aFieldName Content-Type
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue application/x-www-form-urlencoded
		ENDINVOKE
		INVOKE trans1 AddBody
			CREATEITEM aBody CDriverDataSupplier body1
		ENDINVOKE
		INVOKE trans1 SubmitL
		ENDINVOKE
	ENDSEND
#
# Expect call to OverallDataSize
#
	EXPECT
		INVOCATION body1 MHTTPDataSupplier::OverallDataSize
			PARAMETER :RETURN: -1
		ENDINVOCATION
	ENDEXPECT
#
# Expect another call to OverallDataSize invoked from the validation filter
#
	EXPECT
		INVOCATION body1 MHTTPDataSupplier::OverallDataSize
			PARAMETER :RETURN: -1
		ENDINVOCATION
	ENDEXPECT
#
# Expect the post data to be extracted - first part
#
	EXPECT
		INVOCATION body1 MHTTPDataSupplier::GetNextDataPart
			PARAMETER aDataPart <$file$C:\HttpTest\wsp_pr_hnd_driver\post_data_1a_driver.txt$file$>
			PARAMETER :RETURN: EFalse
		ENDINVOCATION
	ENDEXPECT
#
# Expect the release of the data - first part
#
	EXPECT
		INVOCATION body1 MHTTPDataSupplier::ReleaseData
		ENDINVOCATION
	ENDEXPECT
#
# Inform the protocol handler that there is more data - second part
#
	SEND
		ALLOWREENTRANCY
		INVOKE trans1 MoreRequestBodyDataL
			VALIDATE :LEAVECODE: 0
		ENDINVOKE
	ENDSEND
#
# Expect the post data to be extracted - second part
#
	EXPECT
		INVOCATION body1 MHTTPDataSupplier::GetNextDataPart
			PARAMETER aDataPart <$file$C:\HttpTest\wsp_pr_hnd_driver\post_data_1b_driver.txt$file$>
			PARAMETER :RETURN: EFalse
		ENDINVOCATION
	ENDEXPECT
#
# There should be a failure now - EFailed event. NOTE - no -7384 event!!!
#
	EXPECT
		INVOCATION TransactionRunL
			VALIDATE aTransaction trans1
			VALIDATE aEvent EFailed
		ENDINVOCATION
	ENDEXPECT
ENDSCRIPT
