Issue with ENEQuery java api and searching terms with accented characters
Hi,
we are using ENEQuery to query the mdex engine. When search terms contain accented characters (like á,í etc), even though the terms are decoded (using java.net.URLDecoder), the term gets send to dgraph is encoded. for e.g a search for "sofá", from the dgraph logs "sof%c3%a1" and fetch in 0 results
ENEQuery query = new ENEQuery();
final ERecSearchList searches = new ERecSearchList();
final ERecSearch eRecSearch = new ERecSearch("search interface name", "term");
searches.add(eRecSearch);
query.setNavERecSearches(searches);
Any suggestions?
Thanks
Hi,
Does your indexed data (which you hope to match) contain "sofá" or "sofa" (no diacritic)? If the latter, and in-general, you may benefit from the dgidx flag --diacritic-folding* as described in documentation "Mapping accented characters to unaccented characters". If you are running the latest version, this is all that should be required to generate a match.
Best
Brett
Similar Messages
-
JAVA API AND ABAP API SIMPLE SCENARIO
Hello MDM gurus
I have never used any Java API or ABAP API to leverage and present MDM functionalities on front end systems like portal,etc...
Could you please give me all the required to play around with JAVA api and ABAP api's.
Points will be given to every valuable answer.
ThanksHi Nazeer,
In order to use Portal you need Java APIs and to start with refer the MDM Java docs to get the basic idea of various classes and methods to be used in developing the simple java application and access it using portal.
http://help.sap.com/saphelp_mdm550/helpdata/en/47/9f23e5cf9e3c5ce10000000a421937/frameset.htm
Sample code for Duplicating Repository
public class TestDuplicateRepository
public static ConnectionPool simpleConnection;
public static RepositoryIdentifier repIdentifier,repIdentifier1;
public static String session;
public static String connection = "MDMServer_Test";
public static String repository1 = "Test_Repository";
public static String repository2 = "Test_Duplicate";
public static DBMSType dbmsType = DBMSType.MS_SQL;
public static void main(String[] args)throws CommandException, ConnectionException
//Creating Connection.
simpleConnection = ConnectionPoolFactory.getInstance(connection);
//Establishing connection with Repository.
repIdentifier = new RepositoryIdentifier(repository1, connection, dbmsType);
repIdentifier1 = new RepositoryIdentifier(repository2, connection, dbmsType);
//Creation Sever Session.
CreateServerSessionCommand createServerSessionCmd = new CreateServerSessionCommand(simpleConnection);
createServerSessionCmd.execute();
session = createServerSessionCmd.getSession();
//Authenticating Server Session.
AuthenticateServerSessionCommand auth= new AuthenticateServerSessionCommand(simpleConnection);
auth.setSession(session);
auth.setUserName("Admin");
auth.setUserPassword("Admin");
auth.execute();
session = auth.getSession();
//Duplicate Repository Command
DuplicateRepositoryCommand duplRepCmd = new DuplicateRepositoryCommand(simpleConnection);
duplRepCmd.setDBMSUserName("sa");
duplRepCmd.setDBMSUserPassword("abc");
duplRepCmd.setSession(session);
duplRepCmd.setSourceRepositoryIdentifier(repIdentifier);
duplRepCmd.setTargetRepositoryIdentifier(repIdentifier1);
duplRepCmd.execute();
Similarly you can try with Getting server version, Archive repository and then move on to adding,modifying records etc.
For ABAP APIs refer the below link
http://help.sap.com/saphelp_mdm550/helpdata/en/44/93aa6e31381053e10000000a422035/frameset.htm
Regards,
Jitesh Talreja -
Can I create a cert with the Java API only?
I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some other means, to be included in the server's trust store.
I know how to generate a key pair with an associated self-signed cert via keytool, but I'd prefer to do it directly with the Java APIs. From looking at the Javadocs, I can see how to generate a keypair and how to generate a cert object using an encoded representation of the cert ( e.g. java.security.cert.CertificateFactory.generateCertififcate() ).
But how can I create this encoded representation of the certificate that I need to provide to generateCertificate()? I could do it with keytool and export the cert to a file, but is there no Java API that can accomplish the same thing?
I want to avoid having the user use keytool. Perhaps I can execute the appropriate keytool command from the java code, using Runtime.exec(), but again a pure java API approach would be better. Is there a way to do this all with Java? If not, is executing keytool via Runtime.exec() the best approach?There is no solution available with the JDK. It's rather deficient wrt certificate management, as java.security.cert.CertificateFactory is a factory that only deals in re-treads. That is, it doesn't really create certs. Rather it converts a DER encoded byte stream into a Java Certificate object.
I found two ways to create a certificate from scratch. The first one is an all Java implementation of what keytool does. The second is to use Runtime.exec(), which you don't want to do.
1. Use BouncyCastle, a free open source cryptography library that you can find here: http://www.bouncycastle.org/ There are examples in the documentation that show you how to do just about anything you want to do. I chose not to use it, because my need was satisfied with a lighter approach, and I didn't want to add a dependency unnecessarily. Also Bouncy Castle requires you to use a distinct version with each version of the JDK. So if I wanted my app to work with JDK 1.4 or later, I would have to actually create three different versions, each bundled with the version of BouncyCastle that matches the version of the target JDK.
2. I created my cert by using Runtime.exec() to invoke the keytool program, which you say you don't want to do. This seemed like a hack to me, so I tried to avoid it; but actually I think it was the better choice for me, and I've been happy with how it works. It may have some backward compatibility issues. I tested it on Windows XP and Mac 10.4.9 with JDK 1.6. Some keytool arguments changed with JDK versions, but I think they maintained backward compatibility. I haven't checked it, and I don't know if I'm using the later or earlier version of the keytool arguments.
Here's my code.
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import javax.security.auth.x500.X500Principal;
import javax.swing.JOptionPane;
public class CreateCertDemo {
private static void createKey() throws IOException,
KeyStoreException, NoSuchAlgorithmException, CertificateException{
X500Principal principal;
String storeName = ".keystore";
String alias = "keyAlias";
principal = PrincipalInfo.getInstance().getPrincipal();
String validity = "10000";
String[] cmd = new String[]{ "keytool", "-genKey", "-alias", alias, "-keyalg", "RSA",
"-sigalg", "SHA256WithRSA", "-dname", principal.getName(), "-validity",
validity, "-keypass", "keyPassword", "-keystore",
storeName, "-storepass", "storePassword"};
int result = doExecCommand(cmd);
if (result != 0){
String msg = "An error occured while trying to generate\n" +
"the private key. The error code returned by\n" +
"the keytool command was " + result + ".";
JOptionPane.showMessageDialog(null, msg, "Key Generation Error", JOptionPane.WARNING_MESSAGE);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(new FileInputStream(storeName), "storePassword".toCharArray());
//return ks from the method if needed
public static int doExecCommand(String[] cmd) throws IOException{
Runtime r = Runtime.getRuntime();
Process p = null;
p = r.exec(cmd);
FileOutputStream outFos = null;
FileOutputStream errFos = null;
File out = new File("keytool_exe.out");
out.createNewFile();
File err = new File("keytool_exe.err");
err.createNewFile();
outFos = new FileOutputStream(out);
errFos = new FileOutputStream(err);
StreamSink outSink = new StreamSink(p.getInputStream(),"Output", outFos );
StreamSink errSink = new StreamSink(p.getErrorStream(),"Error", errFos );
outSink.start();
errSink.start();
int exitVal = 0;;
try {
exitVal = p.waitFor();
} catch (InterruptedException e) {
return -100;
System.out.println (exitVal==0 ? "certificate created" :
"A problem occured during certificate creation");
outFos.flush();
outFos.close();
errFos.flush();
errFos.close();
out.delete();
err.delete();
return exitVal;
public static void main (String[] args) throws
KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException{
createKey();
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
//Adapted from Mike Daconta's StreamGobbler at
//http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
public class StreamSink extends Thread
InputStream is;
String type;
OutputStream os;
public StreamSink(InputStream is, String type)
this(is, type, null);
public StreamSink(InputStream is, String type, OutputStream redirect)
this.is = is;
this.type = type;
this.os = redirect;
public void run()
try
PrintWriter pw = null;
if (os != null)
pw = new PrintWriter(os);
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line=null;
while ( (line = br.readLine()) != null)
if (pw != null)
pw.println(line);
System.out.println(type + ">" + line);
if (pw != null)
pw.flush();
} catch (IOException ioe)
ioe.printStackTrace();
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.security.auth.x500.X500Principal;
public class PrincipalInfo {
private static String defInfoString = "CN=Name, O=Organization";
//make it a singleton.
private static class PrincipalInfoHolder{
private static PrincipalInfo instance = new PrincipalInfo();
public static PrincipalInfo getInstance(){
return PrincipalInfoHolder.instance;
private PrincipalInfo(){
public X500Principal getPrincipal(){
String fileName = "principal.der";
File file = new File(fileName);
if (file.exists()){
try {
return new X500Principal(new FileInputStream(file));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}else{
return new X500Principal(defInfoString);
public void savePrincipal(X500Principal p) throws IOException{
FileOutputStream fos = new FileOutputStream("principal.der");
fos.write(p.getEncoded());
fos.close();
}Message was edited by:
MidnightJava
Message was edited by:
MidnightJava -
IDOC Related - Search Term 1 and Search term 2
Hi,
In FK03 , we have Search term 1 and search term 2 in the second screen
I am trying to populate those values using IDOC type CREMAS and segment E1LFA1M
In that only search term 1 SORTL is there ,
Any idea how can we populate Search term 2
thanks
chandra
Edited by: Chandrasekhar Jagarlamudi on Apr 21, 2008 7:53 PMHi!
It can be performed:
- with modifying the standard
- copying it to a ZCREMAS interface, change the structure, and of course you have to set all IDoc settings to this new one
Regards
Tamá -
BPM 11g: JAVA API and Webservice API
Who knows BPM 11g: JAVA API and Webservice API?
Customer want to call BPM 11g between Heterogeneous systems, such .net framework. One way is use webservice API, I think, but where can find it? thank youWhen you create a BPM application in 11g, you're actually creating a SOA composite application with a BPMN component in the composite. From within the BPMN editor, you can specify the interface (parameters) of each start node in the process. If you select a start node, look at the implementation tab, you'll see a properties group that lets you define the interface one property at a time, or by selecting an interface from the catalog.
By defining these properties you're also defining the shape of the Web Service interface that will automatically be created in the composite. If you switch to the composite view, you'll see your BPMN process with a wire to it from a Web Service that's generated from the interface defined in the BPMN editor. The naming convention is the BPMN process name with ".service" appended. When you deploy the BPMN process, the web service will also be deployed, since it's also part of the composite. From Enterprise Manager (EM) you can test the service and get the WSDL, which could be used by other applications (e.g. .NET) to start and interact with a process instance.
This is one of the advantages of the 11g architecture. The composite exposes services to consumers/clients. The implementation could have been BPEL, BPMN, a Mediator, Java/EJBs, or any combination working together. To the consumer, it's just a web service.
In case your next question was about security ... you won't see properties about security in the BPMN editor. You use Web Service Manager to apply security or other constraints to the web service endpoint. -
MDM 5.5 SP04 Java API and Web Service Documentation
Is there documentation available that reflects the SP04 changes to the Java API, and the web services that are now available?
As of this morning, service marketplace contained spotty SP04 docs.
Thanks in advance,
MikeMike,
A cookbook would be wonderful (I think our developers would throw a party)!
An updated object model (as a preface to the user guide) for the legacy API (MDM4J.jar) AND the new "rebranded" API (mdm-*.jar) would also work.
I've been reduced to comparing the SP3 & SP4 javadocs
One fun approach that appears to be working for us, is to model each process using the DataManager, and try to duplicate that exactly via the corresponding API objects (e.g. the simple Connect-Find Table-Search Table-View Result Set-View Record-CheckOut/Upsert/Validate/CheckIn dance). New features in the DataManager reveal themselves a little more readily
Good luck,
...Dee -
Hi all ,
How we can work with JAVA APIs and MDM .
Please tell step by step ways.
thanks in advance.
Thnks
nmHi Man,
You have to specify the correct JAR files in the classpath of the Java Virtual Machine (JVM). The API consists of five JAR files:
1. mdm-admin.jar
2. mdm-common.jar
3. mdm-core.jar
4. mdm-data.jar
5. mdm-protocol.jar
These files in one single archive file with the name MDMJavaAPI_Ver<buildnumber>.zip. you can download this file from the service market place by using mentioned below link:
http://service.sap.com/swdc
then goto Download>Support Packages and Patches> Entry by application group -->SAP NetWeaver -->SAP MDM -->SAPMDM5.5 -->Java API
for the Java API documentation, you can download it from the link below:
http://help.sap.com/javadocs/MDM/current
But remember one thing that this JAVA API Version file must be compitable with your MDM Server version.you can verify this as per the build version.
Hope this will help you.
TNR,
Saurabh...
Edited by: Saurabh Kumar Sahu on Feb 1, 2008 8:09 AM
Edited by: Saurabh Kumar Sahu on Feb 4, 2008 7:49 AM -
How could JAVA API and ABAP API useful to MDM.
Hi Experts,
How could JAVA API and ABAP API useful to MDM, and any coding in Java or ABAP is required in MDM.Hi Reema,
Java API and ABAP API are verry usefull to MDM to integrate MDM with other SAP componants like SAP R\3, EP etc. :
It dose not required any coding in MDM infact in JAVA API coding can be done on NWDS(Netweaver Developer Studio).And for ABAP API coding is done on SAP R\3 System in ABAP editor.
JAVA API:
By using Java API MDM client operations can be performed.For one need to install NWDS and to deploy some .jar files and with the help of standard classes and interfaces it can be connected to MDM server and various operations like create repository ,connect to repository ,Data mainuplation etc.
ABAP API:
Suppose you have an Expert abaper and you want him to perform MDM operations.In that case he need not to learn MDM basic Data types infact by doing some settings on R\3 and MDM server side an ABAPer can perform
MDM Cnsole and MDM Data Manager level operations.
you can go through these links
http://help.sap.com/javadocs/MDM/SP06/overview-summary.html
/people/bv.pillai/blog/2006/11/28/installing-mdmtech-add-on-and-configuring-the-mdm4a-mdm-for-abap-api
Here the coding is done on SAP R\3 system.
hope it will give you some idea about Java API and ABAP API
Reward if helpful
Thanks ,
Vinay Yadav -
Difference between interfaces in Java API and user defined interfaces
Is there any differences between the interfaces (such as KeyListener, ActionListener and EventListener etc.,) in Java API and the user defined interfaces.
The user defined interfaces seems to be empty without any functionality (except its constant and method declarations). But the interfaces in Java API seems to have some functionality behind them, since they route the device events to the programs.
Actually what is happening behind the Java API's interfaces?
Please clarify.Ummm, no they are not (or at least some of them are not). Also, some things we support now we may not have supported in a previous release.
If you look at the section 2 (Working with TimesTen Data Stores0 in the TimesTen Java Developer's Guide and look at the sections:
TimesTen JDBC Extensions
Additional TimesTen classes and interfaces
then you will see the extra functionality documented there. Of course, if you do not need any of this functionality then you can simply treat them as the base classes from java.sql and they will work fine so it is easy to make most of your code generic.
Chris -
Can Designer10gR2 generate Forms with Pluggable Java Components and WebUtil
I know that Forms 10g supports Pluggable Java Components and WebUtil. Designer 10g R2 provides Design Capture of Forms to Modules. Can Designer capture a Form with Pluggable Java Components and WebUtil and then regenerate Form from within Designer? IF yes, would you give me more details. Thanks.
Hi
I am also looking for an alternative way to implement Drop and Drag functionality in Forms 9i.
Regards
Janet -
I started to learn HTML, and I'm using text edit and everything is going fine, when I save the file with a .html extension and open it with safari I only view the code and not the webpage that was supposed to be created.
That is because you don't have a web server configured and running to serve the html page. In order to see the page in a browser you need to access it using a url similar to http://localhost/~yourUserName if you are serving the page from your user account.
Prior to Mountain Lion you could go into web sharing and turn on the web server. With Mountain Lion there is no option, other than using terminal, to turn on the web server. The web sharing menu item has been removed in Mountain Lion. Apache is still on your computer but it will take a little searching these forums or the Internet to find how to turn it on.
If you want a graphic user interface to turn on/off the Apache server you could download and install a server application like xampp, http://www.apachefriends.org/en/xampp.html. I use this and it works well. -
My school has a website. The professor uploads files in Word. When I click on the link at home using Pages, the download window opens with nothing in it and Safari opens with a blank in the address book. What Could be wrong? Wrong set up?
Hi Jo,
If I'm interpreting this correctly, the Word file downloads correctly, but when you open it in Pages, the link(s) which your instructor has embedded in the Word file are not correctly translated into Pages.
If the link shows the actual address, you should be able to copy that and paste it into the location bar in Safari, press return, and get to the website that way.
An alternate route might be to download one of the open source Office applications, OpenOffice.org, LibreOffice, or NeoOffice. These are written to more closely emulate the behaviours of MS Word than Pages, and may provide better support for links embedded in Word files.
Regards,
Barry -
nowadays have many user have problem with update to ios7 and need active with apple id maybe in the future in order escape from these problems must be stop use these products else. Because of simple user don't know about this technology and sometime just hear from other user that it 's difficult to use then force they change phone that use to handle to another.
It is a feature to discourage the theft of iPhones by making them useless if resold. It's not going anywhere. It's simple: just don't buy a phone until you make sure that the activation lock has been disabled.
-
I'm trying to create an "ExtraLarge" VM with multiple NICs. The New-AzureVM returns the following error:
BadRequest: Virtual machines with secondary network interfaces and virtual machines with no secondary network
interfaces are not supported in the same deployment, also a virtual machine having no secondary network interfaces
cannot be updated to have secondary network interfaces and vice-versa.
But I have no other VMs. Or at least I did and then deleted them and all their disks. The service has no deployments (either staging or production).
Why is New-AzureVM complaining about a mismatch of VMs with and without secondary network interfaces when no other VMs exist?
I have tried many things to fix this, including the deletion of ALL of my resources. I have deleted and created the service many times, both with an affinity group and without. I have a screen print of the -debug output if your interested.
Thanks for the outstanding help.Hi Ron,
IMPORTANT NOTE: Please do not post the CONFIDENTIAL DETAILS ever on the public forums, this is HIGH RISK action.
Please send an email with your contact details to my email
[email protected] so that I guide you on steps which help you come out of the current scenario. Thank you for understanding.
I suggest you to create a new VNET and new VM with cloud services. Create Multiple NIC VM. Let us know the results.
Ref:
http://azure.microsoft.com/blog/2014/10/30/multiple-vm-nics-and-network-virtual-appliances-in-azure/
http://blogs.technet.com/b/canitpro/archive/2014/11/04/step-by-step-create-a-vm-with-multiple-nics-in-azure.aspx
If you are unable to create a VM with multiple NIC, please open a support case as it requires more confidential information which is out of scope of FORUM support offerings.
Regards,
Girish -
Can I transfer docs/folders between a MacBook with a Intel processor and a iMAC with a PowerPC processor using a usb cord? Or by loading from the MacBook to a external drive and then to the Imac.
You need to use an external drive, FireWire cable, Ethernet cable, or wireless connection.
(73713)
Maybe you are looking for
-
Can't create connection pool using weblogic 6.1 with Oracle thin driver
Hi ! I have tried to create a connection pool from adminconsole. My CLASSPATH setting is as follows : F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2; D:\Oracle\Ora81\jdbc\lib\classes12.zip; D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip; D:\Oracle\Ora81\jdbc\lib\
-
How can I add the file numbers to each photo as a batch in photoshop on a mac?
Can anyone tell me how I can add the file numbers of each individual photo to the picture and do it as a batch?
-
Viewing Microsoft Word Documents on iPod
I tried to put some Microsoft word documents on my iPod but when I selected them from my iPod only a jumbled word would show up. Does anyone know how I can succesfully put Microsoft Word Documents on my iPod?
-
IMac Won't Recognize Airport Extreme
I purchased an Airport Extreme from the local Apple store and set it up according to directions, but my iMac doesn't see it. I believe that there is a problem with my Airport card inside my Mac. What I have tried to fix this: First thing I did was ge
-
EXPORTING TO QUICKTIME FROM FCP5 AND ONLY SOME OF THE FILM IS TRANSFERED?
Hello All Im in the midst of exporting my sequence from FCP5 to quicktime via the "Quick Time Movie" option. When I do this about 30 seconds of footage is missing from the final QT that us created. If any one can help I would really appreciate it. Th