EAserver acts as a client to consume WCF SOAP WebService, wrap it in WebDatawindow accessed by JSP web user.
Powerbuilder richclient can also directly consume WCF SOAP webservice, or access the EAF component which calls WebService.

The PB we are using 11.2 still have some limitation on webservice datawindow:
- Doesn’t support long type parameter, we had to change it to string.
- wsdl is wrapped in datawindow is not configurable, might be better if can change it through ini or dw property.
When deploying webservice datawindwo upto EAServer, should copy those auto-gened dlls to EAServer/bin folder, not /dll.
How to switch wsdl in dw?
- dw.Describe/Modify or dw.Create(syntax) won’t work for EAF/component, it keeps killing EAServer.
- Re-compile the auto-gened temp proxy cs file, like this post did. The interesting part is, the proxy’s ctor is already trying to read default configuration from some ini/config file:
public RequestManagementService() {
string urlSetting = System.Configuration.ConfigurationManager.AppSettings["EndpointURL"];
if ((urlSetting != null)) {
this.Url = urlSetting;
}
else {
this.Url = "http://appdev01/RequestManagement/RequestService.svc/soap";
}
}
My question is, can’t we create a config file to intercept this ctor reading?
<configuration>
<appSettings>
<add key="EndpointURL" value="http://appdev02/RequestManagement/RequestService.svc/soap" />
</appSettings>
</configuration>
Yes, that’s the place you can control to switch wsdl, not the one shown in dw syntax. In fact, if you change the wsdl in dw to an invalid one, it still works!
How to control it? Create a config file named as your_app.exe.config, paste the configuration content in it. That’s it.
Thanks to this post helping me out by showing how to get the current configuration file path: AppDomain.CurrentDomain.SetupInformation.ConfigurationFile
I’m using PBUnit, so the config file for testing is called pbunit.exe.config, when I deployed it upto EAserver, the config file should rename to jagsrv.exe.config.
If the whole EAServer is only using one webservice, this solution works; if you have multiple webservice wsdl to consume, you have to add more config settings by re-compiling this temp proxy file in /TmpWebService folder.
How to catch WCF error in PB?
We spent quite a lot of time on this, PB developer should catch RunTimeError instead of Exception type in their proxy calls.