Folks,
I made a minimam change to add such function.
HTTPConstants.java and HTTPSender.java are modified.
Refer the attached files and the diff at the end of this
mail.
I also include a sample program (AddHttpHeader.java), and
client-config.wsdd.
I noticed that Aapche SOAP has the same function.
Therefore, if there is no strong objection,
I am going to commit the update early next week.
For now, users can add any HTTP headers such as
SOAPAction, content-length, etc. It is user's responsiblity. We may
want to allow users to add such header. Any thoughts?
As for response, we may want to collect HTTP headers to
include in MessageContext.
Anyway, your comments are appreciated.
Thanks.
yuichi
------------------------ diff log
------------------------------
cvs diff HTTPConstants.java (in directory
C:\programs\apache\axis-daily\02-03-22\xml-axis\java\src\org\apache\axis\transport\http\)
Index: HTTPConstants.java =================================================================== RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java,v retrieving revision 1.18 diff -r1.18 HTTPConstants.java 81a82,83 > public static final String HEADER_OTHERS = "HTTP-Other-Headers"; > cvs diff HTTPSender.java (in directory C:\programs\apache\axis-daily\02-03-22\xml-axis\java\src\org\apache\axis\transport\http\) Index: HTTPSender.java =================================================================== RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v retrieving revision 1.52 diff -r1.52 HTTPSender.java 79a80 > import java.util.Enumeration; 184,185c185,186 < int newlinesSeen = 0; < boolean headerDone = false; /* Done on first newline */ --- > int newlinesSeen = 0; > boolean headerDone = false; /* Done on first newline */ 367a369,379 > > // adding user-defined/platform-dependent HTTP headers > if (msgContext.getProperty(HTTPConstants.HEADER_OTHERS)!=null) { > Hashtable headerTable = > (Hashtable)msgContext.getProperty(HTTPConstants.HEADER_OTHERS); > for (Enumeration e = headerTable.keys(); e.hasMoreElements(); ) { > Object key = e.nextElement(); > header.append(key).append(": ") > .append(headerTable.get(key)).append("\r\n"); > } > } |
HTTPSender.java
Description: Binary data
HTTPConstants.java
Description: Binary data
AddHttpHeader.java
Description: Binary data
client-config.wsdd
Description: Binary data