Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all 2881 articles
Browse latest View live

Tips & tricks asynchronous processing

$
0
0

Hi all,

 

We are having a server program that is processing files for a certain folder. At the moment this is being done synchronous and i am looking for tips & tricks to convert this behaviour to asynchronous processing.

 

 

The server program has a datawindow in which all the processing is being logged ie

 

...

file c:\data\123.txt was processed and moved to c:\data\backup

file c:\data\'456.txt was processed and moved to c:\data\backup

auto-mail function for c:\data\456.txt completed

...

 

Depending on the contents of the file either 1 or more entries (read : rows in the datawindow)  with logging information are created in this datawindow.

 

I know and read about the SharedObjectRegister and so on.

 

Questions i am having is

 

1) I read that we can't access any object from the original thread inside our sharedobject. Can we use any variable (structure) or something like that so we can pass the logging information back to the main thread and inside the datawindow ?

 

2) How many sharedobjects can be run ? Should this be a concern ?

 

3) Any general tips , tricks concerning this issue are always welcome !

 

 

 

TIA

John


PB & web service : how to manipulate soap envelop ?

$
0
0

Hi all,

 

I am in the process of testing PB's ability to consume an existing web service. I have done some reading left and right.

 

I can create the proxy , but i always end up having the Cannot invoke webservice messagebox.

 

 

Here's my little piece of PB code 

 

PB CODE START

 

soapconnection conn // Define SoapConnection

checkvatport proxy_obj // Declare proxy

long rVal, lLog

real amount

date date_a

string ls_a,ls_b,ls_c

 

 

conn = create soapconnection  //Instantiated connection

lLog = conn.SetSoapLogFile ("C:\mySoapLog.log")

rVal = Conn.CreateInstance(proxy_obj, "checkvatport", "")

messagebox("test rval",string(rval))

 

 

// Create proxy object

try

   date_a = today()

  boolean w_t

  w_t = TRUE

 

   str_checkvat str1

   tns1__checkvatresponse str2

 

  str1.countrycode = "BE"

  str1.vatnumber = "0810416786"

 

 

  ls_a  = proxy_obj.checkvat(str1.countryCode,str1.vatNumber,str2.requestdate,str2.valid,str2.address)

 

  messagebox("LS-a",ls_a)

 

catch ( SoapException e )

   messagebox ("Error", "Cannot invoke Web service")

   // error handling  

end try

destroy conn

 

PB CODE END

 

 

 

 

And here's the soaplog contents

 

 

SOAPLOG START

 

CLOSED

 

 

 

 

REQUEST:

CLOSED

POST /taxation_customs/vies/services/checkVatService HTTP/1.1

Host: ec.europa.eu

Connection: Keep-Alive

User-Agent: EasySoap++/0.6

Content-Type: text/xml; charset=utf-8

SOAPAction: "urn:ec.europa.eu:taxud:vies:services:checkVat#checkVat"

Content-Length: 654

 

 

<E:Envelope

  xmlns:E="http://schemas.xmlsoap.org/soap/envelope/"

  xmlns:A="http://schemas.xmlsoap.org/soap/encoding/"

  xmlns:s="http://www.w3.org/2001/XMLSchema-instance"

  xmlns:y="http://www.w3.org/2001/XMLSchema"

  E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<E:Body>

<m:checkVat

  xmlns:m="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

<ns1:countryCode

  xmlns:ns1="urn:ec.europa.eu:taxud:vies:services:checkVat"

  s:type="y:string">BE</ns1:countryCode>

<ns2:vatNumber

  xmlns:ns2="urn:ec.europa.eu:taxud:vies:services:checkVat"

  s:type="y:string">0810416786</ns2:vatNumber>

</m:checkVat>

</E:Body>

</E:Envelope>

 

 

 

 

RESPONSE:

HTTP/1.1 500 Internal Server Error

Date: Wed, 04 Jun 2014 09:33:11 GMT

Transfer-Encoding: chunked

Content-Type: text/xml; charset=UTF-8

Server: Europa

Connection: Keep-Alive

 

 

 

 

Transfer is Chunked!

01d7

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unmarshalling Error: unexpected element (uri:"urn:ec.europa.eu:taxud:vies:services:checkVat", local:"countryCode"). Expected elements are &lt;{urn:ec.europa.eu:taxud:vies:services:checkVat:types}vatNumber>,&lt;{urn:ec.europa.eu:taxud:vies:services:checkVat:types}countryCode> </faultstring></soap:Fault></soap:Body></soap:Envelope>

