Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358458

Summary: Functions are missing for accessing the full response information from a service invocation
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Joseph Vincens <jvincens>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jvincens, margolis, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Brian Svihovec CLA 2011-09-21 12:45:32 EDT
In RBD, this function was implemented as ServiceLib.getCurrentCallbackResponse()
Comment 1 Joseph Vincens CLA 2011-10-19 10:07:20 EDT
ServiceLib.getCurrentCallbackResponse() is being replaced with an optional parameter in the callback functions.

The EDT runtime returns the IHttp object into every callback or error callback function. The Http object is populated with the request and corresponding response for the callback context. 
The IHttp object is exposed to the user as an optional parameter on the callback functions. 

IHttp must be the last parameter and it must be an in. 
A common use for the response is to extract the response's HTTPResponse headers.

Since not every callback requires request/response objects the ctrl 1 tooling will continue to create the signature defined by the interface.

example:
    Interface function:
        function myFunc1(p1 string out, p2 string in)returns(int)

valid returning to functions
        function myResponseHandler(p1 string in, retResult int in)
        function myResponseHandler(p1 string in, retResult int in, http IHttp in)

The change 
    1. validation - ServicesActionStatementValidator Allow the last parameter to be IHttp.
    2. js gen - ServicesCallStatementTemplate to prevent IHttp from being generated as a returned parameter
Comment 2 Brian Svihovec CLA 2012-01-16 21:51:39 EST
verified in build 0.8.0.v201201120902-1CT-Fiv5_M5_LM5fUa4