Search a file in KM using a custom coding using KM APIs
Hi,
How can I search a file along with its verions in the KM repository using KM APIs?
Thanks,
Vamshi
Hi Vamshi,
maybe you could use the following Interface:
http://help.sap.com/javadocs/nw04s/current/km/com/sapportals/wcm/repository/manager/IPropertySearchManager.html
It has a method
execute(IQueryExpression query, IResource resource, int depth, int maxResults, boolean includeVersions)
which returns a IResourceList.
I hope this helps.
Regars,
Tanja
Similar Messages
-
Uploading a file in KM using KM API
Hi,
How to upload a file into KM using KM API.
Regards
MQHi,
Pls go thru the below code.
public static final String uptoKm(com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource resource){
try {
ResourceContext contex= new ResourceContext(WPUMFactory.getUserFactory( ).getEP5User(req.getUser( )); );
IResourceFactory factory = ResourceFactory.getInstance();
RID rid = RID.getRID(PATH);
ICollection folder = (ICollection)factory.getResource(rid,contex);
Content content = new Content(resource.read(true),"byte",-1);
folder.createResource(resource.getResourceName(),null,content);
return resource.getResourceName();
} catch (NotSupportedException e) {
e.printStackTrace();
} catch (AccessDeniedException e) {
e.printStackTrace();
} catch (ResourceException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
Above method accept parameter of resource and return file name on sucessfully uploaded.
best regards
Hari. -
How do I upload an XML file to salesforce using BULK API?
Hi There,
Please let me know how do we upload an XML file to salesforce using Bulk API?
Thanks,
ETHi,
I think that this is a more SalesForce.com question and think you will have more chance looking at SOAP API Developer's Guide for salesforce. Sending a SOAP request from the API Server is very straight forward and there are several tutorials and well documented about this.
Cheers,
Stefan -
Combining files in php using the api
I am trying to automate the process of cobining multiple tiffs into pdfs using the iac api.
I keep getting a call to member function on a non-object error if any of you could see why this error is happening or sugest a better way to solve the problem I would greatly appreciate it
$AdobeApp = new COM("AcroExch.App");
$AVDocument = new COM("AcroExch.AVDoc");
$PDDocument = new COM("AcroExch.PDDoc");
$file = 'c:/test.pdf';
$create = $PDDocument->Create();
echo $create . chr(10) . chr(13);
$combo = 'c:/0013947320101071-705666408_4-97.tif';
$insert = $PDDocument->InsertPages(0,$combo);
echo $insert . chr(10) . chr(13);
$npages = $PDDocument->GetNumPages();
$combo = 'c:/0013947320101071-705666408_1-94.tif';
$PDDocument->InsertPages($npages -1,$combo);I guess I missed that part of the documentation. I've gone through the documentation a good deal of times and can't find anything other than that that would be useful. Do you have any suggestions? Have I missed something? Is it possible to combine tiffs into a pdf using the api?
-
Indexing and Searching pdf files which are used as attachment in an Announcemnet list item
Hi all,
I am using a SharePoint 2013 online environment and trying to search and find pdf files which are attached to a announcement list item. However it does not find anything when I search for the name of the pdf file or the content of the pdf file.
When I attach a word to the list item it gets indexed and it find the file.
thanks and appreciate every kind of advice.Are you able to search for pdfs in other locations? SharePoint 2013 comes with an iFilter out of the box unlike 2010 which needed configuration.
-
Error adding file type item using portal api
We are using portal 3.0.8.
I can add text and url type items fine but when i try to add a file type item, i get following error.
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: relative
pathnames are not allowed(c:/abc.txt)
ORA-06512: at "PORTAL30.WWSBR_API", line 24
ORA-06512: at "PORTAL30.WWSBR_API", line 272
ORA-06512: at line 4
Please help.
Thanks
nullManoj,
Please try to define a reproducible test case. Is this happening in all content area? Is it happening with all files, or only particular ones? What platform are you running on? What version of the database are you using?
Have you checked your repository for invalid objects? If any exist, please try to recompile them.
Thanks,
Jerry -
Creating formatted search using DI API
Dear All,
Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
Regards,
Noor HussainYes, it is possible. Look for the FormattedSearches object in SDK.
-
SSL error using Neutron API and CLI directly on controller nodes
VIO 1.0 + NSX + vSphere 6.0
I am trying to execute the following segment of code:
139 credentials = get_credentials()
140 neutron = client.Client('2.0',
141 username=credentials['username'],
142 password=credentials['password'],
143 auth_url=credentials['auth_url'],
144 tenant_name=credentials['tenant_name'],
145 endpoint_url=credentials['url'],
146 token=credentials['token'],
147 insecure=True)
148 response = neutron.list_ports()
When I run the Python script, it errors out with the following:
Traceback (most recent call last):
File "getMACAddr.py", line 148, in <module>
response = neutron.list_ports()
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 111, in with_params
ret = self.function(instance, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 306, in list_ports
**_params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1250, in list
for r in self._pagination(collection, path, **params):
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1263, in _pagination
res = self.get(path, params=params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1236, in get
headers=headers, params=params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1221, in retry_request
headers=headers, params=params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1156, in do_request
resp, replybody = self.httpclient.do_request(action, method, body=body)
File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 192, in do_request
**kwargs)
File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 148, in _cs_request
raise exceptions.SslCertificateValidationError(reason=e)
neutronclient.common.exceptions.SslCertificateValidationError: SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
The /var/log/neutron/server.log file has the following corresponding entry for when the script tries to make the connection:
2015-04-11 07:17:31.941 2096 INFO neutron.wsgi [-] (2096) accepted ('10.27.16.164', 34495)
When I run the CLI from the same controller node, I get the error with or without the —insecure flag:
root@controller02:/tmp# neutron port-list
SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
root@controller02:/tmp# neutron --insecure port-list
SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
If I run the neutron CLI command from my local Macbook Pro, it works just fine. That leads me to believe it is a communication error when the controller node tries to talk to itself. I have tried setting the OS_AUTH_URL and OS_URL to both the localhost IP and the 10-network IP address -- both result in the same error.
Any ideas?
ChrisHello Chris,
Thanks for checking out VMware Integrated OpenStack and for sharing your concern.
By default, VMware Integrated OpenStack uses a self-signed certificate, which will require the use of the OS_CACERT environment variable in your openrc file and when using the API.
The better way to resolve this is to use a CA-signed certificate. Fortunately, VMware Integrated OpenStack makes the CSR generation and signed certificate import process very easy.
If this is production, of course, use a trusted Root CA. If this is a Dev Lab, you can generate your own Root CA certificate and use it for testing.
I wrote up a quick blog post on how to do this.
Let us know if you have any further questions.
Regards,
Trevor -
How to export book pdf using custom presets for all book files in indesign using javascript
How to export book pdf using custom presets for all book files in indesign using javascript.
Hi jackkistens,
Try the below js code.
Note: you can change your preset name in below (e.g, Your preset name).
var myBook = app.activeBook;
myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
example:
var myBook = app.activeBook;
myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
thx,
csm_phil -
How to search for files using wildcards * and ?.
Hi All,
I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
ThanksHi All,
First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
Enjoy
* File Name: WildcardSearch.java
* Date: Jan 9, 2004
* This class will search all files in a directory using the
* asterisk (*) and/or question mark (?) as wildcards which may be
* used together in the same file name. A File [] is returned containing
* an array of all files found that match the wildcard specifications.
* Command line example:
* c:\>java WildcardSearch c:\windows s??t*.ini
* New sWild: s.{1}.{1}t.*.ini
* system.ini
* Command line break down: Java Program = java WildcardSearch
* Search Directory (arg[0]) = C:\Windows
* Files To Search (arg[1]) = s??t*.ini
* Note: Some commands will not work from the command line for arg[1]
* such as *.*, however, this will work if you if it is passed
* within Java (hard coded)
* @author kmportner
import java.io.File;
import java.io.FilenameFilter;
public class WildcardSearch
private static String sWild = "";
* @param args - arg[0] = directory to search, arg[1] = wildcard name
public static void main(String[] args)
String sExtDir = args[0]; // directory to search
sWild = args[1]; // wild card to use - example: s??t*.ini
sWild = replaceWildcards(sWild);
System.out.println("New sWild: " + sWild);
File fileDir = new File(sExtDir);
File[] arrFile = fileDir.listFiles(new FilenameFilter()
public boolean accept(File dir, String name)
return (name.toLowerCase().matches(sWild));
for (int i = 0; i < arrFile.length; ++i)
System.out.println(arrFile.getName());
} // end main
* Checks for * and ? in the wildcard variable and replaces them correct
* pattern characters.
* @param wild - Wildcard name containing * and ?
* @return - String containing modified wildcard name
private static String replaceWildcards(String wild)
StringBuffer buffer = new StringBuffer();
char [] chars = wild.toCharArray();
for (int i = 0; i < chars.length; ++i)
if (chars[i] == '*')
buffer.append(".*");
else if (chars[i] == '?')
buffer.append(".{1}");
else
buffer.append(chars[i]);
return buffer.toString();
} // end replaceWildcards method
} // end class -
How to Use FULL TEXT Indexing Search on file names with brackets
I would like to use a FULL Text Seach query to find Files on a windows file system
The Problem is when the case comes up where there is a parentheses"()" in the file name. This example was created from a file copy being pasted in the same folder location as the original a few times.
Here is my code:
DECLARE
@SearchWord VARCHAR(50)
SET @SearchWord = '"KAP1556PP_P01(2).jpg"'
SELECT [FileName], [FilePath] FROM [dbo].[tblLegalPlan] WHERE CONTAINS(*, @SearchWord)
When I use Double quotes for the @Searchword I recieve no results.
SET
@SearchWord = '"KAP1556PP_P01(2).jpg"'
When I remove the Double Quotes for the @Searchword I recieve an error message:
SET
@SearchWord = 'KAP1556PP_P01(2).jpg'
Msg 7630, Level 15, State 2, Line 8
Syntax error near '(' in the full-text search condition 'KAP1556PP_P01(2).jpg'.
When I search for files containing TEXT up to the bracket i Get undesrired results obviously:
SET
@SearchWord = '"KAP1556PP_P01*"'
Results
FileName FilePath
KAP1556PP_P01(1).jpg BC\EPP\KAP
KAP1556PP_P01(2).jpg BC\EPP\KAP
I would like results where I can search for the file name and only one file is found matching the search word.
ThanksIs this a SQL Server Reporting question? You maybe better off posting this in a more relevant forum.
-
No phrase or multi-term search feature? I am using iBooks 4.1 on an iPad Air I thought an eBook reader would support complex key word searching (even Adobe reader supports phrase searches in PDF files) is iBooks really just limited to searching for one key word at a time? Am I missing something basic in the search interface?
Greetings NoNameGiven,
If I understand the problem correctly (I’m not sure I do) you would prefer ‘iii’ to be read as “eye eye eye” rather than “three”? The alt text property is the only way that I know of to make this happen. Hope this helps.
a ‘C’ student -
Searching for files (Photos) using Finder
I hope someone can help me!!!
I have just upgrade to iLife 06 from iLife 04. Previously when searching for files to open up in Adobe Photoshop I selected 'Pictures' within the finder menu and followed the dates until I found the correct file No. For some reason since installing iPhoto 06, everything is stored in Roll No's. Could someone please let me know how I can search the files within iPhoto, through Finder, to find the correct file by date - as in the date the photo was taken?
CheersHi snurge,
Everyone complained about how iPhoto stored it's images in iPhoto 5 so I guessed they changed it to the roll system.
Open iPhoto and change the title of your rolls to something that is more relevant to what is in the roll.
I have my rolls dated with a couple of words in the name, such as
"1/24/06 Fire pit"
Once you change the title of the roll in iPhoto, it will also change in the Finder.
This should help you a lot.
If you want the edited version of a photo, look for the roll in the Modified folder.
If you want the Original version of a photo, look for the roll in the Originals folder.
Also, set up PhotoShop in iPhoto 6 preferences to be your external editor.
Preferences>General
Edit Photo>scroll to last option and navigate to PS to choose it to open.
Now you can control click on an image in iPhoto and scroll to any of the menu choices to edit your photo.
You must however "save" the image with the same name and it must be flattened. The edit will then be reflected within iPhoto. -
Custom report using KM API Error
Hi All,
I have to create a report using KM API. i got the custom report using KM API from sdn and I imported into my NWDS. While i compile it, it is giving me this error.
"The project cannot be build because the classpath for com.sap.netweaver.bc.rf.common.exception.ResourceException is not found."
I have imported all the required jar files.
How can i rectify this error? Could anyone help me out in this issue?
Regards,
DivyaHi Divya,
> I have imported all the required jar files
First, I don't know what you mean with "imported" - in any case, you should <i>not</i> put the JARs into your project but just reference these.
Also, obviously you have <i>not</i> referenced <i>all the required jar files</i>; ResourceException is part of bc.rf.common_api.jar, which is part of portal application com.sap.netweaver.bc.rf, at least for NW2004s.
Please use the ClassLocator tool (search the WebLogs for this term to get some initial instruction) to avoid such questions in the future. It will make your life much easier.
Hope it helps
Detlev -
How can I search for files with more than one keyword?
I´ve created some keywords, and some files in my folder are tagged with two, three or more keywords.
Is there a way to search for files using more than one keyword on the search field?
Thanks!Use the Find command (menu Edit) and in criteria at the right side is a plus sign to add another criteria and set it to your custom wishes.
make a choice in results and you should be OK
Maybe you are looking for
-
Determine the type of the caught exception
Hi! Here is my problem : I'm using a web service and the method I call throws different types of Exception (RemoteException, ServiceException, etc...) And, the reaction to the caught exception depends on its type, that's why I need to determine what
-
R12 links between GL and AR through XLA
Hello, I have a requirement where in I need to modify standard account analysis report to show Customer name, ReceiptNumber/Invoice Number, Invoice Date etc going from GL. I have noticed that this has to be a UNION ALL query as AR data resides in mul
-
Hi all We're running an E-Recruiting 6.0 (Support Package 8) implementation on a integrated SAP HR environment (ERP 2005). We would like to activate all our extisting employees for E-Recruiting with the Report HRALXSYNC. After an unsuccessful run, th
-
Hi all, In browsing the discussion board, I've just learned to create an alias for mail in the online me.com page. However, is there a way to drag that alias somehow into the mail app that's on my desktop? Thanks
-
BT email times out far too fast
(Please answer by email, not by phone.) When I am logged in to BT Email, the email page shuts down in a minute or two and I must re-open it. Why is this? Earlier today the BT Email kept on dropping while I was typing a message. Please allow the BT Em