Javabean string invoking problem

I have two JSPs, one takes a request and the other displays the result and I am having problem with the javabean to connect the two
here are my codes
takes request
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<table border="1" align="center">
<tr>
<td colspan="3" bgcolor="black" align="center"><font color="orange" size="3">
Computer Voting Poll</font></td></tr>
<tr>
<td colspan="3" bgcolor="black" align="center"><font color="orange" size="3">
What is your favorite computer game?
</font></td></tr>
<tr><td width="20%" bgcolor="black"></td>
<td width="30%" bgcolor="black" align="left">
<FORM ACTION="PollResult.jsp">
<input type="radio" name="firstChoice" value="Oblivion" checked><font color="orange" size="2"> Oblivion </font><br>
<input type="radio" name="secondChoice" value="starwars"><font color="orange" size="2"> Star Wars: Empire at War </font><br>
<input type="radio" name="thirdChoice" value="finalfantasy"><font color="orange" size="2"> Final Fantasy XI: Online </font><br>
<input type="submit" value="vote button" name="Vote">
</td>
<td bgcolor="black" width="20%"></td>
</tr>
<tr><td bgcolor="black" colspan="3" align="center"><font color="orange" size="3">
</font><font color="white" size="3">Total Votes</font></td></tr>
<tr><td height="15" bgcolor="orange" colspan="3"></td></tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3">Oblivion</font></td>
<td align="center" bgcolor="black"><font color="white" size="3">0.00%</font></td>
</tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3">Star Wars: Empire at War</font></td>
<td align="center" bgcolor="black"><font color="white" size="3">0.00%</font></td>
</tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3">Final Fantasy XI: Online</font></td>
<td align="center" bgcolor="black"><font color="white" size="3">0.00%</font></td>
</tr>
<tr><td height="15" bgcolor="orange" colspan="3"></td></tr>
</table>
</body>
</html>displays
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<table border="1" align="center">
<tr>
<td colspan="3" bgcolor="black" align="center"><font color="orange" size="3">
Computer Voting Poll</font></td></tr>
<tr>
<td colspan="3" bgcolor="black" align="center"><font color="orange" size="3">
What is your favorite computer game?
</font></td></tr>
<tr><td width="20%" bgcolor="black"></td>
<td width="30%" bgcolor="black" align="left">
<input type="radio" name="firstChoice" value="Oblivion" checked><font color="orange" size="2"> Oblivion </font><br>
<input type="radio" name="secondChoice" value="starwars"><font color="orange" size="2"> Star Wars: Empire at War </font><br>
<input type="radio" name="thirdChoice" value="finalfantasy"><font color="orange" size="2"> Final Fantasy XI: Online </font><br>
<input type="submit" value="vote button" name="Vote">
</td>
<td bgcolor="black" width="20%"></td>
</tr>
  <TR><TH>
      Using jsp:setProperty</TABLE>
<jsp:useBean id="entry" class="core.BeanPoll" />
<jsp:setProperty
    name="entry"
    property="firstChoice"
    param="firstChoice" />
<jsp:setProperty
    name="entry"
    property="secondChoice"
    param="secondChoice" />
<jsp:setProperty
    name="entry"
    property="thirdChoice"
    param="thirdChoice" />
