-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC4J-604 Suppress EclWatch redirects #711
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -561,7 +561,7 @@ protected Integer getStubConnectionTO() throws AxisFault | |
final static UsernamePasswordCredentials emptyCreds = new UsernamePasswordCredentials("", null); | ||
|
||
/** | ||
* Sets the stub options defaults preemptiveauth to 'true; | ||
* Sets the stub options defaults preemptiveauth to 'true'; | ||
* | ||
* @param thestub | ||
* The Axis generated service stub | ||
|
@@ -573,7 +573,12 @@ protected Integer getStubConnectionTO() throws AxisFault | |
*/ | ||
static public Stub setStubOptions(Stub thestub, Connection connection) throws AxisFault | ||
{ | ||
//Add "rawxml_" query param to request ESP to suppress any default redirects | ||
Options opt = thestub._getServiceClient().getOptions(); | ||
EndpointReference toRef = opt.getTo(); | ||
String toAddress = toRef.getAddress() + (toRef.getAddress().contains("?") ? "&" : "?") + "rawxml_"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rpastrana I looked around to see if there was a different way to set a query parameter in Axis2, but wasn't able to find another method. However, I do wonder if we should be using the URL & URI classes here to add the query param instead of doing it manually. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I considered URL, but you were in the midst of removing URL from our project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looked into the URL/URI classes since I'm adding the comment your suggested, but didn't find any convenient methods allowing us to easily add a query param |
||
toRef.setAddress(toAddress); | ||
opt.setTo(toRef); | ||
|
||
opt.setProperty(HTTPConstants.SO_TIMEOUT, connection.getSocketTimeoutMilli()); | ||
opt.setProperty(HTTPConstants.CONNECTION_TIMEOUT, connection.getConnectTimeoutMilli()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add a comment why we are adding the rawxml_ query param here.