Archived
This forum has been archived. Please start a new discussion on GitHub.
help with slice2java
lakshmiK
in Help Center
Hi all,
I 'm new to slcie2java. Can anyone help me with steps to create an projectIce.jar.?
Thanks
I 'm new to slcie2java. Can anyone help me with steps to create an projectIce.jar.?
Thanks
0
Comments
-
The java demos can be found in multiple places:
* In the Ice 3.3 source distribution they can be found in the java/demo subdirectory.
* In the Windows binary installers they are in the demoj subdirectory.
* In the demo distribution for Unix they are also found in the demoj subdirectory.
Each of these distributions also contain README/INSTALL files that include instructions for building and running the demos.0 -
slice2java translates the a Slice file (.ice) file into corresponding java source files according to the rules defined in the Java language mapping section of the Ice manual. How exactly you do this depends on your build environment. We use ant, hence the build.xml files contained in our demo distribution. If you do not use ant, then you have to determine a suitable method to do this with your build environment.0
-
interface
Hi,
In the ice file, I have something as follows.
interface Resr
{
["nonmutating"] idempotent FileSystemPr::PrStruct getPr(string RecLocator) throws PrException;
OptPr setPrXdr(Ice::ByteSeq xdrPnr) throws PrException;
}
From this I understood that in the interface resr it calls getPr which returns PrStruct of the FileSystemPr.ice . Is that correct ?
Also I want to know what is nonmutating and idempotent means.
Thanks0 -
You really need to see the Ice manual. All of these questions are answered in there.
For the slice language look at chapter 4: The Slice language. http://www.zeroc.com/doc/Ice-3.3.0/manual/Slice.html#49350
For idempotent see http://www.zeroc.com/doc/Ice-3.3.0/manual/Overview.3.2.html (look for "At-Most-Once Semantics"). For nonmutating look at http://www.zeroc.com/doc/Ice-3.3.0/reference/Ice/OperationMode.html. Note that nonmutating is deprecated and should not be used any longer.0 -
There is no built-in feature to turn a Slice sequence into a string. You can write your own method that iterates over the sequence and stringifies it.
Alternatively, you can compile the Slice definition with --stream and use the generated helper class to serialize the sequence into a byte stream. You could then encode the result using a base-64 encoding or some such.
See the Dynamic Ice chapter in the manual for more info.
Cheers,
Michi.0
