How to get the type of org.omg.CORBA.Any ?
Hi there
My q is: how can I get the type of an Any object?
Please have a look at the following code:
ORB orb = ORB.init();
org.omg.CORBA.Any anytest = orb.create_any();
anytest.insert_string("mystring");
TypeCode tc = anytest.type();
Now how can I get back that the type is String??
Regards
Brian
Hi,
Try using anytest.type().kind().value() -> should yield TCKind._tk_string. See the javadoc for more info.
I think that the only way to check types is by comparing the codes; as far as I know there is no easy way to get the equivalent Java Class object or so. But I could be wrong on that one.
Best,
Guy
Similar Messages
-
Why the stub throws org.omg.CORBA.TRANSACTION_ROLLEDBACK?
Hi,
I have a stateless session bean with a business method createAccount(). In the createAccount() implementation I call create() method on home interface of Account entity bean. I am using IBM Websphere and VisualAge3.5 environment. I have tested the Entity been in Isolation and account is created without any problems but when I try to achieve this via session bean, I get the following error:
org.omg.CORBA.TRANSACTION_ROLLEDBACK
Can anyone tell me how to correct this problem?
Thanks,
Sanjivit seems you use JTS and database process has problem
-
Org.omg.CORBA.Any
Hi there
I'm not sure if this is the right forum to post my question on but if not just ignore it.
In many EJB examples people use the corba class Any.
My q is: how can I get the type of an Any object?
Please have a look at the following code:
ORB orb = ORB.init();
org.omg.CORBA.Any anytest = orb.create_any();
anytest.insert_string("mystring");
TypeCode tc = anytest.type();
Now how can I get back that the type is String??
Regards
BrianHi
I dont think extract_TypeCode is the right method according to javadoc extract_TypeCode extracts the TypeCode object in this Any object's value field.
BAD_OPERATION will be thrown - if this Any object contains something other than a TypeCode object.
In my case the Any object might contain anything and not a TypeCode.
Extract_string does give you a string but you need to know in advance that the Any object contain a string type..
What if I dont know??
Regards
Brian -
JAXB:How to get the type of an element
Hi
I am working with JAXB 2and i am using a custom ValidationEventHandler to validate my xml document:The issue I have is that when my document isn't valid,i would like to get the error node and its type(string,date...)
I tryed node.getNodeType() but it return if the node is ATTRIBUTE_NODE,TEXT_NODE....
public boolean handleEvent(ValidationEvent ve) {
if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
ve .getSeverity()==ValidationEvent.ERROR){
ValidationEventLocator locator = ve.getLocator();
org.w3c.dom.Node node=locator.getNode();
System.out.println("ERROR element type:"+node.getNodeType());
return true;
}How could i get the type(String,Date,Integer...) of the node in error?
Edited by: riadhhwajdii on Aug 14, 2010 4:20 AMAs you already mention that is not resolved before the annotation processing stage
[ http://openjdk.java.net/groups/compiler/doc/compilation-overview/index.html]
So, you probably need to produce your own analysis code or better reuse the compiler's own code if that turns out to be easy (no clue). I reckon it is better if you avoid modifying the compiler itself as it will make much more difficult to maintain and deploy your (more than a) processor.
Sorry if you already tough about this.
Edited by: discretoboy on Apr 7, 2009 3:20 PM -
How to get the type of answer in a workitem?
Hi Experts,
I am building a report to get the users responsible for the approval of SCs and POs, in this report I need to get the type of answer given by the approver, if they have rejected, approved or partial rejected / approved the object.
When I look at the container of the workitem I can get the agent responsible for the action and the dates, but I need your help to determine the type of answer. I believe I can get this information from the approval state, no? But I am getting a lot of different approval states: 0, 1, 3, 4, 10, 11 and 15. Can you provide me some guidance? I am new to workflows and I am stuck in this point.
I am using SRM 5.0 and n-step approval workflow.
Thanks in advance,
FranciscoI'm not an SRM expert, but from a pure workflow point you can read the output of a workitem. So, check how your workflow is built and then see what values are returned in the corresponding return fields. Explore the workitem structure in the log.
-
How to get the type of numeric
Hi,
I would like to know how getting the type of a numeric data programmatically. (DBL, SDL, I16, I32,etc.)
This property is defined by selecting "Type of data" in the property's window of a numeric data; then by clicking on "representing".
I tried to find the solution by using a property node then accessing to the property called 'representing".
Without success, it seems this function is not available.
Is anyone would know the solution.
Thanks by advance,
pr93There are several solutions.
The 7.x version of the Flatten To String function had an additional output called "type string" which was actually an array of numbers. This array would tell you that information. OpenG has a VI that will tell you the datatype from this array. It's called "Get TDEnum From TD" and is in the LabVIEW Data Tools library. You can use VI Package Manager to easily install OpenG libraries.
If you have a control you could use a reference and then use the "Get Type of Control" VI from the <vi.lib>\Utility\GetType.llb library.
You could convert th"e numeric value to a variant and then use the "Get Type of Variant" VI from the <vi.lib>\Utility\GetType.llb library. -
How to get the type of user role in ISF?
We have functionality to hide all the buttons on Monitor task, which was successfully achieved by javascript. But we need to enable these buttons for only Site Administrators, so that they only can do necessary modifications upon request from end users. Can someone point me to correct direction how to get the user role when a user is not a Site Administrator. Thanks in advance.
What about having your custom ISF onload script first run a db query (on older version called a rcFetch) which would evaluate if the person loading form is a member of the site admin ou.
Here's a rough example:
ISF_onLoad()
rcFetch('Q1','Q1PL=' + UserID);
This will then run a query to validate if the person is a member of the admin ou.
SELECT * FROM DirOrganizationUnitPeople WHERE PersonID = #P1# AND OrganizationalUnitID = 1 (this should be the id of the site admin ou or the ou which you are referring to as an admin)
then have a call back to determine if any records where return, which indicate the person is a member of the site admin ou.
function Q81_DataCallback(retArray, queryList)
if (retArray['Q8500._COUNT_'] == 1)
{ *Show the fields* }
Hope this helps. -
How to get the type of the object poped from a stack
Hi,
I have a stack which contains Boolean, Integer, MyBean objects.
Now depending on the type of object pop from stack i want to perform the different operations. Right now i m doing it like this:
Object a = stk.pop(); // stk is my stack
if ( a instanceof Object)
else if( a instanceof Boolean)
else
.}but it is not working...........
when i do like this
if(stk.pop() instanceof Boolean)
else
}it works but by this i lost the poped element............ what is the standard way to do such operations.
manishAre you sure there isn't a cleaner way of doing what you are trying to achieve? You may want to take the opportunity to slightly re-think your design.
However, if you want to proceed down this route, just hold on to the object you popped, and then do the explicit case analysis on that:
Object obj = stack.pop();
if (obj instance of Boolean) {
} else if (obj instance of Integer) {
}Oh yeah, do not have the "instanceof Object" as your first check!
This will return true for any non-null reference (have a look at some java tutorials if you dont know why this is). -
How to get the web templates not specific to any locale GetAvailableWebTemplates
Hi
I am using spweb.GetAvailableWebTemplates((uint)1033, true) to get all the available web templates. Since i use 1033, i get the en-US site like Teams Site(en-US). But i would like to get the templates with locale not specific to any.
like Teams site(All)
How to achieve this.Hi,
The locale ID specified when a site definition is created which controls the default language used in the corresponding site template.
If there are no other site definitions created based on other languages, then we can pass the default locale ID(1033) to the
SPWeb.GetAvalableWebTemplates method, it will retrieve a collection of site templates which are created with locale ID 1033.
The OOTB Teams Site template is created based on the locale ID 1033, so we can use this ID to retrieve it.
Best regards
Patrick Liang
TechNet Community Support -
Trouble with org.omg.CORBA.Any Class
Not sure how to accomplish what I need. I have strings for user name and password which I need to get into a NameValuePair. The problem with the code below is that it tries to instantiate Any() which is an abstract class. How do I do this?
private Any user;
private Any password;
user = new Any();
password = new Any();
this.user.insert_string("myUserName");
this.password.insert_string("myPassword");
ArrayList parameters = new ArrayList();
parameters.add(new NameValuePair("username", this.user));
parameters.add(new NameValuePair("password", this.password));user = ORB.init().create_any();
password = ORB.init().create_any(); -
How to know the type of mobile?
how to get the type of mobile model mean under nokia asha 308(rm 352/ rm 838) which model i have when i am buying this mobile .no option to check the *#0000# option then how to get this..
Check the label on the box or under the battery.
-
How to get the role name in which query is published ?
Hi Experts,
Is there any table where i can get the name of the role in which a particular query is published. I know that if i have a role , i can check in pfcg giving that role name and in menu tab i can see all the queries published under that role. But if i know query but not role how to get the role name . Is there any table or functon modules or programs to get the information.
Thanks & Regards
Vamsi KiranCheck this table
AGR_HIER -
How to get the value of payload?
Hi
The null is returned when I use the following code to get the User_ID element in the payload, but there are values in the User_ID element of the payload
Task task_test = wfSvcClient.getTaskQueryService().getTaskDetailsById(wfCtx, taskId);
System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getNodeValue());
How to get the node value of payload ? any suggestion?
Thanks
JaysonHi Jayson,
Try:
System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getFirstChild().getNodeValue());
So add the getFirstChild() call in between.
If this works, maybe consider using JAXB to marshall the payload details to POJO's. This will make reading the payload details much easier.
Regards, Ronald -
How to get the node value of payload
Hi
The null is returned when I use the following code to get the User_ID element in the payload, but there are values in the User_ID element of the payload
Task task_test = wfSvcClient.getTaskQueryService().getTaskDetailsById(wfCtx, taskId);
System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getNodeValue());
How to get the node value of payload ? any suggestion?
Thanks
JaysonHi Jayson,
Try:
System.out.println("the payload value is " + task_test.getPayloadAsElement().getElementsByTagName("User_ID").item(0).getFirstChild().getNodeValue());
So add the getFirstChild() call in between.
If this works, maybe consider using JAXB to marshall the payload details to POJO's. This will make reading the payload details much easier.
Regards, Ronald -
Org.omg.CORBA.INTERNAL
Here's my problem; I have a CORBA object thats able to launch
any native process through the use of Runtime.exec(...). When I use
this CORBA Object to launch a batch file that starts a JavaVM
to run another CORBA Object (say OBJ2) I get an error. The error happens
when OBJ2 tries to use the ORB.resolveinitialereferences("Rootpoa"). It raises the following
exception.
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.internal.iiop.GIOPImpl.createListener(GIOPImpl.java:253)
at com.sun.corba.se.internal.iiop.GIOPImpl.getEndpoint(GIOPImpl.java:202)
at com.sun.corba.se.internal.iiop.GIOPImpl.initEndpoints(GIOPImpl.java:130)
at com.sun.corba.se.internal.POA.POAORB.getServerEndpoint(POAORB.java:489)
at com.sun.corba.se.internal.POA.POAImpl.pre_initialize(POAImpl.java:153)
at com.sun.corba.se.internal.POA.POAImpl.<init>(POAImpl.java:111)
at com.sun.corba.se.internal.POA.POAORB.makeRootPOA(POAORB.java:111)
at com.sun.corba.se.internal.POA.POAORB$1.evaluate(POAORB.java:129)
at com.sun.corba.se.internal.core.Future.evaluate(Future.java:28)
at com.sun.corba.se.internal.corba.ORB.resolveInitialReference(ORB.java:2485)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2420)
at services.LogServer.main(LogServer.java:94)
Does anyone know why this happens??
Thanks in advanceResolving the root POA tries to create a listener thread. Since your initial process already uses an ORB, it's already using that port, so OBJ2 can't use it.
Try specifying a different port for the second ORB to listen on.
Maybe you are looking for
-
Re: Leone's post May 2014 about how to best use an external drive with Aperture
I am trying to find Leone who had a great post May 2014 to Diane. I posted tho same message as a 'Reply' to the Leone/Diane posts but then was worried it would not show up since that was some time ago so I decided I should post it as new. Apologies
-
I need to find the tabs I had open from yesterday as today they didn't open
I had about 15 plus tabs open yesterday. Today I opened up, but they didn't open up, so I closed down and reopened. But they still are not there. They are not in recent history, as that shows every time I open my email etc etc... So I want to find th
-
I need to retrieve a lost Pages Document in iCloud
Yesterday I was lokking for a password in my Pages "passwords" document. Suddenly the document disappeared. I can't find it; it is completely lost. I don't have a back-up. Looking for information, it looks as if nobody ever had this problem.
-
Very Strange occurance when page with effect viewed in IE 7
I applied the spry (Fade/Appear) effect to a container. The container contains text and images. When I test the page, I noticed the images has strange white marks or scratches on them. Has anyone noticed this? This only happens in IE 7. Not Firefox.
-
Hi All! How to populate documentation on f1 help of a popup window. Please advise.. Regards Praneeth