You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Peoplesoft : How can I get an jpg file from app server and store it in database ?

4 replies [Last post]
Guest's picture
Guest

I am trying to get an image (JPG file) from app server and store it in out database. I need to do it using an application class peoplecode as further I need to create a webservice to pass that image further to a 3rd party application.

Kindly Suggest a way !

Bhumika

Guest's picture
Guest (not verified)
Re: Peoplesoft : How can I get an jpg file from app server ...

Kindly Help asap !

Ashar's picture
User offline. Last seen 1 year 46 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Peoplesoft : How can I get an jpg file from app server ...

Though I haven't worked with images, I think you can use the file attachment function putattachment for storing the file into database record and retrieve using getattachment.

I dont understand what is meant by passing the image as webservice. Did you mean sending the image URL via web service?

Guest's picture
Guest (not verified)
Re: Peoplesoft : How can I get an jpg file from app server ...

Hi
Thank you for the reply.

Yes. I mean I need to pass the image URL, (the way it is stored in database - BLOB format) via a webservice to a 3rd party application.

I am using putattachment with the following syntax.

RETCODE = PutAttachment("RECORD://EMPL_PIC_BK", "Pic1.JPG", "D:/PSHOME/hrrnd91/IMAGE/Pic1.JPG");

which gives me following error while running the webservice:


Integration Broker Response
20
10421
File Attachment Status-File transfer failed, Return Code is 9. Please refer to PeopleCode Reference for Return Code description. Search for AddAttachment function. (0,0) MD_MG_TST.MD_IMG_TST.OnExecute Name:onRequest PCPC:1376 Statement:23 (0,0)

Bhumika

Ashar's picture
User offline. Last seen 1 year 46 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Peoplesoft : How can I get an jpg file from app server ...

Return Code 9 is "File Not found" error. Please make sure the file is there in the specified path. Make sure to give \ in the path instead of /.

Also make sure that the file resides on App server.

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
1 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.