<BR>
<tr><td bgcolor="black" colspan="3" align="center"><font color="orange" size="3">
</font><font color="white" size="3">Total Votes</font></td></tr>
<tr><td height="15" bgcolor="orange" colspan="3"></td></tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3">Oblivion</font></td>
<td align="center" bgcolor="black"><font color="white" size="3"><jsp:getProperty name="entry" property="firstChoice" />%</font></td>
</tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3">Star Wars: Empire at War</font></td>
<td align="center" bgcolor="black"><font color="white" size="3"><jsp:getProperty name="entry" property="secondChoice" />0.00%</font></td>
</tr>
<tr><td align="left" bgcolor="black"><font color="white" size="3">0</font></td>
<td align="left" bgcolor="black"><font color="white" size="3"><jsp:getProperty name="entry" property="thirdChoice" />Final Fantasy XI: Online</font></td>
<td align="center" bgcolor="black"><font color="white" size="3">0.00%</font></td>
</tr>
<tr><td height="15" bgcolor="orange" colspan="3"></td></tr>
</table>
</body>
</html>javabean
* BeanPoll.java
* Created on October 29, 2007, 11:18 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package core;
/** Simple bean to illustrate the various forms
*  of jsp:setProperty.
*  <P>
*  Taken from Core Servlets and JavaServer Pages 2nd Edition
*  from Prentice Hall and Sun Microsystems Press,
*  http://www.coreservlets.com/.
*  &copy; 2003 Marty Hall; may be freely used or adapted.
public class BeanPoll {
  private String firstChoice = "unknown";
  private String secondChoice = "unknown";
  private String thirdChoice = "unknown";
  public String getfirstChoice() {
    return(firstChoice);
  public void setfirstChoice(String firstChoice) {
    if (firstChoice != null) {
      this.firstChoice = firstChoice;
    } else {
      this.firstChoice = "unknown";
  public String getsecondChoice() {
    return(secondChoice);
  public void setsecondChoice(String secondChoice) {
    if (secondChoice !=null) {
        this.secondChoice = secondChoice;
    } else {
        this.secondChoice = "unknown";
  public String setthirdChoice() {
    return(thirdChoice);
  public void setthirdChoice(String thirdChoice) {
    if (thirdChoice !=null) {
        this.thirdChoice = thirdChoice;
    } else {
        this.thirdChoice = "unknown";
  // In real life, replace this with database lookup.
  // See Chapters 17 and 18 for info on accessing databases
  // from servlets and JSP pages.
  public double getPollResult() {
    double result;
  public double getTotalCost() {
    return(getItemCost() * getNumItems());
}thanks for your time

You have a getter method whose name starts with "set".
You're not following the beans naming conventions correctly. If a property is called "foo", then the getters & setters are named "getFoo" and "setFoo".

Similar Messages

  • JavaBean - JSP - JSTL - Problem

    Hi, (sorry for the length of this message)
    I have a problem I can't figure out using JavaBeans, JSP, and JSTL. I have two JavaBeans Scoring.java and ScoringManager.java that I use to display some stats over a JSP page with JSTL tags.
    The Scoring.java bean contains all the info related to a the scoring (ie column definitions - GP, G, A, etc.) and the ScoringManager.java handles operations that use the Scoring.java Bean.
    I've use the following methods as well as the executeAdvancedQuery method (which executes the given SQL query on the database - not shown here) and it works fine.
    public Iterator getScorerListIterator( )
    throws SQLException
    return this.getScorerList().listIterator();
    public ArrayList getScorerList( )
    throws SQLException
    String query = "SELECT TOP 30 * FROM vGlobalLeaSea ORDER BY PTS desc, GP asc, G desc;";
    return executeAdvancedQuery(query);
    And this works nicely using this code in a JSP page.
    <jsp:useBean
    id="scoreMan"
    class="com.test.stats.ScoringManager"
    scope="session"
    />
    <table width="180" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td width="30" class="tsbg1">GP</td>
    <td width="30" class="tsbg1">G</td>
    <td width="30" class="tsbg1">A</td>
    <td width="30" class="tsbg1">PTS</td>
    </tr>
    <c:forEach items="${scoreMan.scorerListIterator}" var="scoreInfo">
    <tr>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.gamesPlayed}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.goals}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.assists}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.points}"/></td>
    </tr>
    </c:forEach>
    </table>
    Here's the problem! I want to be able to recuperate a parameter from the address bar (/thepage.jsp?id=2) and pass it to the following methods:
    public Iterator getScoringListBySeasonIterator(int seasonId)
    throws SQLException
    return this.getScoringListBySeason(seasonId).listIterator();
    public ArrayList getScoringListBySeason(int seasonId)
    throws SQLException
    String query = "SELECT * FROM vGlobalLeaSea "
    + "WHERE sd_id = "+ seasonId +";";
    return executeAdvancedQuery(query);
    And here's the code I think should be ok... that isn't
    <jsp:useBean
    id="scoreMan"
    class="com.test.stats.ScoringManager"
    scope="session"
    />
    <table width="180" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td width="30" class="tsbg1">GP</td>
    <td width="30" class="tsbg1">G</td>
    <td width="30" class="tsbg1">A</td>
    <td width="30" class="tsbg1">PTS</td>
    </tr>
    <c:forEach items="${scoreMan.scorerListBySeasonIterator[param.id]}" var="scoreInfo">
    <tr>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.gamesPlayed}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.goals}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.assists}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.points}"/></td>
    </tr>
    </c:forEach>
    </table>
    I've taken car to use an java.util.Iterator as Java type for the items and dynamic values are allowed.
    I've search the web and read many articles to find an answer but I always end up with some error message.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute "items" with value "${scoreMan.scorerListBySeasonIterator[param.id]}": Unable to find a value for "scorerListBySeasonIterator" in object of class "com.test.stats.ScoringManager" using operator "." (null)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    javax.servlet.ServletException: An error occurred while evaluating custom action attribute "items" with value "${scoreMan.scorerListBySeasonIterator[param.id]}": Unable to find a value for "scorerListBySeasonIterator" in object of class "com.test.stats.ScoringManager" using operator "." (null)
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
         at org.apache.jsp.leaseaTestJAVA_jsp._jspService(leaseaTestJAVA_jsp.java:409)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    Anyone has a clue?
    Thanks in advance for any help!
    John

    The problem comes with the fact you are breaking the JavaBeans rules. There are strict rules to follow to make JavaBeans work...
    You set paramaters using
    public void setParamName(ParamType value)
    methods.
    You get parameters with
    public ParamType getParamName()
    methods.
    You can not pass a value into a get method, the argument list must be void.
    So to do what you want, you should create a ne parameter, called seasonId:
      private int seasonID = -1;
      public void setSeasonID(int i) { seasonID - i; }
      public int getSeasonID() { return seasonID; }Then use that for your getScoringListBySeason() method... but I would also throw an IllegalStateException if the seasonID was not set yet...
      public Iterator getScoringListBySeasonIterator() { return getScoringListBySeason().iterator(); }
      public List getScoringListBySeason()
        if (seasonID == -1) throw new IllegalStateException ("Season ID Must be set before the Scoring List can be retrieved.");
        //.. rest of code
      }Then in your JSP you would do this:
      <jsp:useBean class="com.test.stats.ScoringManager" id="scoreMan" scope="session"/>
      <jsp:setProperty name="scoreMan" property="seasonID" value="${param.id}"/>Then you should be able to work with the scoringListBySeason and scoringListBySeasonIterator properties as you did the other get methods...

  • [UPDATED WORKAROUND] SEVERE unicode/ UTF-8 ADFm bidnig/invokation problem

    I have BIG problem with very simple search page use-case (with one text input field, search button and af:table for results). It looks like the unicode input value is somehow ruined during PPR and model update cycle (the unicode value is internally collated to ascii while transferred to EJB method)!!!
    Here is the scenario (please note that all was created by pure drag-and-drop from Data Controls palette):
    I have one inputText field on page, value of which is bound to simple attribute binding (say #{bindings.key.inputValue}) which is bound to vKey variable.
    In PageDef I have methodIterator with
    <methodIterator Binds="XYZ.result" Refresh="always" ...(the XYZ is method in some EJB) and I have adequate methodAction XYZ defined with named param:
    <NamedData NDName="key" NDValue="${bindings.vKey}" NDType="java.lang.String"/>The table is bound to tree binding bound to the above methodIterator. The button is PPR trigger for table (only thing nod done by drag-and-drop).
    JSPX page is xml encoding="UTF-8" with:
    <jsp:directive.page contentType="text/html;charset=UTF-8"
                           pageEncoding="UTF-8"/>There are no locale settings in faces-config.xml (the default config).
    In inputText I entered some unicode input text like "ЧШЩЪ".
    When button is clicked, the methodAction XYZ is invoked.
    The debugger brake-point is set inside EJB method.
    Now, during the PPR after button click, the EJB method brake-point is hited twice (I assume because the Refresh="always" for methodIterator). In firs hit, the value of key parameter is OK (correct unicode value visible in Inspect...). BUT, the second time (during the same PPR) the method is invoked WITH totally ruined value of "????"! Of course, the search didn't find anything...
    Thus, not only that problem of unicode is related to localization of pages/resources but something strange is happening with value binding also.
    Can someone help?
    Message was edited by:
    PaKo
    Message was edited by:
    PaKo

    Another way around:
    Instead using processScope or pageFlowScope (which is not releasing memory automatically so it may make you a problems further on), I discovered an alternative workaround:
    instead binding to #{bindings.someAttribBinding.inputValue} (which suffers from UTF-8 bug as concluded), you can bind your text inputs directly to #{bindings.someIterator.currentRow.dataProvider. someAttribute } which binds directly to your underlying data source property.
    In my case, I use EJBs so the underlying datasource is Entity bean and this way I bind directly to setter method thus overriding any ADFm interference.
    This shows to be more reliable and also MORE EFFICIENT! In case of indirect (via buggy attribute) binding, the getter method in entity is called twice while in case of direct binding (through .currentRow.dataProvider.someAttribute) the getter is called only once per page lifecycle (the setter is called once in both cases).
    I would, thus, suggest to ADF team to consider introduction of some sort of better support for direct binding to the underlying data sources instead through Iterators and Attribute bindings. On example, introduce Entity Binding (like Tree binding, but with direct support for access to entity attributes including parent/children collections). This also apply for list bindings where it is NECESSARY to enable object binding from list to entity attribute (as EJB entities don't know for foreign keys but for related entities so the attribute mapping supported with current list bindings is totally useless).
    Regards,
    Pavle

  • Web service help please - client invoking problem

    hi there
    can anyone help me on this? i create a client that is going to call a web service. now, i have erro exception saying that javax.xml.rpc.ServiceFactoryImpl can not be found. it happens when the execution reaches
    //code..................................
    ServiceFactory factory = ServiceFactory.newInstance();
    the following is my code to invoke a web service:
    //code................................................
    private void sendOrder(String orderid, String message)
    throws ClassNotFoundException, SQLException{
    // Setup the global JAX-RPC service factory
    try{
    System.setProperty( "javax.xml.rpc.ServiceFactory",
    "com.sun.xml.rpc.client.ServiceFactoryImpl");
    // create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    // define qnames
    String targetNamespace = "http://www.wowgao.com/exchange/server"
    + "wsdl/";
    QName serviceName = new QName(targetNamespace,
    "WGOrder.WGOrderBean");
    QName portName = new QName(targetNamespace,
    "WGOrderPort");
    QName operationName = new QName("urn:WGOrder", "orderSubmit");
    // create service
    Service service = factory.createService(serviceName);
    // create call
    Call call = service.createCall();
    // set port and operation name
    call.setPortTypeName(portName);
    call.setOperationName(operationName);
    // add parameters
    call.addParameter("BuyerID",
    new QName("http://www.w3.org/2001/XMLSchema", "string"),
    ParameterMode.IN);
    call.addParameter("SellerID",
    new QName("http://www.w3.org/2001/XMLSchema", "string"),
    ParameterMode.IN);
    call.addParameter("order",
    new QName("http://www.w3.org/2001/XMLSchema", "string"),
    ParameterMode.IN);
    call.setReturnType(new QName( "http://www.w3.org/2001/XMLSchema","long") );
    // set end point address
    call.setTargetEndpointAddress("http://www.xmethods.com:9090/soap");
    // invoke the remote web service
    String result = (String)call.invoke(operationName, new Object[]{"123","234",message});
    how do i set the com.sun.xml.rpc.client.ServiceFactor so that it know where to find the class?

    It sounds like a classpath problem. Try adding JWSDP_HOME/common/lib/jaxrpc-ri.jar to the client's classpath.
    Mike W.

  • Setting input fields to an empty string BIG PROBLEM

    Hi Rob, thanks for your rerply, It makes sense alright, but I am using 2 seperate input fields. I have discovered what is causing the problem .
    After the user types into the inputfield and moves on to a different frame, I have set the input field to an empty string and this is what is causing the problem.
    I have tried setting the input field to an empty string in a movie script and on individual sprites and the first right answer is not excepted.I have to type in the right answer twice to get get a right response. I am actually using three seperate input fields in total, each with a different name and behavior. Even If I use one input field I still have the same problem. Its driving me crazey. Any Ideas.
    Anne

    I believe that the FIM Service always does trims on string, so you may be out of luck.
    What is your scenario / what are you trying to accomplish by setting a space in an attribute? A space is not an empty string in my definition.
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Synchronous File Read on Invoke Problem

    I am trying to invoke file adapter to read the file once(Synchronous File Read) as described in Bpeltechadapter guide.
    Read about Synchronous File Reading Capability here download.oracle.com/otndocs/products/bpel/bpeltechadp.pdf
    Also read this: Re: Help! Three questions about FileAdapater. .
    I get this process generation failed when i try to build it. The Empty_msg in inputvariable of invoke works but problem is with Charges_msg in output variable.
    I am sure its something to do with ns but not getting it to work.
    PL_FileInbound.WSDL code*********************
    <definitions
    name="PL_FileInbound"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:imp1="http://TargetNamespace.com/FA_ReadFile"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    >
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/" location="fileAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/">
    <import namespace="http://TargetNamespace.com/FA_ReadFile" schemaLocation="PipeDelimitedNIX_Charges.xsd" />
    <element name="empty"><complexType/></element>
    </schema>
    </types>
    <message name="Chargesheet_msg">
    <part name="Chargesheet" element="impl:Chargesheet"/>
    </message>
    <message name="Empty_msg">
    <part name="Empty" element="tns:empty"/>
    </message>
    <portType name="SynchronousRead_ptt">
    <operation name="SynchronousRead">
    <input message="tns:Empty_msg"/>
    <output message="tns:Chargesheet_msg"/>
    </operation>
    </portType>
    <binding name="SynchronousRead_binding" type="tns:SynchronousRead_ptt">
    <jca:binding />
    <operation name="SynchronousRead">
    <jca:operation
    PhysicalDirectory="C:\Incoming"
    InteractionSpec="oracle.tip.adapter.file.outbound.FileReadInteractionSpec"
    FileName="abcl.txt"
    DeleteFile="false"
    OpaqueSchema="false">
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    </binding>
    <service name="PL_FileInbound">
    <port name="SynchronousRead_pt" binding="tns:SynchronousRead_binding">
    <jca:address location="eis/FileAdapter" />
    </port>
    </service>
    <plt:partnerLinkType name="Read_plt" >
    <plt:role name="Read_role" >
    <plt:portType name="tns:SynchronousRead_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    BPEL Source ******************************************
    <!--
    // Oracle JDeveloper BPEL Designer
    // Created: Sat Apr 29 16:52:43 CDT 2006
    // Author: dpatel
    // Purpose: Synchronous BPEL Process
    -->
    <process name="SynchronousFileRead"
    targetNamespace="http://xmlns.oracle.com/SynchronousFileRead"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:client="http://xmlns.oracle.com/SynchronousFileRead"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!-- ================================================================= -->
    <!-- PARTNERLINKS -->
    <!-- List of services participating in this BPEL process -->
    <!-- ================================================================= -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:SynchronousFileRead"
    myRole="SynchronousFileReadProvider"/>
    <partnerLink myRole="Read_role" name="PL_FileInbound"
    partnerRole="Read_role" partnerLinkType="ns1:Read_plt"/>
    </partnerLinks>
    <!-- ================================================================= -->
    <!-- VARIABLES -->
    <!-- List of messages and XML documents used within this BPEL process -->
    <!-- ================================================================= -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:SynchronousFileReadRequestMessage"/>
    <!--
    Reference to the message that will be returned to the requester
    -->
    <variable name="outputVariable"
    messageType="client:SynchronousFileReadResponseMessage"/>
    <variable name="Invoke_1_SynchronousRead_InputVariable"
    messageType="ns1:Empty_msg"/>
    <variable name="Invoke_1_SynchronousRead_OutputVariable"
    messageType="ns1:Chargesheet_msg"/>
    </variables>
    <!-- ================================================================= -->
    <!-- ORCHESTRATION LOGIC -->
    <!-- Set of activities coordinating the flow of messages across the -->
    <!-- services integrated within this business process -->
    <!-- ================================================================= -->
    <sequence name="main">
    <!-- Receive input from requestor.
    Note: This maps to operation defined in SynchronousFileRead.wsdl
    -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:SynchronousFileRead" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <invoke name="Invoke_1" partnerLink="PL_FileInbound"
    portType="ns1:SynchronousRead_ptt" operation="SynchronousRead"
    inputVariable="Invoke_1_SynchronousRead_InputVariable"
    outputVariable="Invoke_1_SynchronousRead_OutputVariable"/>
    <!--outputVariable="Invoke_1_SynchronousRead_OutputVariable"-->
    <reply name="replyOutput" partnerLink="client"
    portType="client:SynchronousFileRead" operation="process"
    variable="outputVariable"/>
    </sequence>
    </process>
    I would really appreciate your help here.

    I face the same issue and I have given all permissions to the folder for OS user.
    Because of this error my server is not starting up . Is there any way I can undeploy this composite to get my server running.
    I cant do this from EM because SOA server is failing to start up.
    I have tried removing it from $DOMAIN_HOME/deployed-composites but still when i try restarting the soa server the composite comes up there. Do we need to delete the entry some where else too. Kindly help.
    Thanks,
    Sri.

  • String concat PROBLEM??? Please Help

    I have this strange Question regarding String concat
    If I say:
    String str = "Welcome";
    str.concat(" to Java");
    System.out.println(str);
    The output is: Welcome.
    How do I get the output to Welcome to Java??

    I have this strange Question regarding String concat
    If I say:
    String str = "Welcome";
    str.concat(" to Java");
    System.out.println(str);
    The output is: Welcome.
    How do I get the output to Welcome to Java??
    The problem is that String is immutable, The String you have held in str does not change, rather a new Srtring is returned. So all yo have to do is grab the new String
    str = str.concat("to Java");
    or use the new String without keeping it.
    ie
    System.out.println(str.concat("to Java"));

  • String concat problem

    Hi folks,-
    i know this question might be very simple but i just cannot see what i am doing wrong here.
    String stringA, stringB, stringC;
    stringA= new String();
    stringB= new String();
    stringC= new String();
    stringA = null;
    stringB = "TRUE";
    stringC = "Error:";
    stringA.concat(stringB); // my code stops and quits here w/o error
    // other codewhat is wrong here?
    thanks much

    could you then please explain the following?
    public String concat(String str)Concatenates the
    specified string to the end of this string.
    If the length of the argument string is 0, thenthis
    String object is returned. Otherwise, a new String
    object is created, representing a charactersequence
    that is the concatenation of the charactersequence
    represented by this String object and thecharacter
    sequence represented by the argument string.
    Examples:
    "cares".concat("s") returns "caress"
    "to".concat("get").concat("her") returns"together"
    Parameters:
    tr - the String that is concatenated to the end of
    this String.
    Returns:
    a string that represents the concatenation of this
    object's characters followed by the stringargument's
    characters.
    Throws:
    NullPointerException - if str is null.It returns a new String, which you are
    throwing away. Change your code like this:
    stringA = stringA.concat(stringB);
    and then you'd get somewhere.yes, it makes sense but the description does not say this.
    i think that will work but my problem is with the description of this
    concat operation on the java web site.
    thanks for the help

  • Javabeans: Difficult NotSerializableException problem

    Hi. I have a pretty complex problem with a javabean application. My javabean application is bundled in a jar file.
    This application needs a Database to run. I had to bundle the Database driver INSIDE the jar file, along with the javabean application. The problem is:
    - When I try to serialize my javabean application, I get a NotSerializableException saying that the Class org.gjt.mm.mysql.jdbc2.ResultSetMetaData could not get serialized. BUT THIS CLASS IS A DATABASE DRIVER CLASS. I don't NEED to serialize it. And the problem is that I can't even modify this class to make it serializable.
    Please help, this is making me crazy!

    Find out which instance variables in your classes reference the driver class and add the "transient" keyword to their definition. They will then be excluded from serialization. After deserialization it is then up to you to populate the variables with new objects (they will be null then).

  • String check problem

    I have a doozy of a problem on my hands. My company has introduced a password policy that every user must me now. Some of my criteria is that a password must contain at least one symbol and at least one number. In 10g I can use REGEXP_LIKE function, but I am running 9i. I have tried to use translate, OWA_PATTERN function, everthing. How can I take a string variable, and test to see if there is a symbol in the text or a number. I want to be able to return a true/false value?
    Please advise?

    Like Kamal says, use built-in functionality FIRST.
    Failing that, presumably you would write something like this (I forget the exact naming standard for the password verify function).
    CREATE FUNCTION valid_password (
       p_password IN VARCHAR2)
       RETURN BOOLEAN
    IS
       FUNCTION contains_at_least_one (
          p_string IN VARCHAR2,
          p_characters IN VARCHAR2)
          RETURN BOOLEAN
       IS
       BEGIN
          RETURN LENGTH (TRANSLATE (p_string, 'X' ||
            p_characters, 'X')) < LENGTH (p_string);
       END;
    BEGIN
       RETURN contains_at_least_one (p_password, '0123456789')
          AND contains_at_least_one (p_password, '!£$%^&*(){}~@??|<>');
    END;

  • String overlapping problem in mx:List caused by wordWrap

    I'm using mx:List to display String items. The dataProvider is XMLListCollection. Some of the String is long so it takes more than one rows. I use the wordWrap to display the long String in more than one rows. The problem is that the next String item will overlapping with the long String. The mx:List can not adjust the vertical space for the Strings that needs more than one rows dynamically. Any suggections?

    Here is solution: variableRowHeight="true"

  • Web service invoking problem with websphere server

    HI all,
    I am getting the following exception while running the FedEx web service application in RAD.
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
         at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:5)
         at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at fedex.ws.rate.v4.RateServiceSoapBindingStub.getRates(RateServiceSoapBindingStub.java:1046)
         at com.lgs.fedex.FedexClient.getFedexRates(FedexClient.java:173)
         at com.lgs.fedex.FedexClient.getFedExCost(FedexClient.java:95)
         at com.lgs.fedex.FedexClient.main(FedexClient.java:52)
         {http://xml.apache.org/axis/}hostname:LGSCP0359
    java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at fedex.ws.rate.v4.RateServiceSoapBindingStub.getRates(RateServiceSoapBindingStub.java:1046)
         at com.lgs.fedex.FedexClient.getFedexRates(FedexClient.java:173)
         at com.lgs.fedex.FedexClient.getFedExCost(FedexClient.java:95)
         at com.lgs.fedex.FedexClient.main(FedexClient.java:52)
    Caused by: java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
         at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:5)
         at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         ... 13 more
    Please help me what is the problem...
    Thanks in advance

    Hello,
    Sorry... I don't have an answer to your question... :(
    However, I just started trying to figure out the FedEx Web Service stuff. So far, I haven't gotten very far. I've got AXIS and some ShippingService code downloaded but can't seem to figure out how to implement or test it... or any service. Have you found or got any basic Java code that connects to the endpoint and sends a request?
    Any help would be much appreciated.
    thanks, brian

  • Web service client invoke problem

    Hi all,I want to in sap studio to develop web service client to invoke a .net webservice,this webservice  need authen ,so I develop a standandalone proxy to write a consle to invoke my code.
    The follwoing is my invoke  code
    public class WebServiceTest {
         public static void main(String[] args) throws Exception {
              GetScaVersion parameter = new GetScaVersion();
              ManagementSoap port = new ManagementImpl().getLogicalPort(); 
                        port._setProperty(port.USERNAME_PROPERTY,"administrator");
                        port._setProperty(port.PASSWORD_PROPERTY,"administrator");
              GetUserList list=new GetUserList();
              GetScaVersionResponse response= port.getScaVersion(parameter);
              System.out.println(response.getGetScaVersionResult());
              System.out.println(response.getAErrorMsg());          
    But final I got the following errors,
    Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
    Error Message is :com/sap/guid/GUIDGeneratorFactory
    null
    Invalid UserName and Password
    so I just want to ask ,if the webservice is need to authen,does the following tow senteces works for authenciation ?
      port._setProperty(port.USERNAME_PROPERTY,"administrator");
      port._setProperty(port.PASSWORD_PROPERTY,"administrator");

    Hi,
    You need to set the credentials of the .net user.
    Also, which type of proxy have you created? Are you able to open the wsdl in the browser?.
    Thanks,
    Vasu

  • String offset problem

    Hi,
    I'm using 1.4.2 at the moment.
    I got the problem below and have no idea how to solve it. The program portion is:
    String x = node.getText();
    The node.getText() should contain value = "\n\r"
    However, it always return me "\r" only.
    I checked with the debugger and found that when I change the offset value of x to 0, it can return me "\n". However, the original offset value is always kept as 1. That's the reason why it always return me "\r".
    Can anyone help and tell me how to get the value "\n" in this case, i.e. any String method which I can check and get the offset value 0 from the string x.
    Thanks million in advance.
    Regards,
    Eric

    Can anyone help and tell me how to get the value "\n"
    in this case, i.e. any String method which I can
    check and get the offset value 0 from the string x.
    x.charAt(0);is probably what you mean.

  • String item problem

    I use mobility pack visual designer.
    When I create a string item in visual screen designer it looks like that:
    Title
    <text>
    but after i run my app it looks different
    Title <text>
    Why there's no line break?
    When I try to add the line break manually it doesn�t work because screen designer property editor adds to the code \\n when I put \n
    so generated code looks like that
    stringItem1 = new StringItem("stringItem1\\n", "<Enter Text>");  and I cannot edit it manually because generated code is blocked by net beans
    I can initialize my stringItem object one again
    stringItem2 = new StringItem("stringItem2\n", "<Enter Text>");  but I thing that�s very stupid to reinitialize an object twice
    And the line break after title doesn't solve my problem because if the title is too long the device will automatically brake the line and I�ll get this
    A long long title........
    <text>
    one empty line because of that break
    Any ideas?
    I don�t want to use textField because when you set it to uneditable its color becomes gray.

    Check the actual URL up in the location bar. Your comma may actually be dropping out there, because it isn't encoded such that in value commas can be differentiated from delimiters, so the fields aren't lining up in the URL properly.
    When you go to a page that takes in parameters for assignment in the link, it has 2 fields. The first is the comma separated list of the item names on the page to assign, which wouldn't contain commas in their names. The other field in the URL is a comma separated list of values to be assigned to the previous list. Since these values aren't encoded, the comma in the value is picked up as delimiter and not a part of the value. I have an example I can load up to apex.oracle.com if you need.
    -Richard
    Edited by: rwendel on Aug 13, 2009 11:51 AM

Maybe you are looking for