Methods (passing params) & loops

Evening all, i'm having a problem with some repetition in my code here. I've been troubleshooting it for the past hour now and haven't got any further.
I'm calling methods from the main class, but this one is a little fudged.
/*Program to call
*methods which are
*created after the
*main class
import java.util.*;
public class FunctionName1050
     public static void main(String[] args)
     String prompt = "Enter a number from 10 to 50";
     int num1 = 10;
     int num2 = 50;
     tenTofifty(prompt, num1, num2);
     public static int tenTofifty(String prompt, int num1, int num2)
          Scanner kybd = new Scanner(System.in);
          System.out.print(prompt);
          System.out.println("\n");
          while(kybd.nextInt() <num1 || kybd.nextInt() >num2)
          System.out.print(prompt);
          System.out.println("\n");
          return kybd.nextInt();
}As you can see, I simply want my tenTofifty method to quit if the user enters a number between 10 & 50. I can't return the value before my while loop else it can not be reached, should I be using a different loop? I need an iterative loop which continues and then exits when the user enters the correct number.
The loop itself works, but does not quit when I enter between 10-50, a further 2 lines of random values can be entered before it quits.
Can anybody spot my mistake?
Message was edited by:
Drew___
null

import java.util.*;
public class FunctionName1050
     public static void main(String[] args)
     String prompt = "Enter a number from 10 to 50";
     int num1 = 10;
     int num2 = 50;
     tenTofifty(prompt, num1, num2);
     public static int tenTofifty(String prompt, int num1, int num2)
          Scanner kybd = new Scanner(System.in);
          System.out.print(prompt);
          System.out.println("\n");
          int i = kybd.nextInt();
          while(i <num1 || i >num2)
          System.out.print(prompt);
          System.out.println("\n");
                i = kybd.nextInt();
          return i;
}

Similar Messages

  • JRC with JavaBeans datasrc - how to pass params into javabean.getResultSet?

    Hi.
    I'm developing javabeans data sources for crystal reports for the java/JRC engine.  I've seen the document entitled Javabeans Connectivity for Crystal.  It TALKS ABOUT passing params into the methods that return java.sql.ResultSets but there is absolutely no example code anywhere that I can find on how to do it.
    What I don't understand is:  Since the JRC engine is basically controlling the instantiation of the javabean, other than calling some type of fetch method in the constructor, how the heck am I supposed to pass in db connection info and a sql string? 
    Anybody got sample code for how to call/where to call parameters that I would put in a custom getResultSet method??
    Thanks.

    I don't think that a Connection Pool class would be an ideal candidate for becoming a JavaBean. One of the most prevalent use of a JavaBean class it to use it as a data object to collect data from your presentation layer (viz. HTML form) and transfer it to your business layer. If the request parameter names match the Bean's property names, a bean can automatically get these values and initialize itself even though it has a zero argument ctor. Then a Bean could call methods in the business layer to do some processing, to persist itself etc.

  • Passing params to custom tag from jsp

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

  • Dynamic return types? (public T extends E Vector T method(T param)

    Is it possible to have a method that returns Vector<MyType extends MyBaseType> dynamically? So that I could call the method using something like
    Vector<MyType> test1 = method(new MyType());
    as well as
    Vector<MyBaseType> test2 = method(new MyBaseType());
    For the first call, method would do something like
    Vector<MyType> retval = new Vector<MyType>();
    MyType c1 = new MyType();
    retval.add(c1);
    and for the second call
    Vector<MyBaseType> retval = new Vector<MyBaseType>();
    MyBaseType c1 = new MyBaseType();
    retval.add(c1);
    The best I've managed to come up with after going through various online sources (the most helpful being Gilad Bracha's generics tutorial) was
    public <T extends MyBaseType> Vector<T> test(T param)
    Class<T> entry2 = (Class<T>) param.getClass();
    Vector<T> retval = new Vector<T>();
    retval.add(entry2);
    return retval;
    But that doesn't even compile.
    I could also live having to specify an instance of Vector<T> (e.g. Vector<MyType>) as method parameter (but I'd still need to be able to instantiate objects of MyType in the method body and add those to the vector.

    >
    Hi there: in the future, please highlight your code and click the CODE button in the editor to format your code properly.
    You're close with your attempt. You can fix it by doing this:
       public <T extends MyBaseType> Vector<T> test(T param)
             throws IllegalAccessException, InstantiationException {
          Class<T> entry2 = (Class<T>) param.getClass();
          Vector<T> retval = new Vector<T>();
          retval.add(entry2.newInstance());
          return retval;
       }But you're better off, if possible, to do something like this:
       public <T extends MyBaseType> Vector<T> test(Class<T> type)
             throws IllegalAccessException, InstantiationException {
          Vector<T> retval = new Vector<T>();
          retval.add(type.newInstance());
          return retval;
       }This assumes you were just passing "param" to tell the method the type to use. If the parameter you're passing is what you actually want to add to the vector, it's really simple:
       public <T extends MyBaseType> Vector<T> test(T param) {
          Vector<T> retval = new Vector<T>();
          retval.add(param);
          return retval;
    Edit: Rereading your original post, it looks like yes, you need to create the instance in the method itself. So the second snippit is the one you want. Remember that this would require the type to have a visible, no-argument constructor.
    Edited by: endasil on 19-Oct-2009 11:16 AM

  • Workflow step (Approve Action) calling custom Java Service and "passing params"

    Good Afternoon, Fellow Coders!
    Normally I research and do proof of concepts until I find a solution but given super tight deadlines, I just don't have time - so I need your help.
    I am trying to have an Workflow Approve Action (Workflow Exit Event idocScript call) call a Custom Component (Java Service) AND "pass" some kind of parameters (bare minimum dDocName)
    In a perfect world it would be as simple as:    processContentInfo(String dDocName, String xMyCode1, String xMyCode2);
    But since I am calling the Java Service from idocScript (via executeService) I cannot directly pass params via the API.
    Is there a simple way to do this??
    It seems like if you can't directly pass params you could at least set them in the managed container (m_binder) and just know to pick them up on the Java side via some DataBinder like m_binder.getLocal(
    Am I missing a simple idocScript function that will let you do this?
    Note: I am NOT executing the Service from a URL so the normal ?param1&param2 -> m_binder.getLocal  solution is no good.
    Also, Bex's book warns about Service Classes "not easily being able to call other UCM Services"....  My Custom Service needs to do exactly that (as well as JDBC and other stuff). Is this really an issue??
    Seems like as long as I have dDocName I could use RIDC to hit whatever I want as long as I know how to use a binder, etc - is there some mystic nuance that prevents this?  Or was he just saying it's hard UNLESS you know RIDC well??
    Any and all quality advice is appreciated!  And please, try to give me a detailed answer as opposed to something vague like "try a Service Handler", I need something I can quickly digest.
    Thanks in advance!

    You can set parameters for the service call by setting Idoc Script variables before you call executeService.
    <$dDocName="TEST12345"$>
    <$param1="09876"$>
    <$param2="ABCDEFG"$>
    These variables are then available via the service DataBinder.
    Here is information about how to execute a service from a custom component. There should not be any issues doing this.
    http://www.redstonecontentsolutions.com/5/post/2012/05/executing-a-service-from-aservicehandler.html
    http://jonathanhult.com/blog/2012/06/execute-a-service-from-a-java-filter/
    Jonathan
    http://jonathanhult.com

  • Open Document Method Passing Parameter and Logoon Toke Examples

    I'm looking for Open Document Method Passing Parameter and Logoon Toke Examples. Is it possilbe for a user inside the firewall to click a url link with all the logon token and parameters built in using open document method, i have not bee able examples? Thanks

    Hi,
    Make sure to apply the latest Patch2.11 and retest.
    Also, please state your datasource type. This can influence the syntax (i.e. when passign BEx variable values)
    Finally, have you tried the Web (DHTML) editor (bilaunchpad webi preference)?  it has an OpenDocument 'wizard' to help you build-up the correct syntax . 
    please do the 2 above steps, and get back to us.
    Regards,
    H

  • How to pass params to another class which accepts keyboard input?

    How can I pass params to a stand-alone Java class that, when executed, gathers params using readLine()?
    In other words, MyClass, when executed from the command-line, uses readLine to gather params for program execution. I'd like to test this class by calling it from another class using Runtime.exec("java MyClass") or calling MyClass.main(args) directly. But, how can I simulate the input expected from the keyboard?
    Thanks!

    Alright, so it looks like this:
    proc = Runtime.getRuntime().exec("java Client");
    br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    bw = new BufferedWriter(new OutputStreamWriter(proc.getOutputStream()));
    bw.write("test");
    bw.newLine();
    But, how can write doesn't seem to be passed to the original client class.
    Suggestions?

  • Passing param to portlet

    Hi,
    I want to pass param to portlet. I've the right param in the URL and I know that I've to use the wwpro_api_parameters and the show_portlet procedure. But I do'nt know where is this procedure (show_portlet) or where i've to create it.
    Please, help
    Tks

    Hi,
    I want to pass param to portlet. I've the right param in the URL and I know that I've to use the wwpro_api_parameters and the show_portlet procedure. But I do'nt know where is this procedure (show_portlet) or where i've to create it.
    Please, help
    Tks

  • Passing params to the AMImp method from backing bean

    Hello. I am an ADF/Jdeveloper Noob and i have a requirement where I have created an AM method below and exposed it to my View Controller.
    I am using Jdeveloper 11..1.1.4 to doe this.
    //In AM
    public boolean createSRTask(String sourceName, Number sourceRow)
    //insert new row in the Entity Object.
    EntityDefImpl SRTaskDef = MassSrImportEOImpl.getDefinitionObject();
    MassSrImportEOImpl newSRTask = (MassSrImportEOImpl)SRTaskDef.createInstance2(getDBTransaction(), null);
    newSRTask.setSourceName(sourceName);
    newSRTask.setSourceRow(sourceRow);
    return(true);
    I have a text file i am reading and I get the parameters from processing that file when the user presses the upload button... I can loop thru the file contents etc. with no issues but i have yet
    to figure out how to code the backing bean to call the AMImp method with the parameters I have read in.
    Thank you in advance for any help.
    Edited by: 832187 on Jan 16, 2012 6:51 AM
    Edited by: 832187 on Jan 16, 2012 7:01 AM

    In this case you should build a VO which is build on EO, add it to the data model of the application module. The you can either implement the service method in the VO or the application module. Let's assume you put it in the am (application module) like you already did. the method there would look like
    //In AM
        public boolean createSRTask(String sourceName, Number sourceRow) {
            ViewObjectImpl massView = (ViewObjectImpl)findViewObject("MassSrImportView1");
            Row row =  massView.createRow();
            row.setAttribute("Source", sourceName);
            row.setAttribute("SRCNR", sourceRow);
            massView.insertRow(row);
            return true;
        }Some note on this:
    1. the rows are not inserted in the db as long as you don't commit the transaction
    2. It look like your view does not have a PK. The framework works better if you have one
    3. If you always return true, you can omit the return value totally
    4. If you plan to insert multiple rows you should consider passing hte file to the am method and do a bulk insert in there as this would minimize round trips.
    I strongly recommend the you read the http://docs.oracle.com/cd/E25054_01/web.1111/b31974/bcintro.htm to get more knowledge about the business layer.
    Timo

  • What method do you use for passing params arround within a portlet

    Hi,
    First off, this page rocks
    http://www.oracle.com/technology/products/ias/portal/html/mobile_10g_portlet.navigation.html
    found it via this forum, too bad its hard to find through the Oracle website,
    I always get led to the "Portal Developer's Guide.pdf" document which is also good,
    but doest realy go deep.
    EDIT: I just saw I had an older version of the guide, i got the new 10.1.4 now
    Anyone know more good links?
    Anyway, I've made a portlet and it passes qualified parameters around within itself,
    I use the form POST method, so these params dont show up in my URL. This works quite well.
    However, if I switch between the edit & view modes of my page my params are briefly
    encoded within my URL.
    No problem you would say, but how long can a URL be? At some point switching between
    the edit/view modes will be a problem if the URL gets too long.
    Having all param with a form POST also removes the page properties from the URL, thus
    making it impossible for users to bookmark that page, this is whats left of the URL
    "http://www.myserver.nl/portal/page" Users cant bookmark this.
    So is it perhaps better to have all your params within a user's session, of perhaps even
    better, with the prefference store?
    I would like to hear other people's experiances on this.
    Btw I use java for portlet development, not PL/SQL, just to be clear :)
    kind regard
    Ido

    Most web advertising is still done with AS 2 because usually an on release event handler is required for tracking the clicks.
    A lot of rich media ads are produced by agencies. Or if a website sells banner ads, the company usually purchases the software for the in-house designer/developer to use and charges clients more for rich media ads. Companies like Eyeblaster usually charge based on the file size of the rich media ad, so they usually cost more to serve than regular old banner ads (and can take a lot longer to create) which is why they are more expensive for the client. Some clients want more than will fit or look good in a banner in which case rich media can be a good solution.

  • Problem passing param to a java function from xslt

    HI all,
    A thousand thankyou's to any who can help me.
    Documentation is scarce, and I got to bed late last night. It has been a hard day of fruitless searching for a solution to this.
    Problem:
    Calling a named template in xsl using the with-param tag to pass in a parameter.
    attempting to call a java function, specifying that parameter as an argument.
    getting parse error:
    ERROR: 'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    sample code:
    calling the named template
              <xsl:call-template name="calc-age">
                   <xsl:with-param name="dob">
                        <xsl:value-of select="/FullRecord/Patient/dob"/>
                   </xsl:with-param>
              </xsl:call-template>the template itself
         <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="date" select="java:util.Date.new()"/>
             <xsl:value-of select="java:toString($date)"/>
              <xsl:variable name="sdob" select="java:lang.String.new($date)"/>
         </xsl:template>          the error
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:613)does anyone know what is wrong here?
    And if they do, where I can find examples or a reference on how this is supposed to work?
    It's driving me mad!
    Thanks all!
    svaens
    Edited by: svaens on Apr 14, 2008 9:16 AM

    ok.
    What I had pasted was wrong, But I was it was only confused because I had tried quite a few different things to get it working, and had made a mistake somewhere along the way.
    HOWEVER!!!
    This code, I believe should work, (below) but doesn't.
    the error is different, but similar.
    The call to the template remains the same, but the template itself is now different.
    What is wrong with it?
    Do i need to convert a xml document string to a java string somehow?
    template:     <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="sdob" select="java:lang.String.new($dob)"/>
             <xsl:value-of select="java:toString($sdob)"/>        
         </xsl:template>     the error:
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(reference)''
    FATAL ERROR:  'Could not compile stylesheet'To be more clear, I am translating XML via XSL which is transformed using Java 6, and the packages:
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;

  • How to pass params to Action Event handler in treeNode?

    Trying to use Tree in portlet I found impossible to determine selected node. (bug # 6354989).
    But I can (despite what is written in manual) use Action Event Handler. It works now (at least, I hope so).
    But I generate tree dynamically and cannot write event handlers for all its nodes. May be there's a way to write one event handler but distinguish node that triggered it? May be by passing additional params to handler?

    The tree component does not work well in portlets. This is a known problem.
    It uses cookies to pass the value of the selected node, but cookies do not work inside of portlets. So, the methods that would normally tell you which node is selected, return nothing. There are also no javascript properties which would allow you to output javascript to store the value somewhere in the page.
    Unfortunately there is no workaround for the bug you mentioned so far so far.
    Rose

  • Why do I need to pass params. to getConnection when using OracleDataSource?

    Hi,
    I've been experimenting with Tomcat 5.5 and using Oracle proxy sessions. After many false starts, I finally have something working, but I have a question about some of the code.
    My setup:
    In <catalina_home>/conf/server.xml I have this section:
    <Context path="/App1" docBase="App1"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="App1ConnectionPool" auth="Container"
    type="oracle.jdbc.pool.OracleDataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    url="jdbc:oracle:thin:@127.0.0.1:1521:oddjob"
    username="app1" password="app1" maxActive="20" maxIdle="10"/>
    </Context>
    In my App directory, web.xml has:
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>App1ConnectionPool</res-ref-name>
    <res-type>oracle.jdbc.pool.OracleDataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    And finally, my java code:
    package web;
    import oracle.jdbc.pool.OracleDataSource;
    import oracle.jdbc.driver.OracleConnection;
    import javax.naming.*;
    import java.sql.SQLException;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.Properties;
    public class ConnectionPool {
    String message = "Not Connected";
    public void init() {
    OracleConnection conn = null;
    ResultSet rst = null;
    Statement stmt = null;
    try {
    Context initContext = new InitialContext();
    Context envContext = (Context) initContext.lookup("java:/comp/env");
    OracleDataSource ds = (OracleDataSource) envContext.lookup("App1ConnectionPool");
    message = "Here.";
    if (envContext == null)
    throw new Exception("Error: No Context");
    if (ds == null)
    throw new Exception("Error: No DataSource");
    if (ds != null) {
    message = "Trying to connect...";
    conn = (OracleConnection ) ds.getConnection("app1","app1");
    Properties prop = new Properties();
    prop.put("PROXY_USER_NAME", "xxx/yyy");
    if (conn != null) {
    message = "Got Connection " + conn.toString() + ", ";
              conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME,prop);
    stmt = conn.createStatement();
    //rst = stmt.executeQuery("SELECT 'Success obtaining connection' FROM DUAL");
    rst = stmt.executeQuery("SELECT count(*) from sch_header");
    if (rst.next()) {
    message = "# of NJ schools: " + rst.getString(1);
    rst.close();
    rst = null;
    stmt.close();
    stmt = null;
    conn.close(); // Return to connection pool
    conn = null; // Make sure we don't close it twice
    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    // Always make sure result sets and statements are closed,
    // and the connection is returned to the pool
    if (rst != null) {
    try {
    rst.close();
    } catch (SQLException e) {
    rst = null;
    if (stmt != null) {
    try {
    stmt.close();
    } catch (SQLException e) {
    stmt = null;
    if (conn != null) {
    try {
    conn.close();
    } catch (SQLException e) {
    conn = null;
    public String getMessage() {
    return message;
    My question concerns this line of code:
    conn = (OracleConnection ) ds.getConnection("app1","app1");
    Why do I need to pass in the user name/password? Other examples, that I see simply have:
    conn = (OracleConnection ) ds.getConnection();
    But when I use this code, I get the following error:
    java.sql.SQLException: invalid arguments in call
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:236)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
         at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:221)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:165)
         at web.ConnectionPool.init(ConnectionPool.java:32)
    ... more follows, but I trimmed to keep posting shorter :-)
    Is there anyway that I can avoid having to pass the user/password to getConnection()? It seems that I should be able to control the user/password used to establish the connection pool directly in the server.xml file and not have to supply it again in my java code. In earlier experiments when I was using "import java.sql.*" and using it's DataSource, I can use getConnection() without having to pass user/password, but then the Oracle Proxy methods don't work.
    I'm a java newbie so I guess that I should be happy that I finally figured out how to get proxy connections working. However it seems that I am missing something and I want this code to be as clean as possible.
    If anyone can point me to a better method of using connection pools and proxy sessions, I would appreciate it.
    Thanks,
    Alan

    Hi,
    Thanks for the replies.
    Avi, I'm not really sure what you are getting at with the setConnectionProperties. I looked at the javadoc and saw that I can specify user/password, but since I'm using a connection pool, shouldn't my Datasource already have that information?
    Maro, your comment about not having set the user/password for the Datasource is interesting. Are you referring to setting it in the server.xml configuration file? As you can see I did specify it in addition to setting the URL. In my code example, I'm not having to respecify the URL, but maybe I have a typo in my config file that is causing the username/password not to be read properly??
    The other weird thing is that I would have expected to see a pool of connections for user App1 in V$SESSION, but I see nothing. If I use a utility to repeatedly call a JSP page that makes use of my java example, then I do see v$session contain brief sessions for App1 and ADAVEY (proxy). The response time of the JSP seems much quicker than I would have expected if there wasn't some sort of physical connection already established though. Maybe this is just more evidence of not having my server.xml configured properly?
    Thanks.

  • Passing params to XSLT in OSB 11g

    Hi all,
    I was just trying to pass a bind variable to xslt in OSB. It actually works for simple types like string etc.
    But I am not able to pass complex XML types to it.
    There kind of usage actually works in BPEL and mediators but the same thing is not working in OSB.
    here is my xslt
    <xsl:stylesheet version="2.0"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:impl="http://test.com/tester/test"
    xmlns:dvm = "http://xmlns.oracle.com/dvm"
    xmlns:bpel="http://xmlns.oracle.com/Application1/testSoa/BPELProcessTest">
    <xsl:param name="title"/>
    <xsl:template match="/">
    <impl:Transfrom>
    <impl:EVENTID>
    <xsl:value-of select="$title/columns/column/@name"/>
    </impl:EVENTID>
    </impl:Transfrom>
    </xsl:template>
    </xsl:stylesheet>
    I passed in following XML as bind variable
    <dvm name="testDVM" xmlns="http://xmlns.oracle.com/dvm">
    <description></description>
    <columns>
    <column name="test1"/>
    </columns>
    <rows>
    </dvm>
    Thanks,
    Prasanna

    it seems to be a limitation in XSLT implementation in OSB.
    Are there any workarounds for this?

  • Trying SSH CLI ,  reading command line method is infinte loop problem!

    I am trying excute command and reading result. but reading result part has problem.
    below source is a part of my method.
    try{
                   SessionChannelClient sessionChannel = ssh.openSessionChannel();
                   sessionChannel.startShell();
                   OutputStream out = sessionChannel.getOutputStream();
                   String cmd = s + "\n";
                   out.write(cmd.getBytes());
                   out.flush();
                   InputStream in = sessionChannel.getInputStream();
                   BufferedReader br = new BufferedReader(new InputStreamReader(in));
                   byte buffer[] = new byte[255];
                   String read= "";
                   while (true) {
                        String line = br.readLine();
                        if (line == null)
                             break;
                        str += line;
                        str += "\n";
                   System.out.print(str); //print result
                   sessionChannel.close();
                   in.close();
                   out.close();
              }catch(IOException ee){
                   System.out.println(ee);
              }finally{
                   System.out.println("=============end cmd=============");
    while loop has problem. While statement has infinite loop problem.
    why has this problem?
    anybody, help me please. Thanks for reading .
    Edited by: BreathAir on Aug 5, 2008 12:16 AM

    That loop will loop until readLine() returns null, which will only happen when the other end closes its end of the connection, and it will block while no data is available.

Maybe you are looking for

  • Changing the Color of Crop and Bleed Marks from Registration to Black

    Hello all, I have been searching the web and have tried numerous things but I can't seem to solve this problem.  In InDesign crop marks and bleed marks are printed in "Registration" color.  I understand why that is needed for plate printing.  However

  • Connect 2 routers to cable modem

    Hey guys i'm struggling here any help will be greatly appreciated. i have 2 routers with a switch and pc connected to the switch. i  am working on RIP and i enabled it on both routers. my current set up is this: PC---Switch(3550)---Router2(2610)---Ro

  • N97 mini Major Problems

    found two major problem or blunders that is too too much annoying. First:: when come out of range of the wireless network it will pop up again and again "Do you want to enable......" not letting you to select any thing. if I select Yes or No it shoul

  • Chart Query and Failed to parse SQL query

    Hi, first of all, this is not a question. It is a reminder for me and maybe for someone with the same problem. I just fell over this for the 123124 time. I have a 3D Chart Query select sum(order_ok) value,       count(*) maximum_value from      v_dia

  • 10.5.7 Hosed my admin account!  Help.

    Hi all- Having installed 10.5.7, I can no longer launch many programs in my admin account. This is not the case in any of my three limited user accounts. In the admin account, some dock icons are replaced by the generic "apps" icon, and I cannot laun