on 03-13-2007 1:32 PM
Hi All,
I want to perform these functions in EP through a WD Application:-
1)Storing an Image in EP's KM.
2)Creating a task in a UWL which have a WD url Iview (created earlier) and a reference link to the above image.
3)Assigning the task to a user.
Please reply soon. Points assured for replies even!
Sumit
Hi ALL,
i am waiting for replies!
There must be some APIs or any other way to handle EP through WD Code.
Please help!
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I have changed the path and the problem is solved.
Thanks for your replies.
Please provide me help for :
2)Creating a task in a UWL which have a WD url Iview (created earlier) and a reference link to the above image.
3)Assigning the task to a user.
That is my question number 2 and 3.
Please reply soon!
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai ,
/people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis
reagards,
naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lee,
Please elaborate where do i need to change?
I have NWDS 7.0
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right click on project and click properties.
Go to Java Build Path then click LIbraries Tab
you should see red icons on the broken libraries
dbl click on each entry.
when the file browser comes up navigate to the correct jar.
should be in the same basic place but they changed the names a little by adding to the end.
click open
repeat for all of the broken libs.
Lee
Hi ,
In NWDS , if you looks at the tasks section it would list you the missing jars with the path it is looking for. It is IDE installation folder /eclipse/plugins/ jar file folder..
Usually these folders will exist with incorrect suffix like _2.0.0 where the studio looks for one without this suffix.
You can copy the folder and rename to solve this issue . Or , go to project properties , build path , remove jars which have a warning icon and instead add the folders with suffix from plugin folder..
Regards
Bharathwaj
Ladislav,
I have downloaded the project specified in the pdf you have mentioned but it has many import errors .
I think i need some .jars.
You said you have a similar situation can you please guide me.
Please reply soon.
Thanks,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ladislav,
Thanks a lot for your solution.
Please share any more information if you have regarding other questions.
Hi All,
Please provide me help!
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Regarding questions 2) and 3) maybe you should look at some of the classes here:
https://help.sap.com/javadocs/NW04S/current/uw/index.html
I don't have experience in using uwl from web dynpro so I can't help you with
this one. Maybe some other pro tries ?
Hope it helps
Take care
Ladislav
Hi,
I'll answer to question one, because I have solution at hand.
First you need to upload it using FileUpload control and then you can read data as byte[]. Please follow this tutorial for example: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f5d3c40a-0801-0010-55b7-9e3b0174...
Then you can call the below function (modify it to suit your needs - you'll need to add checking if destination file already exists in the KM):
private void savePhoto(
byte[] photoData, // contents of the photo
String photoName, // file name under which it should be saved in km
String mimeType, // if you don't know correct type, you can use "image/jpeg", it should work
String folder) // for example "/documents/Pictures"
throws PhotoException
{
try
{
IUser user = WPUMFactory.getUserFactory().getEP5User(UMFactory.getUserFactory().getUserByLogonID(noticeBoardService));
IResourceContext context = new ResourceContext(user);
IResourceFactory resourceFactory = ResourceFactory.getInstance();
RID rid = RID.getRID(folder);
if (!resourceFactory.checkExistence(rid, context))
{
throw new Exception("Folder " + folder + " doesn't exist!");
}
ICollection collection =
(ICollection) resourceFactory.getResource(rid, context);
InputStream inputStream = new ByteArrayInputStream(photoData);
IContent content =
new com.sapportals.wcm.repository.Content(
inputStream,
mimeType,
photoData.length);
collection.createResource(photoName, null, content);
}
catch (AuthorizationRequiredException e)
{
throw new PhotoException(e.getLocalizedMessage());
}
catch (NotSupportedException e)
{
throw new PhotoException(e.getLocalizedMessage());
}
catch (AccessDeniedException e)
{
throw new PhotoException(e.getLocalizedMessage());
}
catch (ResourceException e)
{
throw new PhotoException(e.getLocalizedMessage());
}
catch (Exception e)
{
throw new PhotoException(e.getLocalizedMessage());
}
}
Regards
Ladislav
PS. Please consider rewarding helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.