1). Add context Parameters in Component Reference.
2). In Promoted Reference->Bindings->Context Parameter Mapping, set Direction is "OUTPUT", Header Source is "HTTP_TRANSPORT_HEADERS" and Header Name is <the HTTP header you want to retrieve>.
3). In the Java application, use the code below to get the header "Content-Type" and "Expires".
//test code;
//This is test code for retrive http header "Content-Type" and "Expires" in response of Soap/Http
//We must initial MutableRequestContext before call another web service through reference.
MutableRequestContext mutableRequestContext = componentContext.createMutableRequestContext();
componentContext.setRequestContext(mutableRequestContext);
System.out.println("mutableRequestContext object has been created!");
//invoke external web service
TimeResponseDocument resp = getDateManagerPT().getCurrentTime(timezone);
System.out.println("--> Date Manager Component Response: \n\t\t" + resp.getTimeResponse());
CallbackContext callbackContext = mutableRequestContext.getCallbackContext();
System.out.println("callbackContext object has been created!");
String http_header1 = callbackContext.getParameter("contextParameter3", String.class);
String http_header2 = callbackContext.getParameter("contextParameter4", String.class);
System.out.println("http_header_Content_Encoding and http_header_Expires strings has been created!");
System.out.println("---------------------------------------------");
System.out.println("Content-Type = "+ http_header1);
System.out.println("Expires = "+ http_header2);
For more details, refer to the attached project. (Filename: workspace_helloworld.zip and workspace_helloworld3_fault_bag.zip).