## Include script - simple POST - all data received from client in one chunk. Overall data size known - trans5
#
# 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.
#
# Trailer header data - 
#
# SDU type, URI info and header info is 31 bytes (includes the trailer header).
# Trailer header info is 5 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 trans5_post_singlebody_driver
#
# Create a POST method transaction
#
	SEND
		INVOKE OpenTransactionL
			PARAMETER aMethod POST
			PARAMETER aUri http://wap.symbian.com/
			STOREITEM :RETURN: trans5
		ENDINVOKE
		INVOKE trans5 AddHeaderL
			PARAMETER aFieldName Accept
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue application/vnd.wap.wmlc
		ENDINVOKE
		INVOKE trans5 AddHeaderL
			PARAMETER aFieldName Content-Type
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue application/x-www-form-urlencoded
		ENDINVOKE
		INVOKE trans5 AddHeaderL
			PARAMETER aFieldName User-Agent
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue X19
		ENDINVOKE
		INVOKE trans5 AddHeaderL
			PARAMETER aFieldName Trailer
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue User-Agent
		ENDINVOKE
		INVOKE trans5 AddBody
			CREATEITEM aBody CDriverDataSupplier body5
		ENDINVOKE
		INVOKE trans5 SubmitL
		ENDINVOKE
	ENDSEND
#
# Expect call to OverallDataSize
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::OverallDataSize
			PARAMETER :RETURN: 48
		ENDINVOCATION
	ENDEXPECT
#
# Expect another call to OverallDataSize invoked from the validation filter
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::OverallDataSize
			PARAMETER :RETURN: 48
		ENDINVOCATION
	ENDEXPECT
#
# Expect the post data to be extracted - one part only
#
	EXPECT
		INVOCATION body5 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
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::ReleaseData
		ENDINVOCATION
	ENDEXPECT
#
# Inform the protocol handler that there is more data - second part
#
	SEND
		ALLOWREENTRANCY
		INVOKE trans5 MoreRequestBodyDataL
			VALIDATE :LEAVECODE: 0
		ENDINVOKE
	ENDSEND
#
# Expect the post data to be extracted - second part
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::GetNextDataPart
			PARAMETER aDataPart <$file$C:\HttpTest\wsp_pr_hnd_driver\post_data_1b_driver.txt$file$>
			PARAMETER :RETURN: EFalse
		ENDINVOCATION
	ENDEXPECT
#
# Expect the release of the data
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::ReleaseData
		ENDINVOCATION
	ENDEXPECT
#
# Inform the protocol handler that there is more data - third part
#
	SEND
		ALLOWREENTRANCY
		INVOKE trans5 MoreRequestBodyDataL
			VALIDATE :LEAVECODE: 0
		ENDINVOKE
	ENDSEND
#
# Expect the post data to be extracted - third part
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::GetNextDataPart
			PARAMETER aDataPart <$file$C:\HttpTest\wsp_pr_hnd_driver\post_data_1c_driver.txt$file$>
			PARAMETER :RETURN: ETrue
		ENDINVOCATION
	ENDEXPECT
#
# Expect the release of the data - third part
#
	EXPECT
		INVOCATION body5 MHTTPDataSupplier::ReleaseData
		ENDINVOCATION
	ENDEXPECT
ENDSCRIPT
