A possible way to upgrade PB to DotNet

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:

  1. Doesn’t support long type parameter, we had to change it to string.
  2. 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?

  1. dw.Describe/Modify or dw.Create(syntax) won’t work for EAF/component, it keeps killing EAServer.
  2. 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?

              <add key="EndpointURL" value="http://appdev02/RequestManagement/RequestService.svc/soap" />

    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.


3 thoughts on “A possible way to upgrade PB to DotNet

  1. This was really helpful. Thanks for sharing the tip. with following configuration, it does work to change WSDL name dynamically.

    But I do have another issue here. What if your application is using multiple web services in different datawindow? I wish there could be setting per dll PB is creating for webservice.

    • That’s what I mentioned in my post, for multiple wsdl setting, you have to re-complie your proxy class which saved in /tmpwebservice folder, change the part

      string urlSetting = System.Configuration.ConfigurationManager.AppSettings["EndpointURL"];


      string urlSetting = System.Configuration.ConfigurationManager.AppSettings["EndpointURL_webservice_A"];

      Then you have the ability to add multiple settings in config file.

      We should ask Sybase to enable this feature in next release of PowerBuidler.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s