Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments with Service Pages for SD5.0

SOLVED
Go to solution
Highlighted
Pai
Collector

Attachments with Service Pages for SD5.0

Hi All,

I know this topics has been there in the forum for quite some time and there are lot of threads discussin this, but most fo these threads end with the attachment code. the lost helpful ones are below:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1079347
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1075245
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=953166

these threads do not give instructions on how to use this solution.

What i need is instruction on how to use this file. I am on SD5.0P2 on HP UX, i have the createservicecall.jsp with attachements. this is wat i did:-
1. stopped apache and tomcat services
2. Replaced the original createservicecall with the new one
3. Restarted the apache and tomcat.

still my service page doesnt reflect the change, i know i am missing something here.

i have the detaield solution document for 4.5 SP with attachments which explains how to go about do it. but 4.5 install directory is different from 5.0 and am not able to match the instructions with 5.0.

I am wandering if anyone has done this on 5.0 and if anyone has any solution document which i could use...and am not a java/jsp guys so i defnetly need help here.

any help on this will be greatly appreciated and ofcourse points too..

thanks in advance.
paina


20 REPLIES
FXCISD
Collector

Re: Attachments with Service Pages for SD5.0

Paina,

Are you able to see the replaced page? or You are able to see the replaced page but the functionality is not working???

Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi thanks for responding,

I have tried two things:

1)I have only replaced the createservicecall.jsp file with the one with attachement but i ened up seeing the same old page. Then i deleted the works folder, restarted tomcat and apache, this time it gave me all the java errors when i click on new service call.

2) i followed the 4.5 solution for the 5.0, where i need to do couple fo things like download the jspsmartupload and adding folder classes in to the service pages folder in the install directory and then replacing the the createservicecall.jsp file . here again i get errors

i am actually lost now, can u give me some pointers. as to how i should go and wat i am missing

thanks pai
Pai
Collector

Re: Attachments with Service Pages for SD5.0

May be the createservicecall.jsp i am using is for 4.5. Can i use the same jsp for 5.0 if not can anyone gimme the jsp for 5.0 and tel me how and where to use in order to have the attachement funtionality.
Pai
Collector

Re: Attachments with Service Pages for SD5.0

May be the createservicecall.jsp i am using is for meant for 4.5 only. Can i use the same jsp for 5.0 if not can anyone gimme the jsp for 5.0 and tel me how and where to use in order to have the attachement funtionality.
Nirad
Regular Collector
Solution

Re: Attachments with Service Pages for SD5.0

Hi Paina,

I have modified the code sent by you from SD SP 5.0 to include attachement option.

As i don't have 5.0 installed i can not cross check the API names and path so i am attaching word format file.

In this file i have colored the code i entered and red colored code import statement you have to cross check if and only if it gives error.

Cheers,
Nirad
Nirad
Regular Collector

Re: Attachments with Service Pages for SD5.0

I forgot to tell you just copyy this entire code to your createservicecall.jsp and it should work. If not send me the snap shot.

Please run the service pages on SD application server for initial test.
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Nirad,
Thanks for the quick reply , i will try out this here today.

I have setup a test environment, over the weekend, will try this and come back to u.

thanks again.
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Nirad,

I replaced the CreateServiceCall.jsp with the one u sent me. I did generate errors, kindly find attached error for your reference.
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Nirad,
I replaced the createservicecall.jsp with wat u ve sent. and it generated the attached error.

the error comes up when i select New service call. SO the serivce pages is opening, i can login, it gives me the menu items, then i select service call, it gives me views and and create new item, when i select new service call it throws te attached error.
Nirad
Regular Collector

Re: Attachments with Service Pages for SD5.0

Hi Paina,

As i told you before this error is because of interfaces location and wrong import. Please put sd instead if cdm in following code.

You can see below import statement in red colored font in the code sent by me before.

Please do this change and see. it should reduce the bug and send me the snapshot again.