0000

 

 

 

 

GetChunkLength: 01d7 = 471

Connection Disconnected

 

 

SOAPLOG END

 

 

 

 

Now i tried the to cut and paste the above soap envelop in SOAPUI , and it gives me the exact same error message as in the soaplog.

 

I then tried creating a request through SOAPUI but based on the wdsl ,SOAPUI is giving me a different soap envelop as the one PB generated ?

 

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:checkVat>

         <urn:countryCode>?</urn:countryCode>

         <urn:vatNumber>?</urn:vatNumber>

      </urn:checkVat>

   </soapenv:Body>

</soapenv:Envelope>

 

 

If i enter parameters in the above envelop and check it through SOAPUI , i end up having the result i want.

 

 

Is there any way we can manipulate the soap envelop contents ? Or does anyone have any idea why the soap envelop generated by PB ends up having the above mentioned error in the soaplog file ?

 

What am i missing ?

 

 

 

TIA

John

Issue related to webservice

$
0
0

Hi,

 

I have two issues, please help me on this.

 

1> I have created a webservice..In this webservice i have created a function and with in the function i am trying to call another webservice by using a webservice datawinodow. The webservicedatatwindow  is not retriving any data and retun -1 .But the same webservice is return data while i am trying toretrive through powerbuilder classic.I dont know why this.

 

2> In the webservice i have created a function in the NON VISUAL userobject.I am passing datetime parameter,long and integer. Webservice is created.But while trying to access the webservice through powerbuilder o invalid input parameter.And in the soap UI also its showing error.

 

Should we have to pass only string variables as input while creating a webservice in powerbuilder 12.5.1.

 

Waiting for your positive response.

 

Regards

Subrat

Calling Help with keyword crashes PB app in Citrix

$
0
0


We currently run our PB 12.5 generated application on Citrix. The application crashes (sporadically 7 of 10 times) when ShowHelp function is called with Keyword! passed. The help file (.CHM WebHelp) was generated using Mad Cap Flare version 6. The application works with no issues when NOT running in CITRIX environment. We are running Citrix Xenapp version 6.5.

 

Before dismissing this issue off as Citrix issue, please note that the following have been tried - An application created in C# calling the same .CHM (help) file with the same keyword works on Citrix without any issues. An older version of our .CHM file generated using Robo Help on Citrix worked fine without any issues. We do not have the luxury to go back to Robo Help.

 

It only seems to be a combination of CITRIX, PB app AND Mad Cap .CHM file combinations that fail. Since, the Mad Cap generated .CHM works fine on Citrix using C# app, Mad Cap seems to think its a PowerBuilder issue.

 

When the application crashes there are different OS .DLL's referenced. i.e. JSCRIPT9.DLL, MSWSOCK.DLL, WSHIP6.DLL and others. No pattern or which one will show up.

 

Before making an $800 call to Citrix and hear the same thing (PowerBuilder issue not ours), would like to know what PB experts think of this issue and if they have any insight?

 

Or if there is way to call the .CHM file other than ShowHelp?

 

Thank you all in advance.

How to control the scroll property of a tree view control

$
0
0

Hi,

 

I have a tree view control created using a table data source. Particular item in tree view has three levels for the root item and there are number of root items will be available in the tree view. I am facing an issue each time I refresh the tree view. Scenario is like, I have expanded many items in the tree view level and I am moving the vertical scroll bar and keep it somewhere in the middle and then I select an item in the tree view. Now I have a button that will refresh the entire tree view (It will re create the tree view again with any available new item from the table data source). Once the tree view items have re created the vertical scroll bar position moves (up or down) from the position where it was before the refresh button is clicked. Is there any way with that I can keep the vertical scroll bar to the same position as it was before refresh?

 

Thanks,

Anoop

PB .net 12.5.2, datawindow retrieves choke on Oracle TO_CHAR function

$
0
0

Oracle 11g, we've got at least a couple of these datawindows. Just another PB .net glitch?

 

to_char error.png

using preauthentication in SoapConnection

$
0
0

We have the code below. When it runs form A simple PB client (a button) preauthentication is working. When it runs from EAServer it does not. Any ideas?

 

Powerbuilder 12.5.2 build 5609

 

Long ll_ret

SoapConnection conn

currencyConvertor currencyConvertorProxy

 

Conn = CREATE SoapConnection

 

