Question

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***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
December 2, 2016 - 9:38am

Hello All,

This was identified as an enhancement to the product and a request item (listed in the Related Support Case Number filed above) has been created.

Regards,
Lochan  |  Community Moderator  |  Pegasystems Inc.

Comments

Keep up to date on this post and subscribe to comments

November 23, 2016 - 12:05pm

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.

https://pdn.pega.com/support-articles/pyinvokerestconnector-unable-set-proxyhost-proxyport

 

November 24, 2016 - 5:12am
Response to GopiGanapathy

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.

Mod
December 2, 2016 - 9:38am

Hello All,

This was identified as an enhancement to the product and a request item (listed in the Related Support Case Number filed above) has been created.

Regards,
Lochan  |  Community Moderator  |  Pegasystems Inc.

Lochana | Community Moderator | Pegasystems Inc.