<%@ page import="com.hp.ov.webapi.cdm.IAttachedItemHome" %>
<%@ page import="com.hp.ov.webapi.cdm.IAttachment" %>
<%@ page import="com.hp.ov.webapi.cdm.IAttachmentHome" %>
<%@ page import="com.hp.ov.webapi.cdm.ILifeCycleObject" %>
<%@ page import="com.hp.ov.webapi.cdm.IAttachedItem" %>
<%@ page import="com.hp.ov.webapi.cdm.IEntityInfo" %>
<%@ page import="com.hp.ov.webapi.cdm.IEntityInfoHome" %>
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Nirad,
As per your instruction i replaced 'cdm' to 'sd' in the code which was colored in red and then restarted the services, deleted the works folders and then started ServicePages and still have error, kindly find the error snapshot attached.

Further when i had doneattachments in 4.5SP, i had to add some folder called 'classes' from the JSPSMARTUPLOAD in to the install directory. Is it not required to do that here 5.x ??

Also the install directory structure in 5.x is different compared to 4.5 (please find attached screen shot of the install directory structure )

regards Paina
Nirad
Regular Collector

Re: Attachments with Service Pages for SD5.0

Hi Paina,

The solution didn't reduce the error, it is still showing 17 errors.

Conclusion: the interfaces names ae changed in 5.0 web api and that is why it is not able to recognize it.

e.g

cannot resolve symbol
symbol : class IAttachedItemHome
location: package sd
import com.hp.ov.webapi.cdm/sd.IAttachedItemHome;
^

Solution: Please go to javadoc of web-api 5.x and see the correct name of all the interfaces

see the attached snapshot of 4.5 sp javadoc index.html page
Nirad
Regular Collector

Re: Attachments with Service Pages for SD5.0

Further to your question: i don't think any folder installation or copy is required to run this.

It is the problem with API name only.
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Nirad,
Thnaks for the support,

I found that the location was 'obs' instead of 'sd' or 'cdm'. Now the errors have reduced to 5 from 17. these errors are a bit different.

i have attached the snap shot of the error...can u direct me how can i go forward .

Thanks a lot.
regards Pai
Venkatesha_1
Esteemed Contributor

Re: Attachments with Service Pages for SD5.0

Hi,

If you use any of the Java GUI for developing then you can solve this issue with ease.

Use Eclipse GUI, with this you can select the packages automatically.

Regards
Venkatesha
Mohammed Albust
Collector

Re: Attachments with Service Pages for SD5.0

I used the same method as Paina did and got the attached errors. Can anyone help?
Pai
Collector

Re: Attachments with Service Pages for SD5.0

Hi Venkatesha,

Thanks for the advice, i have downloaded eclipse, but i aint no java/jsp guy so i do not understand how to use this ??.. if you could help me with this or give me any pointers that will greatly apppreciated,

thanks a ton.

paina
Nirad
Regular Collector

Re: Attachments with Service Pages for SD5.0

Hi Paina,

I am back after long time. I was not able to open attachment sent by you.

Now i am able to see the attachment with 5 errors.

i think that we are very near to the solution.

Out of 5 errors 3 erros are same as shown below

cannot resolve symbol
symbol : method sd_session ()
location: class com.hp.ov.sd.sp.beans.SdClientBean

You have to find out the correct method from javadoc to get session of servicecall home.

Try using getSession() instead of sd_session()

See the explanation for remaining two errors.

1. symbol : variable sc_oid
location: class org.apache.jsp.CreateServiceCall_jsp
item = scHome.openServicecall(sc_oid);
^
Please check that sc_oid variable is declared into your page and initialize or not.


2. cannot resolve symbol
symbol : method addAttachedItem (com.hp.ov.webapi.obs.IAttachedItem)
location: interface com.hp.ov.webapi.obs.IAttachment
att.addAttachedItem(nItem);

same again. Check the correct method name from javadoc as it is not recognizing addAttachedItem ()

Hope this will help.

Cheers,
Nirad
ah12
Super Collector

Re: Attachments with Service Pages for SD5.0

Hello,

A bit late on this topic.Iam not a Jsp/java person & struggling with SP attachments.
We are using SD 5.1 version & the CreateServicecall.jsp posted here is working fine for attachments on SD app server.However,i want to know what modifications do i need to make to CreateServicecall.jsp & saveservicecall.jsp in order to accept attachments from user end.

Any help on this will be greatly appreciated .

Thanks in advance,
Aseeya.
ah12
Super Collector

Re: Attachments with Service Pages for SD5.0

Hello All,

Awaiting any help....

Thanks,
Aseeya.
//Add this to "OnDomLoad" event