Skip to content

Commit

Permalink
HPCC4J-604 Suppress EclWatch redirects (#711)
Browse files Browse the repository at this point in the history
Signed-off-by: Pastrana <[email protected]>
Co-authored-by: Pastrana <[email protected]>
  • Loading branch information
rpastrana and Pastrana authored May 28, 2024
1 parent 6910a8e commit 66cc4fb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_";
toRef.setAddress(toAddress);
opt.setTo(toRef);

opt.setProperty(HTTPConstants.SO_TIMEOUT, connection.getSocketTimeoutMilli());
opt.setProperty(HTTPConstants.CONNECTION_TIMEOUT, connection.getConnectTimeoutMilli());
Expand Down

0 comments on commit 66cc4fb

Please sign in to comment.