Java class containing parseEscapedXML function?
I'm interested in using the ora:parseEscapedXML function in some Java code. What class implements this function, and what library contains that class?
Thanks for your time,
Paul Camann
Hi,
You could try to do this on your own.
You need to write a piece of code that converts the escaped entities [&><' etc] to their actual characters, and then write a simple DOM parsing logic to parse it into a document.
Similar Messages
-
Problem Calling a Java class from PLSQL function
We are calling a Java class through oracle function as
FUNCTION CalculateAMW (contributorid IN Number,
fromdate IN Date,OHorAnncoverage in Number,
OHAnncoverage in Number,
AppStatus in Number,
Status in Number)
RETURN Number
AS LANGUAGE JAVA
NAME 'AMWCalculations.calculateAMW
(long,java.sql.Timestamp,long,long,long,long) return double';
on execution of this function the sql prompt for the 1st time it is giving the output
but
if reexecute it is throwing and error ORA - 932 : Inconsistent
datatypes.
Recompiling the java class then it works for the 1st time and the next
time
we execute it throws error as explained above.
What could be the problem.
Thanks
Nanda Kishoreany idea???Yes, you are in the wrong forum, this is a Java forum, you have an ASP question, so i suggest you visit an ASP forum/site
-
Calling java class from abap function moduile
Is it possible to call java class from function module.
i am a java guy. my need is to call a java class from a function module in the backend. which in turn performs certain functions.
i would be highly obliged if someone could let me know if this is possible.
regards
Srikumar VHi Srikumar ,
you can call a java webservice in ABAP .
u can call the webservice and via that u can trigger the java class..
Regards
Renu -
Problem - Class containing template functions
Hi everyone,
I've written a simple class (not template), containing one template functions, like te following one:
class MyClass
public:
template <typename T>
typename T::_ptr_type DoSomeThing(int a, int b);
When I am within a function and I need to call DoSomeThing, I have no problems if I declare a local variable of class MyClass, but I get the following compilation error:
Error: Unexpected type name "ThirdClass" encountered
when I use a pointer or a reference to MyClass that is declared elsewhere in the code.
The following is a sample code that returns me an error:
int OtherClass::MyFunc()
m_pMyClass->DoSomeThing<ThirdClass>(10, 20);
In the above function m_pMyClass is a member variable of OtherClass pointing to an instance of MyClass and ThirdClass is a valid class name (visible to the function).
Does anyone know why I got the error ?
Thank you,
MassimoYou need to use the syntax:
m_pMyClass->template DoSomeThing<ThirdClass>(10, 20);
Really, exactly like I wrote it ;)
Josh -
Hi,
I'm new to BPEL and I've a problem: i need to create a WEBSERVICE from Java class.
This Java class contain functions to call other functions in other packages.
These last function contain sql query: it's an java "interface" application between BPEL and an EXTERNAL Oracle database 10g.
I want to create one WEB SERVICE from this application and i followed the steps (right click, menù, create j2ee webservice, etc) i obtain error:
VALIDATION FAILED --- Files at the following URLs cannot be modified:
File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/MyWebService1.webservice
File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/IMyWebService.wsdl
File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/MyWebService1.dd
Show the java class "interface":
package controller;
import java.util.*;
import java.sql.*;
import domain.*;
import dao.*;
import utility.*;
public class Request_Incoming_Controller {
public Request_Incoming_Controller() {}
/* Update StatoTurismo */
public static String aggiornaStTurismo(int numIncoming, String tur) {
GregorianCalendar dp = FormatoData.dataDaDate1("00/00/0000");
Request_Incoming ric = new Request_Incoming(numIncoming,"","",dp,dp,"","","",0,"",tur,"");
// try {
if(ric.aggiornaTurismo()<0)return "NO";
return "OK";
// } catch (SQLException ex) {
// System.err.println("Eccezione durante l'aggiornamento "
// + ex.getMessage()); }
/* Update StatoCassa */
public static String aggiornaStCassa(int numIncoming,String cash) {
GregorianCalendar dp = FormatoData.dataDaDate1("00/00/0000");
Request_Incoming ric = new Request_Incoming(numIncoming,"","",dp,dp,"","","",0,"","",cash);
// try {
if(ric.aggiornaCassa()<0) return "NO";
return "OK";
// } catch (SQLException ex) {
// System.err.println("Eccezione durante l'aggiornamento "
// + ex.getMessage()); }
/* Lettura del NumIncoming assegnato dal sistema dopo il caricamento della
* richiesta in base alla matricola del Dipendente
public static int caricaNumDaDip(String dipendente){
Request_Incoming ric = new Request_Incoming(0,dipendente);
// try {
ric.trovaNumIncoming();
return ric.getNumIncoming();
// } catch (SQLException ex) {
// System.err.println("Eccezione durante l'aggiornamento "
// + ex.getMessage()); }
Can Anyone help?
Is urgently.........thanks
DanieleYou should try to post it there:
http://forums.oracle.com/forums/forum.jspa?forumID=97
But if I look at the error, it looks like some files are Read-Only. Maybe you should check if they are or if you have the appropriate rights on the folder.
Good luck -
Hi,
I need to parse,in CVP 7.0(1), the BAAccountNumber variable passed by the ICM dialer. Is there a built-in java class or other function that would help me do this?
Our BAAccountNumber variable looks something like this: 321|XXX12345678|1901|M. In IP IVR I use the "Get ICM Data" object to read the BAAccountNumber variable from ICM and then I use the "token index" feature to parse the variable (picture below).
Alternately, IP IVR also has a Java class that allows me to do this; the class is "java.lang.String" and the method is "public int indexOf(String,int)"
Is there something equivalent in CVP 7.0(1)?
thanksThanks again for your help. This is what I ended up doing:
This configurable action element takes a string seperated by two "|" (123|123456789|12)
and returns 3 string variables.
you can add more output variables by adding to the Setting array below.
// These classes are used by custom configurable elements.
import com.audium.server.session.ActionElementData;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.voiceElement.ElementData;
import com.audium.server.voiceElement.ElementException;
import com.audium.server.voiceElement.ElementInterface;
import com.audium.server.voiceElement.Setting;
import com.audium.server.xml.ActionElementConfig;
public class SOMENAMEHERE extends ActionElementBase implements ElementInterface
* This method is run when the action is visited. From the ActionElementData
* object, the configuration can be obtained.
public void doAction(String name, ActionElementData actionData) throws ElementException
try {
// Get the configuration
ActionElementConfig config = actionData.getActionElementConfig();
//now retrieve each setting value using its 'real' name as defined in the getSettings method above
//each setting is returned as a String type, but can be converted.
String input = config.getSettingValue("input",actionData);
String resultType = config.getSettingValue("resultType",actionData);
String resultEntityID = config.getSettingValue("resultEntityID",actionData);
String resultMemberID = config.getSettingValue("resultMemberID",actionData);
String resultTFNType = config.getSettingValue("resultTFNType",actionData);
//get the substring
//String sub = input.substring(startPos,startPos+numChars);
String[] BAAcctresults = input.split("\\|");
//Now store the substring into either Element or Session data as requested
//and store it into the variable name requested by the Studio developer
if(resultType.equals("Element")){
actionData.setElementData(resultEntityID,BAAcctresults[0]);
actionData.setElementData(resultMemberID,BAAcctresults[1]);
actionData.setElementData(resultTFNType,BAAcctresults[2]);
} else {
actionData.setSessionData(resultEntityID,BAAcctresults[0]);
actionData.setSessionData(resultMemberID,BAAcctresults[1]);
actionData.setSessionData(resultTFNType,BAAcctresults[2]);
actionData.setElementData("status","success");
} catch (Exception e) {
//If anything goes wrong, create Element data 'status' with the value 'failure'
//and return an empty string into the variable requested by the caller
e.printStackTrace();
actionData.setElementData("status","failure");
public String getElementName()
return "MEDDOC PARSER";
public String getDisplayFolderName()
return "SSC Custom";
public String getDescription()
return "This class breaks down the BAAccountNumber";
public Setting[] getSettings() throws ElementException
//You must define the number of settings here
Setting[] settingArray = new Setting[5];
//each setting must specify: real name, display name, description,
//is it required?, can it only appear once?, does it allow substitution?,
//and the type of entry allowed
settingArray[0] = new Setting("input", "Original String",
"This is the string from which to grab a substring.",
true, // It is required
true, // It appears only once
true, // It allows substitution
Setting.STRING);
settingArray[1] = new Setting("resultType", "Result Type",
"Choose where to store result \n" +
"into Element or Session data",
true, // It is required
true, // It appears only once
false, // It does NOT allow substitution
new String[]{"Element","Session"});//pull-down menu
settingArray[1].setDefaultValue("Session");
settingArray[2] = new Setting("resultEntityID", "EntityID",
"Name of variable to hold the result.",
true, // It is required
true, // It appears only once
true, // It allows substitution
Setting.STRING);
settingArray[2].setDefaultValue("EntityID");
settingArray[3] = new Setting("resultMemberID", "MemberID",
"Name of variable to hold the result.",
true, // It is required
true, // It appears only once
true, // It allows substitution
Setting.STRING);
settingArray[3].setDefaultValue("MemberID");
settingArray[4] = new Setting("resultTFNType", "TFNType",
"Name of variable to hold the result.",
true, // It is required
true, // It appears only once
true, // It allows substitution
Setting.STRING);
settingArray[4].setDefaultValue("TFNType");
return settingArray;
public ElementData[] getElementData() throws ElementException
return null; -
Securing Web Services based on simple Java Classes
Hi @all!
We`ve got the following problem.
There`s a .NET client calling our Web services deployed on Bea Weblogic 8.1 (without
SP).
The Web Services are generated by the ANT task servicegen. They are based on simple
Java classes containing the service methods as public members.
Is there a possibility to secure these methods without using the console menu
item "Define Security Policy" ?
We can`t use this menu because it has got a javascript bug with methods returning
an array.
Thanks in advance for help.
MichaelHi Michael,
Could you use transport level security, SSL [1]?
I'm not sure what limitation you are experiencing with the console? Is
there a traceback? Have you contacted customer support on this issue?
Thanks,
Bruce
[1]
http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
Michael Albrecht wrote:
>
Hi @all!
We`ve got the following problem.
There`s a .NET client calling our Web services deployed on Bea Weblogic 8.1 (without
SP).
The Web Services are generated by the ANT task servicegen. They are based on simple
Java classes containing the service methods as public members.
Is there a possibility to secure these methods without using the console menu
item "Define Security Policy" ?
We can`t use this menu because it has got a javascript bug with methods returning
an array.
Thanks in advance for help.
Michael -
User Defined Function is not recognizing java class in IR.
Hi All,
i have written one normal java class, and i imported that java class into IR using imported Archive as a .jar file,
it will add just two values .
now in message mapping i created one user defined function in that
iam trying to call this java class. while testing it is showing error as cannot resolve symbol java class name
so experts please help me in this or it would be appreciate if any one will provide
step by step process of one java class and one USD just to add two numbers.
thanks in advance,
jasmine .Hi,
The steps are as follows:
1) Create a java file with .java extension.
2)Compile it to create a .class file.
3) Create a zip file for this .class file using any compressed archive program(ex-winrar)
4) Upload this zip file as an imported archive ,save and activate.
When you go to this archive,below , you can see your .class file with the older path,for below ex:
ObjRecord.class jxl/biff/drawing/
you have to give following entry in imports section:
jxl.biff.drawing.ObjRecord;
Please try this and let us know if this works.
Thanks.
Regards,
Shweta -
Using log4j in User definied Extension Function java class
Hi
I am having a java class where I defined all the user defined XSL Functions.
I used System.out.println for printing.
But I want to use log4j. But when I use this to debug. It is not recognising only.
Could you please tell me why this is not working in this class?
Regards,
PraveenaHi Anuj,
I can see the below error in the default log file:
09/08/11 16:25:21 log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
09/08/11 16:25:21 log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
09/08/11 16:25:21 log4j:ERROR [global.libraries:1.0] whereas object of type
09/08/11 16:25:21 log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [oracle.bpel.common:10.1.3].
09/08/11 16:25:21 log4j:ERROR Could not instantiate appender named "LOGFILE".
09/08/11 16:25:21 log4j:WARN No appenders could be found for logger (oracle.sample.XSLFunction).
09/08/11 16:25:21 log4j:WARN Please initialize the log4j system properly.
log4j.properties file:
# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, LOGFILE
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.File= C:/product/10.1.3.1/OracleAS_1/opmn/logs/XSLUtilExten.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO,DEBUG
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=<%d>[%t] %p %C: %m%n
log4j.appender.LOGFILE.MaxFileSize=40MB
log4j.appender.LOGFILE.MaxBackupIndex=10
Could you please tell me what is the problem?
Edited by: Jakarta on Aug 11, 2009 4:16 AM -
Container Object in Java Class
Hello ,
I have a Mapping program using java class type (Java SAX in this case). I need to access some Runtime constants and the mapping trace object.
In message mapping is simple. We can use the container object that is pass to a UDF and the GlobalContainer Object.
But how can I access the Runtime constants and mapping trace without a container object ?.
Any ideas...?
Thanks in advance.
Yuvan D.in Your java mapping class
you should import import com.sap.aii.mapping.api.*;
public void execute(InputStream input, OutputStream output)
throws StreamTransformationException {
AbstractTrace trace = null;
String RESULT = new String();
trace =
(AbstractTrace) param.get(
StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo(doc.toString());
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm -
Java class within user defined function
Hi all,
in order to have a JDBC-lookup java function "globally" in XI i created a java class and imported it to XI as an imported Archive (i have to do the lookup within a mapping). I then can include the class to a user defined function. However the problem is now that this works fine within one Software Component Version but when i want to use it in several SWCV i have to import the jar to every SWCV. My question is therefore if anybody has already had this problem and if there is another possible solution - maybe deploying the class to XI using SDM?
Thank you for your thoughts.
Mathiashi Markus,
>>>>My question is therefore if anybody has already had this problem and if there is another possible solution - maybe deploying the class to XI using SDM?
if you do that then you'll have to remember about it
every time you import a new SP or upgreade your XI
this is not standard so SAP may always overwrite it
and your interfaces will stop working
consider importing it for every SWCV
Regards,
michal -
Java class names which contain unicode characters
I need to create, compile and load java classes which have class names that contain unicode characters.
I am using Win2k but will neet to support unix* in future.
When I try to create a fooXbar.jar where X is a unicode character which is not ascii I get an error when creating the file.
My question is: how do I map java class names and package names which contain non ascii characters into
names that the files systems will like AND that the java VM will use when trying to load .class file from the class path.
for example what would the .java and .class file be for the following class?
class \u6587\u66f8 {You could make names for .java and .class that is understandable by the filesystem. E.g. you could prepend with % and then digits for the unicode character. The problem is then how to compile the class, and how to load the class.
You can load the class with a custom classloader, which will translate the unicode class name to the escaped file name (using %).
The problem is then reduced to how you can compile your code (you have to map the file name to the class name somehow). I think it can be done, but I don't know the solution to that.
Alternatively you can use meaningful names for the classes, and then make an obfuscator that can change the bytecodes so the classnames are changed to some obscure unicode names. Perhaps there is already obfuscators out there you can use that will use unicode characters. -
How to set the classpath and path from the jsp to call java class function
Hi Exprets,
I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
If any one know how to achieve it, please reply as soon as possible.
thanks in advance,
swapna soni.It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
1. How costly is the query retrieving the data from the database?
If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
2. Are there chances for the data to become stale within a session?
In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
3. How many data sets does the session already holds?
If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
4. Does the server employ some kind of caching mechanism?
Using session cache can definitely improve performance.
You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
Thanks,
Shakti -
How to pass value from Javascript function to a Java class method
Hi All,
I want to pass a value, which I catch in a Javascript function to a method in a Java class. I have tried many combinations but it gives me error.
This is the way I am doing
function assignBill() {
proj = projPh.substring(0,indSlash);
<% myproject.getProj(" project_cd = '" + proj + "'");%>
proj is the variable which I want to pass to getProj methods.
If any one has done this, please let me know. Thanks for your help.
Ritesh MehtaThe only way to receive something from clients page is to submit it somehow: through a form or link, but the info has to make it back to the server obviously. I dont know how your app works, but you can use the the javascript -location.href- function(i think) to submit the var to the server and process it there.
-
Read item from Java class and call to stored function/procedure of database
Hi,
I am looking solution that I was trying to find becasue of I am not expert and novice of ADF so I am getting problem to do. I am trying migrating from oracle forms to JDeveloper[ADF].
I want to call database stored function from JSF pages by java bean class of a button press event (manually created) and after button event I have called java class which I created manually. But I can not read that values what I given into jsp page.
question1: How can I read jsp pages items value to java class ?
question2: How can I call to database stored function/procedure with that parameter?
question3: How can I use return value of that stored function/procedure ?
Please reply me .
Thanks,
zakir
===
Edited by: Zakir Hossain on Mar 29, 2009 10:22 AM---
Maybe you are looking for
-
Project Server 2010 - Assigned tasks not visible in PWA
Hi, When I enter an issue on a project site, the assigned issue is not visible in the PWA under Issues & Risks. Based on this link (http://social.technet.microsoft.com/Forums/en-US/f5abd024-3c9a-47f8-a7cb-7743fafebf2b/project-server-2010-cannot-see-a
-
Oracle Enterprise Single Sign On, multiple instances
Hi, I am implementing Oracle eSSO 11g with AD in an org. In the same org there is Oracle eSSO 10.1.+ version running on the same AD for a seperate set of groups. - How should I go about with the installation can both versions of eSSO work with same A
-
How to reduce the weight of SharePoint master page.
Hi I have given my sharePoint master page (without any additional content) & source-generated in browser. we want to reduce the weight of the page(source) can anyone tell me what are the things from the below-master page I can remove. our master page
-
Identify service failure on middle tier
My middle tier PM is getting worse. Now the identify service is failing. It sites the error stack but I don't no where to access that. The logs don't seem to show anything significant. I've gone so far as to restart the PM, rebuild the user task serv
-
I currently have Adobe Digital Edition 2.0 and am receiving the message that it has "stopped working". How do I correct this problem?