ll_ret = conn.enablepreauthentication( )

 

ll_ret = conn.setbasicauthentication("", "user", "password")

 

ll_ret = conn.createinstance( currencyConvertorProxy, "currencyConvertor", "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL")

 

double ld_rate

ld_rate =  currencyConvertorProxy.conversionrate(1.4,2.5)

 

destroy conn

destroy currencyConvertorProxy

Issue reading file from webservice

$
0
0

Support has hit a lull recently, so I've gotten back to an issue that has me stumped.

 

I've created a webservice in PB 12.5.2 Classic that has two methods:  readFile and writeFile.

 

The writeFile method just creates a text file with some test text in it.  It works fine, the file created in the folder I would expect (namely: C:\inetpub\wwwroot\testwebservice_root\file\session\__webservice__\c )

 

My issue comes from trying to read from a file in the readFile method.  I've put a test INI file in the \file\common\c folder, and when the webservice starts, it is copied to \file\session__webservice__\c as I would expect (so file exists).  However, when I try either a ProfileString, or even just a fileOpen, I cannot access the file (fileOpen returns -1).   Below is my code, basically following Chris' STD framework in reading from an ini file:

 

#if defined PBWEBSERVICE then                   // Web Service?
ls_virtual_path  = MapVirtualPath (ls_filename )            // YES=Get its Path
#end if
li_pos = POS  (ls_virtual_path, ls_filename)             // Got a path?
IF  li_pos  > 0 THEN                        // YES=>Get file name
ls_virtual_path  = MID (ls_virtual_path, 1, li_pos - 1)            // Remove file name
END IF

ls_ini_file   =  ls_virtual_path
ls_ini_file   +=  ls_filename

 

// test read here
//ls_result = ProfileString (ls_ini_file, "WebService", "Language", "X")
li_filenum = fileOpen(ls_ini_file)
IF li_filenum < 0 THEN
ls_result = "file open fail"
ELSE
li_len = fileRead(li_filenum, ls_text)
ls_result = "read " + string(li_len) + " bytes."
END IF

fileClose(li_filenum)

 

The variable ls_ini_file has the correct full path and ini file name as I am expecting.   Any suggestions is greatly welcome!

 

Jim


Inconsistent behaviour of settransobject in PB.NET

$
0
0

Hello, all

We have successfully ported a PB Classic app to PB.NET and it works without any issues.

 

The correctly functioning PB.NET app uses a PB.NET assembly (.NET assembly called mailing.dll), which, also has datastores.

 

Here is the strangest inconsistency.

If the mailing.dll if loaded from the application directly, then it works correctly.

But if it loaded by another assembly, i.e., the loading is Application->Assembly1->Assembly2, then the settransobject function returns errors for exactly the same data without any apparent reason.

 

Each assebmly has a separate namespace, so the variables could not possibly be interfering with each other.

 

Has anyone encountered with this problem before? Any direction wouldbe greately appreceated, since I got zero leads right now.

 

Thank you

Arcady

SystemError event in .NET assembly

$
0
0

Hello, all

Can anyone suggest how to transfer the systemerror event functionality from a PB.NET app to PB.NET assembly?

 

Basically, I need the system error to be caught on the assembly level and logged/emailed to the service department.

 

Can anyone point me to the right direction here?

 

Arcady

ToolTip usage in PB 11.5

$
0
0

Hi there

 

I try to use tooltip for a dw-column but can't get it work.

Step-1: Dw-column selected>ToolTip.Tab>Enabled> Checked that's it.

Step-2: Put some logic in an user-event ue_mousemove>Event ID = pbm_dwnmousemove

 

Here's the code: Please refer attached file

 

The code is debugged and no problem detected. The var's are significant and

return_string from Modify-instruction is empty string = OK.

In run-time there is a flickering when hovering over the column but no tooltip show up.

 

Step-3: Set the script in 'commented-mode'  and put some text in DW>ToolTip.Tip>Expression-box

             Now the ToolTip work's but not way I want it.

 

I would highly appreciate any efforts due to this problem from an other PB 11.5-developer.

 

Thank's in advance and

Best Regards from

 

Outi Vihko

Source Code Control for PowerBuilder Classic & .Net

$
0
0

We are looking at moving from the PB Native Source Control System in PowerBuilder 12 Classic to a third-party SCC system.  Since we plan to move to PowerBuilder 12.5 .Net next year, we want a solution that will work well for both development environments.  If you are using a third-party SCC system, which one are you using and would you recommend it?  Thanks in advance for your feedback!

