Constant values (public static final String) are not shown??

This has already been posted and no body answered. Any help is appreciated.
In web service is it possible to expose the Constants used in the application. Let say for my web service I need to pass value for Operation, possible values for this are (add, delete, update). Is it possible expose these constant values(add, delete, update) visible to client application accesssing the web service.
Server Side:
public static final String ADD = "ADDOPP";
public static final String DELETE = "DELETEOPP";
public static final String UPDATE = "UPDATEOPP";
client Side: mywebserviceport.setOperation( mywebservicePort.ADD );
thanks
vijay

Sure, you can use JAX-WS and enums.
For example on the server:
@WebService
public class echo {
public enum Status {RED, YELLOW, GREEN}
@WebMethod
public Status echoStatus(Status status) {
return status;
on the client you get.
@WebService(name = "Echo", wsdlLocation ="..." )
public interface Echo {
@WebMethod
public Status echoStatus(
@WebParam(name = "arg0", targetNamespace = "")
Status arg0);
@XmlEnum
public enum Status {
GREEN,
RED,
YELLOW;
public String value() {
return name();
public static Status fromValue(String v) {
return valueOf(v);
}

Similar Messages

  • Default values for static report parameters are not visible when scheduling

    Hello
    Crystal Reports 2008 Dev
    Crystal Reports Server 2008
    When I publish a report to the repository and then try to schedule that report, the default value that I have set for a static parameter in the report is not visible.
    In the Parameters section of the Scheduling wizard this parameter is marked as [EMPTY]
    However, when I View the report (right click and select View) from within Infoview, the parameter default value is visible
    I have published in the following 3 ways:
    Publishing Wizard
    File > Save As > Enterprise from withing Crystal Reports Dev
    CMC > Folders > Add > Crystal Reports
    The results are the same for each method of publishing.
    To try to eliminate any DB issues etc i have created a report that is not attached to a datasource. 
    This test report has one Static parameter. 
    I have set 3 values for its list: Entry A, Entry B, Entry C
    Entry X is set as the parameter Default Value
    The parameter is placed in the details section of the report
    When the report is Viewed it will prompt for parameter entry, with the default value present
    When I try to schedule the report is will not have an entry for its parameter
    It seems to me that the default values for parameters should be retained from report design through to report schedule, especially when the default values are retained from report design to report View
    Is this a config problem that i have ?
    Can anyone help me with this ?
    Best regards
    Patrick Coote
    Edited by: PATRICK COOTE on Oct 2, 2008 2:08 PM
    Edited by: PATRICK COOTE on Oct 3, 2008 9:23 AM

    Hi Robert
    Thanks for the reply and apologies for not responding sooner.
    What i have found is that if i use Publishing Wizard to upload reports it is then possible to set values for prompts during the last step of this process.
    Although this is a bit clumsy, it is sufficient for now
    Best regards
    Patrick

  • Static final String

    Any body know hat this following code means?
    public static final String JAVA_HOME = System.getProperty("java.home");
    public static final String CURRENT_DIR = System.getProperty("user.dir");
    thanks you

    It defines two object variables (JAVA_HOME and CURRENT_DIR), that are:
    static - there's only ever one of them, no matter how many times the class they are in is instantiated.
    final - cannot be changed.
    public - available to all other classes outside of the current class.
    The two variables are then assigned to system properties, for a list of system properties and their meanings look here:
    http://java.sun.com/docs/books/tutorial/essential/system/properties.html
    A 'static final' variable is called a 'constant'. It is very useful when you want to define a variable and keep it that way. For example, if you wrote a program that worked out the area of a circle, you might want a static final variable PI = 3.14159.
    Constant variables are usually defined in uppercase. This is not forced, but it's good practice.

  • Enum vs static final String

    I was going to use static final Strings as enumerated constants in my application, but would like to see if I should be using enums instead.
    In terms of efficiency, if I have, say, 5 enumerated elements, will only one copy of the enumerated element be in memory, like a static final String? So regardless of how many times I refer to it, all references point to the same instance (I'm not sure if what I just said even makes sense in the context of enums, but perhaps you could clarify).
    Are there any reasons why for enumerated constants that are known at development time, why static final Strings (or static final anything, for that matter) should be used instead of enums if you're using JDK 1.5?
    Thanks.

    In terms of efficiency, if I have, say, 5 enumerated elements, will only one copy of
    the enumerated element be in memory, like a static final String?I don't know if it addesses your concerns, but the the Java Language Specification says this about enums: "It is a compile-time error to attempt to explicitly instantiate an enum type (�15.9.1). The final clone method in Enum ensures that enum constants can never be cloned, and the special treatment by the serialization mechanism ensures that duplicate instances are never created as a result of deserialization. Reflective instantiation of enum types is prohibited. Together, these four things ensure that no instances of an enum type exist beyond those defined by the enum constants." (http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9)
    As for the problems of memory usage, how big are these strings anyway?
    The advantages of using enums over static final strings are discussed in the "technotes" accompanying 1.5 http://java.sun.com/javase/6/docs/technotes/guides/language/enums.html They list the following as problems with the static final "antipattern"
      * It is not typesafe (methods that expect one of your constants can be sent any old string)
      * There is no name space - so you must continually be sure that your constants don't have names that may be confused
      * Brittleness. Your strings will be compiled into the clients that use them. Then later you add a new constant...
    �  * Printed values will be uninformative. Perhaps less of a problem for Strings, but, still, simply printing the string will leave its semantic significance obscure.

  • Trying to acces the value of a public static final int using reflection

    -Java 6
    -Windows XP
    -Signed Applet
    doing the following:
    Class.forName(classname).getField(code).getInt(null);
    is giving me the error:
    java.lang.IllegalAccessException: Class com.cc.applet.util.ServiceConfiguration can not access a member of class com.cc.util.error.codes.SendMessageErrorCodes with modifiers "public static final"
         at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
         at java.lang.reflect.Field.doSecurityCheck(Unknown Source)
         at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
         at java.lang.reflect.Field.getInt(Unknown Source)
    I'm not understanding why it can't access the value of the field. Any help would be great.
    Edited by: zparticle on Oct 17, 2007 11:07 PM

    stefan.schulz wrote:
    oebert, you are right. Good one.
    I actually think that, in this case, the message is misleading. The current implementation of sun.reflect.Reflection.ensureMemberAccess() treats any failing access check the same. It should and could inculde better contextual information.Stefan,
    That is a good point. Did you file a RFE with Sun yet? I also think they should provide a more contextual error message in this case.
    Gili

  • Public static final Comparator String CASE_INSENSITIVE_ORDER

    in this declaration..
    public static final Comparator<String> CASE_INSENSITIVE_ORDER
    what does <String> mean?
    thanks!

    what does the Comparator do. Look at the API and you would see the following description about the compare method.
    public int compare(Object o1,
    Object o2)Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
    The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)
    The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.
    Finally, the implementer must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.
    It is generally the case, but not strictly required that (compare(x, y)==0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is "Note: this comparator imposes orderings that are inconsistent with equals."
    Now your question is about what <String> is in your declaration. It is the type of the objects which are going to be compared.

  • 'private static final String' constants vs inline constants

    Other than source code readability and maintainability, is there any runtime benefit from declaring String constants as 'private static final' in your code? Does this effect the way the String is stored in memory in the constant pool?
    Thanks, Kevin

    I guess my question really is, is this String declared inline:
    System.out.println("some constant");treated any different internally in memory at runtime compared with this:
    System.out.println(SOME_CONSTANT);
    private static final String SOME_CONSTANT = "some constant";Since both Strings end up in the Constant Pool, how is declaring it 'static final' of any benefit in terms of performance?

  • Declaring public static final variables in jsp?

    The question is in the title...
    I know this is not a jsp forum, but some people here might know if it's possible or not.
    If yes, how to declare them and how to access them from other jsp pages?
    Thx

    If you need that, you definitely do too much work in your JSPs. You should do all your work in Servlets (or Actions if you're using Struts or something similar).
    Your JSPs should only do the presentation.
    Remember that JSPs are not classes (they are compiled into classes internally, but you don't have direct access to those).
    If you absolutely need such a public static final field that you want to access from several JSPs, just define it in a Class and reference that class from your JSPs.

  • FA-retirement-Asset value date and posting date are not in same fisc year

    Hello,
    I would like to post retirement in the new fiscal year but with asset value date in the previous year so that NBV is calculated correctly. It is not possible neither in ABAON nor in ABAVN with any transaction type.
    I always get message 'Asset value date and posting date are not in same fiscal year'.
    Is there any way how to handle this?
    Thank you,
    Jan

    Hi,
    I have tried this but the settings of our Depr keys works in the way. That if you use asset value date in the new month it will calculate depreciation for the whole month.
    This means if I retire with asset value date 31.12.2008 - NBV will be calculated as at 31.12.2008.
    If I retire with asset value date 1.1.2008 - NBV will be calculated as at 31.1.2009.
    Thank you anyway!

  • Asset value date and posting date are not in same fiscal year

    Hi,
    Our business user has created an asset under an incorrect asset class, which he is trying to transfer to a new asset whcih was created under correct asset class. However system is restricting user with the error message "Asset value date and posting date are not in same fiscal year". Can you please advise me how we can proceed further with this error.
    Regards,
    Asam.

    Hi,
    To transfer one asset to another asset within a company code can be done through ABUMN only.
    While doing this transfer you have enter the document date, posting date, and value date for the transaction, but all these dates should be in same fiscal year only.
    In your case you must have been entered the dates for asset value date and posting date , and these two dates are in diff financial years.
    Please make sure that both the dates are in same FY.
    Hope this will fix your issue.
    Thanks,
    Srinu

  • Assessable value and the Excise details are NOT coming in MIGO

    We are facing problem that assessable value and the Excise details are NOT getting populated automatically when doing MIGO in IN03 plant.We have a STO from a DC to plant. We created the outbound delivery and then captured the excise invoice using J1IJ.In migo we give the reference of this excise invoice in the excise invoice tab then the values calculated should flow in MIGO.This is not happening and user have to manually calculate the tax and put in the system.
    I have followed the following steps
    1. Create STO PO ME21N
    2. Create outbound delivery using VL10B
    3. Do the PGI using VL02N
    4. Capture the exice invoice using J1IJ in depot
    5. Do MIGO and give the reference of the excise invoice created

    Hi,
    In STO, your supplying plant is your Vendor for the receiving plant. Hence, you have to maintain the supplying plant as vendor also. Pl. check in table J1ID that the vendor data is maintained for the supplying plant.
    Regards,
    Prashant

  • Measure Values are not shown in the pivot tables

    Measures without aggregation (in rpd) are not shown in pivot table.
    Im trying to add multiple columns in the fact table as measures,one which is summable had has the SUM function and three which are not summable.
    The initial report will be as follows and I have been able to get the data displayed.
    Year | Month| Company Name| SUM(C1)| C2|C3
    However if I pivot the table as follows data in column C2 and C3 are not Displayed.
    Columns
         Year     
              Month     
              Company     
    Rows                    
    Measure Lablel                    
    Measures
         SUM(C1)     
                   C2     
                   C3                    
    Should we have an aggregation rule applued in C2 and C3 ?

    Yes, all the column entries must have agg rule. You can specify one such as 'first' in the pivot table.

  • Why the distant objects are not shown ?

    Hi , everyone .
    The distant objects are not shown unless moving the view closer to them in Java3D .
    How to change or set to show the distant objects without moving the view ?
    Anyone on any information or advice would be helpful.
    3QS !!!
    PS: using the defualt virtual universe : SimpleUniverse

    When you are creating the View Object do something like this:
    // Set up the Front Clipping Distance - in Virtual Eye Coordinates
    myView.setFrontClipPolicy( View.VIRTUAL_EYE );
    myView.setFrontClipDistance( FRONT_CLIP_DISTANCE );
    // Set up the Back Clipping Distance - In Virtual Eye Coordinates
    myView.setBackClipPolicy( View.VIRTUAL_EYE );
    myView.setBackClipDistance( BACK_CLIP_DISTANCE );
    The VIRTUAL_EYE can be replaced by PHYSICAL_EYE and a few others(check javadocs for View for more info)
    and the FRONT_CLIP_DISTANCE and BACK_CLIP_DISTANCE are just :
    public static final double FRONT_CLIP_DISTANCE = 0.1; // 0.1 Virtual Meters
    public static final double BACK_CLIP_DISTANCE = 100; // 100 Virtual Meters
    so to get your objects in the distance to render at a greater distance from them, then just increase the BACK_CLIP_DISTANCE to 1000 or something like that
    NOTE: the larger the BACK_CLIP_DISTANCE, the longer and slower it will take to render you scene each frame. YOU WILL PAY FOR THIS (in CPU time)
    Hope this helps
    -- Rob

  • Certain symbols are not shown ( see screen shot) How to resolve?

    From this website the logo and arrows are not shown whereas when I am using internet explorer they do show up. What is wrong in my settings and how to adjust these?

    Hello,
    As I can see it is a narrow box with two rows of two characters? Firefox displays that code when it cannot find the corresponding character in any available font. The most common reason to see this is that some sites are now replacing image icons with font characters that Firefox has to download. If you have set Firefox to:
    * use only your preferred fonts instead of the page's preferred fonts
    * not download fonts (either in about:config or using the NoScript extension)
    then you would need to change that in order to see the icons.
    First check your font settings here:
    "3-bar" menu button (or Tools menu) > Options > Content
    Click the Advanced button and make sure there is a check in the box for "Allow pages to choose their own fonts".
    If you change that, try reloading the page. Does Firefox load the missing icons?
    If that doesn't fix the issue then do the following:
    You can check the '''gfx.downloadable_fonts.enabled''' pref on the '''about:config''' page (you can go to it by typing about:config in your address bar) and make sure that it is set to true (if necessary double-click the line to toggle its value).
    Sometimes it also happens because of the slow connection. Due to slow connection the text which takes less space are somehow downloaded but the image couldn't get downloaded within the connection time frame.
    Hope it helps.

  • In my Apple Macbook Air, most of the USB Flash/Thumb Drives are not shown in the Finder Window. Only a few Brands of USB /Flash Thumb Drives are shown or compatible or shown in the Finder. How do I use any Flash/Thumb Drive with my Apple MacAir?

    In my Apple Macbook Air, most of the USB Flash/Thumb Drives are not shown in the Finder Window. Only a few Brands of USB /Flash Thumb Drives are shown or compatible or shown in the Finder. How do I use any Flash/Thumb Drive with my Apple MacAir?

    Yes, junker thumb drives pour like rain in the market.  
    Which makes are working on your Air, and which arent?
    Stick to Sandisk and a couple of other reliable mfg. of memory sticks

Maybe you are looking for

  • Schedule to email

    Hi, I am new to crystalreports.com and want to ask about the schedule to email/PDF feature.  I tried to schedule an email for a report file and got a message saying "The scheduling function is only allowed for reports with a salesforce.com, an xml, o

  • XI 2.0, JDBC-Adapter and Oracle

    Hello together, at the moment I'm working on a scenario, at this I have to write data in a CLOB-Field of a table in a Oracle 9i database. My problem now is, that I only can write a string with a maximum length of 3000 chars directly in the database.

  • OIM 11gR2 - Error when trying to view task details

    I am having an issue [very similar to this one|https://forums.oracle.com/forums/thread.jspa?messageID=10667996]. When we are in the identity module (/identity), under the Pending Approvals tab, and we click on one of the approval or fulfillment tasks

  • Why can't I use Amazon prime through Apple TV?  Is there a plan to fix this?

    Apparently Apple has no app to allow Amazon prime to play through Apple TV.  Any ways to fix this?

  • JSP Compile Woes

    Hi All;           I am using WLS 5.1 sp9/10 on a RH6.2 Box. I have a WAR application, and I           get strangeness. When sp9 is in use, one of my JSPs fails to load and I           don't know why. The JSP works fine in DEV, but in PRD I get the st