Retrieve experience def properties via the Remote API? - Remote APIs(Archived)

Is this possible?
The money line if it were possible is here:
IObjectManager objManager = remoteSession.GetObjectManager(ObjectClass.IWishExpereinceDefinitionWereHere);
So anyone ever retrieved experience definition (obj class = 8) object properties using the remote api?

Related

Unable to Reference oracle.jdbc Package in EJB Project

We're bumping into an issue where we can reference the oracle.jdbc package in WebLogic 8.1 Web Projects but not in any other type of project (Java, EJB, etc.).
We're trying to include an Oracle Stored Procedure call in a Session Bean and are unable to reference the oracle.jdbc.OracleCallableStatement object.
Is there something different about the libraries available for use in the Web project that doesn't apply to the other projects?
Any help here would be greatly appreciated. 
Paul Merrigan wrote:
We're bumping into an issue where we can reference the oracle.jdbc package in WebLogic 8.1 Web Projects but not in any other type of project (Java, EJB, etc.).
We're trying to include an Oracle Stored Procedure call in a Session Bean and are unable to reference the oracle.jdbc.OracleCallableStatement object.Tell me why you need to declare an OracleCallableStatement? I may
be able to show you how to do what you want using standard JDBC.
Are you even using WebLogic JDBC connection pools?
Joe
Is there something different about the libraries available for use in the Web project that doesn't apply to the other projects?
Any help here would be greatly appreciated. 
The Oracle Stored Procedure we're calling has table return types and the standard CallableStatement is not able to reference them.
Here's a section of code:
con = ConnectionHelper.getConnection("myDataSource");
con.setAutoCommit(false);
OracleCallableStatement stmt = (OracleCallableStatement)con.prepareCall("{ call my_procedure(?,?,?,?,?,?,?) }");
// Bind the input parameters
stmt.setLong(1,107773);
stmt.setString(2,"032007");
// Register the table output parameters
stmt.registerIndexTableOutParameter(3,500,OracleTypes.VARCHAR,10);
stmt.registerIndexTableOutParameter(4,500,OracleTypes.VARCHAR,10);
stmt.registerIndexTableOutParameter(5,500,OracleTypes.VARCHAR,10);
stmt.registerIndexTableOutParameter(6,500,OracleTypes.VARCHAR,10);
stmt.registerIndexTableOutParameter(7,500,OracleTypes.VARCHAR,10);
// execute the statement
stmt.execute();
// Get the output values. Note the use of the index table get method that retrieves an array of Datum
// objects. These objects have methods to get the appropriate data typed element
Datum[] dt1 = stmt.getOraclePlsqlIndexTable(3);
Datum[] dt2 = stmt.getOraclePlsqlIndexTable(4);
Datum[] dt3 = stmt.getOraclePlsqlIndexTable(5);
Datum[] dt4 = stmt.getOraclePlsqlIndexTable(6);
Datum[] dt5 = stmt.getOraclePlsqlIndexTable(7);
System.out.println("Date = " + d);
System.out.println("Datum = ");
for (int i = 0; i < dt1.length; i++) {
System.out.println("" + i + " = " + dt1.stringValue());
} 
Paul Merrigan wrote:
The Oracle Stored Procedure we're calling has table return types and the standard CallableStatement is not able to reference them.
Here's a section of code:
con = ConnectionHelper.getConnection("myDataSource");
con.setAutoCommit(false);
OracleCallableStatement stmt = (OracleCallableStatement)con.prepareCall("{ call my_procedure(?,?,?,?,?,?,?) }");
// Bind the input parameters
stmt.setLong(1,107773);
stmt.setString(2,"032007");
// Register the table output parameters
stmt.registerIndexTableOutParameter(3,500,OracleTypes.VARCHAR,10);
...
Datum[] dt5 = stmt.getOraclePlsqlIndexTable(7);I see. The way to access this from WebLogic 8.1 with our pools,
is to cast the statement as a weblogic.jdbc.vendor.oracle.OracleCallableStatement
so you can call those methods.
Joe 
I looked at this but some Weblogic documentation kept me away from it.
http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1082276
In here they mention that the weblogic.jdbc.vendor.oracle.OracleCallableStatement is deprecated and should be replaced by the oracle.jdbc.OracleCallableStatement.
We're adding the ojdbc14.jar file to our APP-INF/lib directory and that seems to solve the problem of the EJB project not seeing the classes. But I'm still confused by a web project being able to see these classes with no classpath changes while an EJB project needs the jar file in the APP-INF/lib.

Server API and Getting Users from a Group

Hi All
I am trying to get users of a particular group by using IPTObjectmanger.
DO anyone have IDea related to users membership in ALUI portal. Also do anyone have any code snippets for server API usage.
Thanks
Salim 
From the userGroupManager object you can get the PTGroup:
IPTUserGroup objPTGroup = (IPTUserGroup)objUserGroupManager.Open(groupId,false);
Then, simply :
IPTQueryResult queryResults = objPTGroup.QueryUsers();
Returned properties (from PT server doc) include PT_PROPID_OBJECTID, PT_PROPID_NAME, PT_PROPID_DESCRIPTION, PT_PROPID_ISLOCALIZED, PT_PROPID_USER_UNIQUENAME, PT_PROPID_USER_LOGINNAME.
Then, iterate over the query result to get the info...
Hope that helps.
Fabien 
Hi,
I think the IPTUserGroup is available in Server API. Can you give some idea of how to use server API becoz I think they dont work with normal EDK?
Do I need to Setup UICI for this?
Sorry for sounding Naive...
Thanks
Salim 
Hi
I was able to use these api by referencing Portal apis but I am Having error.
My Code is:
================================================
edk = Plumtree.Remote.Portlet.PortletContextFactory.CreatePortletContext(Request, Response);
                    session=edk.GetRemotePortalSession();
                    string lToken = session.GetLoginToken();
                    IPTSession ses = PortalObjectsFactory.CreateSession();
                    ses.Reconnect(lToken);
                    IPTObjectManager mygroup=ses.GetUserGroups();
                    IPTUserGroup objPTGroup = (IPTUserGroup)mygroup.Open(1,false);
                    IPTQueryResult queryResults = objPTGroup.QueryUsers();
                    Response.Write(queryResults.RowCount());