Licenses - where are they?

$
0
0


I have a need to re-assign a license.  I used to do that on the Sybase Product Download Center (i.e. Subscribenet).  Is that still the place?

 

If so, I don't see the two licenses that we generated in Jan/2013.  Why not?  I need to re-assign one of these.

 

Help is appreciated.

Datawindow BUG in Powerbuilder .NET (12.5.1 4953)

$
0
0

Hi ,

I have created a wcf service in Powerbuilder .NET (12.5.1 build 4953).

If I want to modify a datawindow , for example add a column or modify the datatype Powerbuilder .NET crashes.

In other words I cannot modify an existing Datawindow. Only create a new one.

 

Will Sybase release a fix for this Huge BUG ?

 

thank you

Dynamic datawindow with parameters, how to modify sql select?

$
0
0

How to change sql select in Sybase.DataWindow.Wpf.DWDataWindowControl PB 12.5 dynamically?

 

int rtn = dw.SetSqlSelect(usql); // return -5, doesnt change sql select

dw.Object.Modify("DataWindow.Table.Select = '" + usql + "'"); // doesn't change sql select

 

This problem occurs only if datawindow has parameters.

 

Thank you.


PB.Net 12.5.2 Dynamically Created Updateable DW

$
0
0

performed the usual

 

ds_obj = create datastore

ds_obj.create(sqlca.syntaxfromsql("select keycol,col1,col2 from tab1","style(type=grid)",ls_err1),ls_err2)

 

Then created the ds_obj.modify string to identify key col, make everything updateable, keyinplace,updatewhere, etc

 

ds_obj.Modify returns an empty string.  A describe("datawindow.syntax")  returns a string that I can see no difference from an actually created DW that is exported.

 

Add rows to the ds_obj and since I want it to actually perform updates to existing rows ...

ds_obj.setitemstatus(row,0,primary!,datamodified!)

 

Now, when the time comes

ds_obj.settransobject(sqlca)

ds_obj.update()

 

The update returns 1, but produces no update statements in a trace file.  SQLPreview event is not triggered.  sqlca.sqlcode =0.  UpdateEnd event claims "X" number of rows were updated.

 

 

Took liberties in shortening some descriptive steps to get to the point.  can get into greater detail when I'm back at the office to clarify anything.

 

Any thoughts to why this is not working?

 

Thanks

Problem in saving PDF's in PB.NET 15 (greek regional settings).

$
0
0

Hi.

 

Using PB.NET 15 Build 2005.

 

Trying to save a PDF file with datawindow's saveas function. I receive the following messages (i provide two screenshots because the modal assertion window shows twice). Using greek regional settings, but the data in the datawindow is in English.

 

 

 

(this problems occurs also in PB.NET 12.5 but not in PB,NET 12.1).

 

Andreas Mykonios.

PB .net 12.5.2, datawindow retrieves choke on Oracle TO_CHAR function

$
0
0

Oracle 11g, we've got at least a couple of these datawindows. Just another PB .net glitch?

 

to_char error.png

using preauthentication in SoapConnection

$
0
0

We have the code below. When it runs form A simple PB client (a button) preauthentication is working. When it runs from EAServer it does not. Any ideas?

 

Powerbuilder 12.5.2 build 5609

 

Long ll_ret

SoapConnection conn

currencyConvertor currencyConvertorProxy

 

Conn = CREATE SoapConnection

 

ll_ret = conn.enablepreauthentication( )

 

ll_ret = conn.setbasicauthentication("", "user", "password")

 

ll_ret = conn.createinstance( currencyConvertorProxy, "currencyConvertor", "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL")

 

double ld_rate

ld_rate =  currencyConvertorProxy.conversionrate(1.4,2.5)

 

destroy conn

destroy currencyConvertorProxy

PB 12.5.2 .NET assembly does not export ancestor functions

$
0
0

Hello, all

I am having a serious problem here (and I remember raising it once before, but I thought it was solved already).

I have an ancestor class for a service. It has a InitializeComponent function in it.

 

I inherit from this class and export the descendent class. However, in the descendent class the function is not visible to the external clients.

Only if I go to the descendent object and write return super::InitializeComponent(), then it becomes visible.

 

Question: is there anything that can be done about it, or do I have to this with all my services?

 

I ma using PB.NET version 12.5.2. 5602

 

Thank you

Arcady

Viewing all 2881 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>