tag:blogger.com,1999:blog-34020393.post3784321324008132312..comments2024-03-27T10:59:38.307-07:00Comments on Jim's PeopleSoft Journal: Base64 Encoding for PeopleSoftJim Marionhttp://www.blogger.com/profile/12995110203807924786noreply@blogger.comBlogger67125tag:blogger.com,1999:blog-34020393.post-12242904984906082562024-02-13T22:42:35.898-08:002024-02-13T22:42:35.898-08:00@Jim Hi Jim Is there are any possible way to get t...@Jim Hi Jim Is there are any possible way to get the http URL of a stored file (database or SFTP), like when we hit view attachment function by giving file location and file name it generates a http URL and open it into new window. How can I achieve this because I want to open a PDF file into a page using HTML Area and HTML Iframe that's why I need src of http type for passing in IFrame .<br /><br />or is there any other way to do this "I want to open a PDF file into a page using HTMLArea and HTML Iframe"<br /><br />Thank you.Top10+https://www.blogger.com/profile/15436421776211068505noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-64119411485725140612021-02-11T16:16:42.364-08:002021-02-11T16:16:42.364-08:00@Ketan, Great find!@Ketan, Great find!Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-8117406853346364142021-02-04T13:46:24.526-08:002021-02-04T13:46:24.526-08:00There is a sample peoplecode delivered in App engi...There is a sample peoplecode delivered in App engine program used by Search engine indexing. It is PTSF_GENFEED -> Setup -> Step04 – PeopleCode<br /><br /><br /> Local JavaObject &header = CreateJavaObject("java.lang.String", &esuser | ":" | Decrypt("", &espass));<br /> Local JavaObject &oEncoder = CreateJavaObject("com.peoplesoft.tools.util.Base64");<br /> &auth = &oEncoder.encode(&header.getBytes());<br /> &auth = "Authorization: Basic " | &auth;<br /><br />You can also find references of delivered peoplecode using base64 using below SQL<br /><br />select * from pspcmtxt where upper(PCTEXT) like '%BASE64%';Ketan Kotharihttps://www.blogger.com/profile/17459077644208180243noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-2296979811743815262021-01-22T08:40:30.494-08:002021-01-22T08:40:30.494-08:00Hi Jim,
Hope you are doing good.
I am facing an ...Hi Jim,<br /><br />Hope you are doing good.<br /><br />I am facing an issue by passing '&' or '%26' or char(38) in viewcontenturl() as it converting %26 as %2526 in URL.<br /><br />My requirement is to view the content of the below url as example.<br />https://google.com/Browse.aspx?repo=DEMO#?search=({[]:[Business Unit] = "USA"} & {[]:[Voucher ID] = "123456"}) <br /><br />Please help.Prasannababu Dhttps://www.blogger.com/profile/13179265218816992277noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-45499692865528563732020-07-06T00:58:05.139-07:002020-07-06T00:58:05.139-07:00For the base64 encoding/decoding. You can also ref...For the base64 encoding/decoding. You can also refer to that link as well<br /><a href="https://url-decode.com/tool/base64-decode" rel="nofollow"> url-decode.com/tool/base64-decode</a>Sandrahttps://www.blogger.com/profile/01168214739469610440noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-33068942697681650822018-11-15T21:37:19.764-08:002018-11-15T21:37:19.764-08:00@Govi, Generally speaking, integrations use plain ...@Govi, Generally speaking, integrations use plain text. If that is the case, then you will be converting your binary attachment to base64 for submission.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-91619759978208622732018-06-27T10:12:17.888-07:002018-06-27T10:12:17.888-07:00Jim ,
We have a requirement where we have attachm...Jim , <br />We have a requirement where we have attachments in the database and should be sent to a third party system using integration broker rest services.<br />I am looking for ideas on how to convert an attachment in a data base into Binary format and then insert into a message and publish. <br />Any help is appreciated.<br />Anonymoushttps://www.blogger.com/profile/03895723939820327386noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-21145503801060816932018-01-26T22:25:24.253-08:002018-01-26T22:25:24.253-08:00@Allen, by encoded, do you mean gzip compressed? g...@Allen, by encoded, do you mean gzip compressed? good question and thought on the size. It has been a while since I've dug around in there, so nothing is coming to mind, but that could be true. I'm not sure if PS can be configured to treat this correctly. If it can't, my thought is to use a ServletFilter or some other proxy service to inflate. Not ideal, but possible.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-31856424206041968422018-01-26T11:25:14.146-08:002018-01-26T11:25:14.146-08:00Hi Jim,
I saw in one of the comments that IB auto...Hi Jim,<br /><br />I saw in one of the comments that IB automaticaly converts long data field into base64. Is it application if my entire xml (created through string) is large. <br /><br />I am using REST consumer based services. We are sending an XML response to third party. XML But the entire data gets encoded for some reason. Its happening for only one scenario, lets say an invoice.<br /><br />I noticed in the IB logs that the data is being encoded. <br /><br />Y<br /><br />I have set the HEADER property sendUncompressed as Y but its still getting compressed for some reason.<br /><br />The service works fine for other invoices. The data being sent for this invoice is large as compared to others. I am not sure if thats the issue.<br /><br />Regards,<br />AllenAllen Kuruvillahttps://www.blogger.com/profile/00205788593917467297noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-79213551184195964632017-09-13T07:37:51.968-07:002017-09-13T07:37:51.968-07:00I don't see any reason it wouldn't work. O...I don't see any reason it wouldn't work. Other people say it should work: http://www.greyheller.com/blog/passing-additional-parameters-to-peoplesoft-pages/. Here is someone that had the same problem as you: http://peoplesoft.ittoolbox.com/groups/technical-functional/peopletools-l/requestgetparameterparm-returns-blank-5235694.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-67314491211565031652017-09-13T02:23:38.634-07:002017-09-13T02:23:38.634-07:00Hey Jim,
Thank you for the response.
I can see th...Hey Jim,<br /><br />Thank you for the response.<br />I can see the parameter in the URL but when I cant be fetched from %request. I have tried % request on Rowinit, postbuild and page activate as well but nothing seems to work.<br /><br />Example of my URL is like below,<br /><br />https://hostname/psp/pscrmacc/EMPLOYEE/CRM/c/component.GBL?FolderPath=PORTAL_ROOT_OBJECT.serachpage&IsFolder=false&IgnoreParamTempl=&emplid=&job_code=&name=&cust=&id=1234&phone=0000<br /><br />and i need to fetch phone value on my page. I am not sure if the phone should be mentione in uppercase(if it something to do with the case).<br /><br />What i am trying to fetch the phone number is <br /><br />event : component post build<br />global string &phone;<br />&phone=%request.getparameter("phone");<br />and when I print phone number it has blank values.<br />Apart from the above code do we do something else too?<br /><br />when I check PeopleTools > Portal > General Settings , the default template name is 'Default template'.<br /><br /><br />and under Portal Objects > Templates the default template has storage type as'Remote by URL'<br /><br />Appreciate your help.<br /><br />Thank youAnonymoushttps://www.blogger.com/profile/11225462914180440226noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-60011275260772401472017-09-12T08:17:17.057-07:002017-09-12T08:17:17.057-07:00@Kavita, that is unusual. Usually all parameters f...@Kavita, that is unusual. Usually all parameters flow through to the component. Can you see the parameters in the URL in your browser when the component loads? If you look at the components iframe URL using the browser's inspector tool, can you see the parameters? Are the parameters lost as the user moves through the login page?Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-44084101957256027312017-09-12T04:16:53.443-07:002017-09-12T04:16:53.443-07:00Hello Jim,
I have a requirement where user from o...Hello Jim,<br /><br />I have a requirement where user from other system are navigated to PS and login. The URL has been given 2 extra parameter when PS page load based on the parameter value i need to calculaion in PS but I am not able to fetcj the URL parameter on component peoplecode.<br /><br />I have tried %request.getparameter but this does not work<br />Anonymoushttps://www.blogger.com/profile/11225462914180440226noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-67224446169801135332017-07-07T09:23:18.694-07:002017-07-07T09:23:18.694-07:00@Ryan, that is really interesting. Just for fun, I...@Ryan, that is really interesting. Just for fun, I tried an online <a href="https://www.base64decode.org/" rel="nofollow">base64 decoder</a>. Both of them show AB with a new line in between. What I didn't check is the new line character. As you know, a new line may be represented by a carriage return or a line feed or both. I'm suspicious that the difference you are seeing is caused by differences between the new line characters.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-6088791663169892602017-07-07T06:15:28.333-07:002017-07-07T06:15:28.333-07:00Hi Jim,
I tried UTL_ENCODE.BASE64_ENCODE solution...Hi Jim,<br /><br />I tried UTL_ENCODE.BASE64_ENCODE solution above but the said result has different output when values has carriage return compare to available Base64 encoders online. I am not sure now if the encoded values is even correct.<br /><br />SELECT UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.BASE64_ENCODE(UTL_RAW.CAST_TO_RAW(<br />'A<br />B'<br />))) FROM dual;<br />Result: QQpC<br /><br />Online Encoders Result: QQ0KQg==<br /><br />I noticed the result is already different from running UTL_RAW.CAST_TO_RAW. Maybe the cast to raw has different encoding on carriage return or line feeds?<br /><br />I tried implementing the %textin and still has a different result.<br /><br />The Peoplesoft encryption technology has the same result: QQcP<br />Algorithm Chain: <br />PSUnicodeToAscii<br />base64_encode<br />PSAsciiToUnicode<br /><br />The encoding base64 result we are expecting is what the online encoders are generating.<br /><br />PLease advise. thanksAnonymoushttps://www.blogger.com/profile/09373313269202194573noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-38197089002209585232017-01-23T01:45:07.559-08:002017-01-23T01:45:07.559-08:00I was able to resolve- was a java issue - cipher c...I was able to resolve- was a java issue - cipher code needed to be within a try-catch..works like a charm now!!<br /> <br />Thanks Jim as always...<br /> <br />VikasVikas Bhartiyahttps://www.blogger.com/profile/12858712530623723851noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-61366565351156480092017-01-22T17:42:05.724-08:002017-01-22T17:42:05.724-08:00Hi Jim,
I have just posted a question on OTN, but ...Hi Jim,<br />I have just posted a question on OTN, but thought to put this to you as well..<br /><br />https://community.oracle.com/thread/4009757<br /><br />The requirement is to do AES/CBC/NoPadding encryption - and I have written a java class for it which throws "NoSuchAlgorithm" found exception (details of the code and the error in the link above).<br /><br />My Tools version is rather old - 8.50.18 and the java version seems to be java 6, update 15. <br /><br />I am wondering if it is my code or the java version and what are my options :(<br /><br />VikasVikas Bhartiyahttps://www.blogger.com/profile/12858712530623723851noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-67553237853374935632016-06-16T18:07:14.419-07:002016-06-16T18:07:14.419-07:00I was more keen in doing this using SQLSERVER for ...I was more keen in doing this using SQLSERVER for converting String into Base64<br /><br />%NoUppercase SELECT CAST(N'' AS XML).value('xs:base64Binary(xs:hexBinary(sql:column(""bin"")))', 'VARCHAR(MAX)') Base64Encoding FROM (SELECT CAST( AS VARBINARY(MAX)) AS bin) AS bin_sql_server_temp<br /><br />Chandra Selagamsettyhttps://www.blogger.com/profile/02229627742363855783noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-61540673789597392022016-06-10T07:55:17.170-07:002016-06-10T07:55:17.170-07:00Hi Jim,
Thanks for all the information which you ...Hi Jim,<br /><br />Thanks for all the information which you are providing through your blogs.<br />I was trying to encrypt data using Asymmetric encryption.The SSL being not implemented with Peoplesoft we are not able to generate public and private key using OPENSSL utility.<br />Please let me know if there is any way to generate Public and Private keys for Asymmetric encryption if we dont have SSL implemented.Thanks.Anonymoushttps://www.blogger.com/profile/14322620534945214286noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-13345730792478130622016-03-24T09:53:20.488-07:002016-03-24T09:53:20.488-07:00@Naveen, it sounds like the GetJavaClass approach ...@Naveen, it sounds like the GetJavaClass approach is the correct one. The "More than one overload matches" error tells you that the method you are calling has multiple definitions with different parameters and PeopleCode can't decide which one to use based on parameter count and parameter type. You have three alternatives, and all are demonstrated on this blog:<br /><br />#1 Use reflection. This is the ugliest and hardest approach.<br /><br />#2 Write your own Java wrapper/proxy that invokes the overloaded methods, but does so using method names that are not overloaded. This is the easiest approach, but requires you to maintain custom Java and restart the app server if you have to redeploy your Java.<br /><br />#3 Use JavaScript on the server. This involves writing a JavaScript fragment that uses iText and then running that JavaScript from PeopleCode. I have at least one example on this blog and other examples in my last 2 years of OpenWorld/Collaborate/Alliance presentations. This is the easiest to maintain, but is a little harder to comprehend than #2. I think it is definitely easier than #1.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-85376528663800678172016-03-22T20:48:44.531-07:002016-03-22T20:48:44.531-07:00Hi Jim,
If have been trying to extract the content...Hi Jim,<br />If have been trying to extract the contents form a pdf documents using the jar file itextpdf-5.1.0.jar and the class<br /><br />com.itextpdf.text.pdf.parser.pdfTextExtractor , but whenever i use this class it throws the message as matching constructor is not public .<br /><br />if i user getjavaclass(com.itextpdf.text.pdf.parser.pdfTextExtractor) and use the getTextFromPage it throws the message as no overload matches.<br /><br />can you help me in bypassing and understanding this errorrs.<br /><br />Iam able to read the file with PDFREader but extraction is creating a problem.<br /><br />Need ur advise in how to overcome this problemNaveenhttps://www.blogger.com/profile/02375761605220975474noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-42580079067065749762016-02-26T18:44:57.666-08:002016-02-26T18:44:57.666-08:00I do not have an easy fix. If you look through the...I do not have an easy fix. If you look through the posts on this site and other sites, you will see samples of Java reflection in PeopleCode as well as an example of using JavaScript to avoid reflection.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-13396259773602280092016-02-26T18:44:50.666-08:002016-02-26T18:44:50.666-08:00I do not have an easy fix. If you look through the...I do not have an easy fix. If you look through the posts on this site and other sites, you will see samples of Java reflection in PeopleCode as well as an example of using JavaScript to avoid reflection.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-22341216689448053942016-02-26T09:39:46.808-08:002016-02-26T09:39:46.808-08:00Hi Jim I am new to Java and the like. There is a ...Hi Jim I am new to Java and the like. There is a delivered piece in BAC030 AE that calls for FileInputStream. The code is as below. I understand that the overload in this case is at fileinputstream. I am just stuck not knowing how to get past. Would you know a simple fix. <br /><br />Local JavaObject &jFile = CreateJavaObject("java.io.File", &1094C_FullPath);<br />Local JavaObject &jFileReader = CreateJavaObject("java.io.FileInputStream", &jFile);<br />Local JavaObject &messageDigest = GetJavaClass("java.security.MessageDigest").getInstance("MD5");<br />Local JavaObject &jByteArray = CreateJavaArray("byte[]", 1024);<br />/* Read Input File Byte by Byte */<br />Local number &jByteCount = &jFileReader.read(&jByteArray);<br />While &jByteCount > 0<br /> &messageDigest.update(&jByteArray, 0, &jByteCount);<br /> &jByteCount = &jFileReader.read(&jByteArray);<br />End-While;Unknownhttps://www.blogger.com/profile/14985221797326966948noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-60713965002458999332015-04-27T07:31:11.527-07:002015-04-27T07:31:11.527-07:00@Vinod, I have no experience with column encryptio...@Vinod, I have no experience with column encryption. You will get better answers to this question if you post it on the <a href="https://community.oracle.com/community/oracle-applications/peoplesoft_enterprise/peoplesoft_general_discussion" rel="nofollow">OTN PeopleSoft General Discussion forum</a>.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.com