================================================
The error is on the bold line it says I need to first use INIT method. Not sure what is that:-( 
To create a native portal session, you can use this code below:
private void initSession(String sApplicationName){
//Initialize OpenKernel, telling OpenConfig where to get it's stuff
String strServerConfigDir = ConfigPathResolver.GetOpenConfigPath();
if (sApplicationName == null)
sApplicationName = DEFAULT_APP_NAME; //"portal"
IOKContext configContext = OKConfigFactory.createInstance(strServerConfigDir, sApplicationName);
PortalObjectsFactory.Init(configContext);
//connect using the Portal Server Session
this.portalNativeSession = PortalObjectsFactory.CreateSession();
}
Then you can connect using :
this.portalNativeSession.Connect(userID, password, securityProviderInfo);

How to create/get an OrdDicom instance

Hey, guys, does anyone try to use the OrdDicom.jar to do some development? Now I have a rookie question: how to create/get an OrdDicom instance?
It seems the OrdDicom class's construtor is private and no related factory method, so is there some other way to create an empty OrdDicom instance? 
The oracle.ord.dicom.OrdDicom Java class defines a proxy object for ORDDicom. ORDDicom is the database type for a DICOM object. This means that OrdDicom is instantiated only from an Oracle result set and thus functions as a proxy for the same object in the database.
We don't have a specific code example for using OrdDicom but it would work very much like OrdImage which is the proxy Java class for ORDImage in the database. Here is a quick start example for using the Java client proxy class for OrdImage.
http://www.oracle.com/technology/products/intermedia/htdocs/intermedia_quickstart/intermedia_java_qs.html
Here is a code snippet showing how the Java class is instantiated from the result set.
===============================
     2.      Get a proxy for the ORDImage database object in row 1 in the OrdImage Java proxy object imageProxy (NOTE that since we will be uploading data into the ORDImage’s underlying BLOB column, the row must be selected with the FOR UPDATE clause).
// select the new ORDImage into a java proxy OrdImage object (imageProxy)
String rowSelectSQL = "select image from image_table where id = 1 for update";
OracleResultSet rset = (OracleResultSet)stmt.executeQuery(rowSelectSQL);
rset.next();
OrdImage imageProxy = (OrdImage)rset.getORAData("image", OrdImage.getORADataFactory());
rset.close();
==========================================================
Finally, are you developing a DICOM application using the new feature in Oracle 11g? If so, we'd like to here more about what you're doing and how we might be of help. Please contact our product manager MELLIYAL (dot) ANNAMALAI (at) ORACLE (dot) COM for more info.

Populate String[] Property in BPM 10.3

Hi, all.       I'm fairly new to BPM and inherited our current projects with little training (I am a team of one.) I've went through the tutorial and reviewed many of the APIs available, but am unable to figure out this seemingly simple problem, which is to populate a String[] property of the request data object. There is a while loop that is doing something similar in the same activity and precedes my code.  riskList[] is a the result of a web service call. I’m trying to mimic similar behavior, but with a SQL Query catalog component object.       Currently working code:       while (j < riskList.count()) {RiskList element1 = riskList[j];myDataObject.lstRiskElement[] = element1.risk;…j = j + 1;}       My Code:       for ( GetList myList: GetList() ){myDataObject.validListItems[] = myList.itemtext; //Fails: NullPointerException}       I'm relatively confident that myList.itemtext has a value as I'm outputting it in the log before trying to perform the assignment. I've tried several variations that include using ArrayList.add() and converting to a String[] afterwards, but they all fail. This one wouldn't compile unless the cast was not an array. That is (String) and not (String[]).       ArrayList myTemp = new ArrayList();for ( GetList myList : GetList() ){myTemp.add(myList.itemtext); //works. log shows values.}myDataObject.validListItems[] = (String) myTemp.toArray(); //Fails: NullPointerException             After some searching, I’ve tried to do this instead, but it wouldn't compile because the methods aren't recognized. I understand that BPM Java is more "java-like", so some common methods aren't available.         ArrayList myTemp = new ArrayList();for ( GetList myList: GetList() ){myTemp.add(myList.itemtext);}loc_myDataObject.validListItems[] = myTemp.toArray(new String[myTemp.size()]); //Won't compile. Method no recognized.       Any thoughts on this? Any help would be appreciated.

Accessing EnvironmentProperty entries from an EJB

Does anyone know how to access environment entries from within an EJB? One of the examples in the ejb/corba devguide contains the following:
// Add any environment properties that
// the bean requires
EnvironmentProperties {
prop1 = "value1";
prop2 = "value two";
}
Yet there are no examples or instructions on how to access them anywhere in the document, nor in any of the other Java documents, that I've found.
I've tried the following from within my ejb:
Context Initial = new InitialContext();
String prop1 = (String)initial.lookup("prop1");
This does not work. Neither does a string of the form "java:comp/env/prop1".
Anybody know how to access these properties?
Cheers,
ax
null 
In answer to my own question, use the SessionContext getEnvironment() method.
ax
null

Categories

Resources