Set Proxy Settings in Child thread when calling connectors in parallel
In our main thread we need to set the proxy before we call a Connect-Soap rule. This is because our proxy server is whitelisted on the soap server we are trying to reach. The proxy settings are being set by creating the pyProxySettingsForSOAP page and configuring the proxy hostname and credentials on it. The InvokeAxis2 activity checks the existance of this pyProxySettingsForSOAP page and if so, uses these configured proxy settings.
This works fine as long as we call the Soap Service with ExecuteMode Run. However we want to change this so that we call the Connect-Soap rule with ExecuteMode RunInParallel. But then Pega will create a child thread and call InvokeAxis2 in this child thread. However the child thread does not have the pyProxySettingsForSOAP page in his context, so the Soap call will not run through the proxy. As a consequence within the Soap cal the ip-address of the Application Server is used instead of the ip-address of the proxy server, and this will lead to a "Unauthorised" errorcode.
So how can I set the pyProxySettingsForSOAP page in the child thread? Or can I pass this from the main thread just like the Access Group is passed?
Thanks, Marc de Boer
***Updated by moderator: Lochan to add enhancement details***
Hi Marc, my understanding is that child requestor has the access for the parent requestor pages. did it complain about page not being available when tried? if the page is not available, then its going to be a problem.
There are jvm args 'http.proxyHost' and 'http.proxyPort'. not sure whether connect-soap uses them or not. may be its worth giving a try.
Hi GopiGanapathy, thanks for your reply. When the Connect-Soap rule is triggered with ExecuteMode RunInParallel, then Pega will spawn a Child thread and executes the InvokeAxis activity in it. You don't have access to this child thread so you cannot build in code to reference any parent pages.
And for the jvm args, this may work but then all Connect-Soap rules will use the proxy. We only want to setup the proxy for Soap calls that go through the public internet. So we need to setup this for each Soap call individually.