Hi.
I'm facing same situation.
I'm not paying for maintenance. But I have an USP! SO I should be able to get access to updates during USP...
Andreas.
Hi.
I'm facing same situation.
I'm not paying for maintenance. But I have an USP! SO I should be able to get access to updates during USP...
Andreas.
I had an additional question which has been 'being moderated' for a couple days. I did some searching and found the answer. Just set the Compatibility mode of sjview.exe to Vista SP2.
So it's something in the installation or your path names.
I have installed the PowerBuilder Enterprise - 12.5.1 Maintenance Release on my machine.
Attached is a build.log.
And yes, it is frustrating and not well documented.
Alt least you should get an output / log file.
Hi Roland;
Did you try starting everything with JDK 1.6 instead if the default JDK 1.5?
Regards ... Chris
Dear Armstrong,
Thank you for your suggestion. As per your advice I have done the some activity. Following are my findings & some unresolved issue.
Requirement
In PowerBuilder 12.5.1 Classic using ItextSharp (as per my understanding to check the sample project)
library Digital Signature & Encryption on .PDF files.
Activities
1. Download the following sample project form the Sybase code exchange site.
¨ PB2DOTNET
¨ Pb2java5507_4 (Calling a Java Class from PB)
¨ protectPDF
2. Run and check the code in PowerBuilder9.0.2 Build 7509 environment.
Findings
1. The above project use the powerbuilder PBNI features.
2. Use some PBD files (so the code is written on the file is not visible by me). Some example in the following.
¨ In “Pb2java5507_4” project user “pbjava.pbd” file.
¨ In “protectPDF” project use “pb2java.pbd” file.
3. Use JAVA class files as .SRX extension. Some example in the following.
¨ In “protectPDF” project use “protectPDF.srx” file.
¨ In “Pb2java5507_4” project use “converter.srx” file.
4. Project use executable JAR file. Some example in the following.
¨ In “protectPDF” project use “protectPDF.jar”, “itext.jar” file.
5. Some project use .dll file. Some example in the following.
¨ In “PB2DOTNET” project user “PB2DotNET.dll”, “itextsharp.dll” file.
6. Some project use EJB connection, some are use JAVA vm and some are user C# wrapper code.
Unresolved issue & questions
1. How to call the ItextSharp library from PowerBuilder 12.5.1 Classic code, please provide some sample code where
I can see the actual calling syntax. The above projects are using some files (e.g. .PBD, .DLL, .SRX etc )
where I can’t see the actual coding.
2. How to convert .JAR file as PowerBuilder proxy (.SRX). I have tried using ejb2pb09.exe.
But every time generate an error file where mentioned “Class 'converter.srxHome' not found”.
For this reason I have tried to up the EAServer, but without knowing the port no (i am putting default port no 9000) I am unable to up the server.
3. I have download the ItextSharp from the internet which the ItextSharp folder contains some .dll files.
4. Please inform me to use the ItextSharp library required the “ItextSharp.Jar” or “ItextSharp.srx” file?
If it’s required where I get this files or the process of conversion to .dll to .JAR or .SRX?
Requesting you please guide me for the above unresolved issues.
Thanking You.
Avishek
Hi Bruce!
I implemented that script but I'm getting a:
Unable to cast object of type 'System.Text.DecoderFallbackException' to type 'System.ServiceModel.FaultException' on my client.
it works fine for the error displayed for singing with a expired certificate:
But authenticating a message which multilateral signature is closed, returns this:
This one returns the Unabled to translate bytes [F3] at index 0 from specified code page to Unicode ..., you can reproduce this by sending '97' on as_idProceso argument to registraMultilateral method (be sure to send all the arguments, 'cause if you don't you'll get another error message).
Values:
as_folio = 'I-005-000001'
abt_doctoOrig[] = byte array with the content of file sistemaMulti.doc
as_nombreDocOrig = 'sistemaMulti.doc'
abt_docFirm[] = byte array with the content of file sistemaMulti.fir
as_nombreDocFirm = 'sistemaMulti.fir'
as_idProceso = '97'
as_secuencia = null
ab_ultimafirma = true
Message was edited by: Claudia Perez
Thanks Bruce
In this case I created my own method to assign those values, after reading them from app keys on my web.config, so I'm going to keep it this way meanwhile .
"sometimes" not "something" (my post correction)
>>How to call the ItextSharp library from PowerBuilder 12.5.1 Classic code, please provide some
>>sample code where I can see the actual calling syntax. The above projects are using some files
>>(e.g. .PBD, .DLL, .SRX etc ) where I can’t see the actual coding.
PBNI uses C++ code compiled into either a PBX (more common) or DLL (less common) file. The source code for those files is included with each of those samples.
With earlier versions of PB, you needed to run a PBX2PBD utility on the PBX (or DLL) that created a PBD with proxy objects in it. That's where those PBDs are coming from. In more recent versions of PB, you can "import" the PBX (or DLL) directly into an existing PBL and it will just put the proxy objects there.
The SRX objects are created by PowerBuilder's own EJB Client Proxy wizard.
>>How to convert .JAR file as PowerBuilder proxy (.SRX). I have tried using ejb2pb09.exe.
>>But every time generate an error file where mentioned “Class 'converter.srxHome' not found”.
>>For this reason I have tried to up the EAServer, but without knowing the port no (i am putting
>>default port no 9000) I am unable to up the server.
You don't "convert" a jar file to a SRX. You create a java class file that use the war file and then create a proxy to it. Here's a link giving a simple example from Real's How To site.
Any of the sample above (most of them) require that you have your JVM conifgured correctly. The one exception is the PB2DOTNET sample, which uses a .Net version of itext (iTextSharp). It invokes it via PBNI as well though, which seems like a bit convoluted way to do it. I find it easier to call .Net assemblies from PowerBuilder through a COM Callable Wrapper. I created a sample of doing that and put it, along with PB 12.5 versions of those other samples, on my Google Docs drive.
The sample I just created uses a .Net assembly to wrap iTextSharp. It only has one method, encrypt. The assembly was marked COM visible so that we can invoke it via the CCW. The anvil of time website has an article that walks you through the process.
using System; namespace iTextWrapper { public class iTextWrapper { public void encrypt(String orgfilename, String encfilename) { System.IO.Stream input = new System.IO.FileStream(orgfilename, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read); System.IO.Stream output = new System.IO.FileStream(encfilename, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None); iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(input); iTextSharp.text.pdf.PdfEncryptor.Encrypt(reader, output, true, null, "secret", iTextSharp.text.pdf.PdfWriter.ALLOW_SCREENREADERS); } } }
I then ran REGASM on it to create a registry file with the COM entries in it. I modified it so that it had 32 bit entries rather than the 64 bit entries that REGASM automatically created for my 64 bit OS machine. If you are on a 32 bit machine, you'll want to run REGASM yourself to get the appropriate entries. You'll want to specify /codebase because the assembly is not strong signed. Alternatively, you could recompile both iTextSharp and the wrapper to make them strong signed so you could load them in to the GAC with GACUTIL. The registry file that is in the sample has the codebase for the particular location where the assembly is on my machine. You would need to modify that to the specific location on your machine if you wanted to use that registry file.
One the registry file has been imported into the registry, this PowerBuilder Classic code can be used to invoke the encrypt method:
oleobject loo integer li_rc string ls_orgfilename, ls_encfilename string ls_orgpathname, ls_encpathname string ls_extension = "PDF" string ls_filter = "PDF files (*.pdf),*.pdf" IF GetFileOpenName ( "Select PDF file to encrypt", ls_orgpathname, ls_orgfilename, ls_extension, ls_filter ) = 1 THEN IF GetFileSaveName ( "Specify filename for encrypted file", ls_encpathname, ls_encfilename, ls_extension, ls_filter ) = 1 THEN loo = create oleobject li_rc = loo.ConnectToNewObject ( "iTextWrapper.iTextWrapper" ) loo.encrypt ( ls_orgpathname, ls_encpathname ) loo.DisconnectObject() destroy loo END IF END IF
You might try this then:
catch (System.Reflection.TargetInvocationException e1) String excType excType = e1.InnerException.GetType().ToString() choose case excType case "System.ServiceModel.FaultException" System.ServiceModel.FaultException e2 e2 = e1.InnerException System.ServiceModel.Channels.MessageFault fault fault = e2.CreateMessageFault() ls_message = "Clase: uo_bcfeWS, Método: registraUnilateral ~r~n" + "Exception(1): " + fault.Reason.ToString() if (fault.HasDetail) then System.Xml.XmlReader reader reader = fault.GetReaderAtDetailContents() ls_message += " " + reader.Value do while reader.Read() ls_message += reader.Value loop end if case "System.Text.DecoderFallbackException" System.Text.DecoderFallbackException e3 e3 = e1.InnerException ls_message = "Clase: uo_bcfeWS, Método: registraUnilateral ~r~n" + "Exception(1): " + e3.Message case else ls_message = "Clase: uo_bcfeWS, Método: registraUnilateral ~r~n" + "Exception(1): " + e1.Message end choose MessageBox ( "Error", ls_message ) //logError(ls_message) return false
But what that's going to get us back to, at least in this case, is "Unable to translate bytes [F3] at index 0 from specified code page to Unicode."
I can see where you both talk about the history of PowerBuilder. Nothing leaps out at me that would represent plagiarism, and that's a rather significant charge to throw around. Can you point out some portions of the blog post where he's copied your article directly?
Hi Kiran;
FWIW: I assume you mean PB Classic.
A: No, you need the basic control files PBW, PBT, PBL's, PBG, etc files. That is why when I do my final check-in for a prdcution build ... I also ZIP up my PB Application's development folder and manually add that to the SCM as well.
Now with a proper ZIP of the build machine's application folder - all I need to do is do a GET from the SCM on the ZIP to restore a working PB IDE application. Then open the application in the PB IDE and just perform a GetLatest to get me up-and-running (or a new developer) in minutes!
HTH
Regards ... Chris
Hi Hilaire;
Have you stepped through your code using the PB debugger to see which line where it hangs or starts an infinite loop somewhere?
Regards .. Chris
Hi Scott;
Do you have some logging mechanism in your application that you could use to narrow down the area of the code where the last processing takes place before it hangs?
Regards ... Chris
Bruce ... you need some glasses!
The only person who knew about the Canadian Government and how that unfolded was me because I spearheaded that part of the GST project! I was working at Cullinet (Cullinane) with Dave Litwack when he presented it ... I was sitting next to BOD Bobby Orr at the time, etc, etc, etc.
All I'm saying is give credit to the original author.
Yes, it is. You may want to take a look at PowerGen from ECrane, which has an option to build PBLs from source control. That's the technique we use for our production builds, every build is done fresh from a clean pull from source control.
The other approach, one we use to get a new developer started, is to create the development environment from the PBW and PBT files and a pull from source done by OrcaScript. The following is an edited version of one we use to that that (the PBL, PBT and PBW names are all made up). You would just pass a reference to this fine as an argument to the oracascript utility and it would recreate the workspace for you.
start session create library "application.pbl" create library "objects.pbl" create library "windows.pbl" scc get connect properties "application.pbw" scc set connect property logfile "buildfromsource.log" scc set connect property logappend false Scc set connect property deletetempfiles "FALSE" scc connect scc set target "application.pbt" "refresh_all" scc exclude liblist "pbnismtp90.pbd" scc refresh target migrate scc close end session
I ran this section through duplichecker. The only relevant hit it could find was that blog post.
PB became the tool of choice for development after a recommendation made to the Canadian Government. Revenue Canada built GST (Govt. Sales Tax) system that is tracking tax returns to this day. Most Canadian departments use PB for mission-critical systems ranging from those that scan your license plate when you drive into Canada, scanning of your passport, to critical interfacing with Canadian runway and radar system (a 24×7 operation). The list of applications is quite large many still in use today. Other applications are the Old Age Pension (developed in 2002), Case Logging for the Supreme Court & Tax Court of Canada, Firearms Registration System, UN Troop Deployment, Security Clearance System, and Federal Election support systems. An independent study compared performance of one of their systems written in PB v.s. Visual Basic and the PB one performed 4000% faster. Maybe Canadians are smarter than us Americans’ and not so eager to use a tool (e.g. Java, .Net) just because it is the new buzzword, or the latest fad.
You might want to check the definition of term plagiarism. While you're at it, you might check out the term libel as well.
Hi,
I am in the process of converting an old large PB
application.
-converted to PB12.5 classic works great!
-when converting to
PB.net (most of the stuff works perfectly!) wpf I am
getting an error in
Opensheetwithparm function.
An exception of type
'System.Reflection.TargetInvocationException'
occurred in
Sybase.PowerBuilder.Common.dll but was not handled in user
code
Then I
changed to OpenwithParm. I got the same error
The window has 8 tab
pages.
Let me know any one has more information on how to fix this. The
same
opensheetwithparam works in other places.
you can reply to rameshbas@yahoo.com