Rest Service method called twice in wcf

Hi all,
I have created a rest service using wcf.
I am writing Entity framework code within a service method to fetch data from database.
Every call from browser is hitting the service method twice or thrice.
I found no exception within the method. I encountered same problem before and solved it adding DataContract attribute to all the models(not helping now).
What may be the possible reasons? Please help.
Regards
Ashish

Hi,
I want to know if you are using the WebGet (Http GET). If so, please try to change that API to WebInvoke (Http POST).
Because IIS has some setting for HTTP GET as 40sec replay, so if within 40sec the server does not get response, then it will query itself again. Then it will be called twice or more.
For more information, please try to refer to:
#RESTful API in WCF get called more than one time:
http://www.codeproject.com/Tips/338142/RESTful-API-in-WCF-get-called-more-than-one-time-b .
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Why valueChaged( ) method called twice

    Dear All,
    I have made a class MyList by extending JList and implements ListSelectionListener and override valueChanged method. When we clicked on the list item this method called twice. Can you please explain the region?
    I write my code like that:
    Public void valueChanged(ListSelectionEvent lse)
    System.out.println(�Hello�);
    Out put:
    Hello
    Hello
    Thanks
    Bipin Kuma

    It's expected - check the details and you'll see why.
    If, say, the user had selected item 3 and then select item 8 then you might get two events:
    1. first 3, last 3, isAdjusting true
    2. first 8, last 8, isAdjusting false
    It's a poor event protocol if you ask me but there you go.

  • Why is the ActionForms validate-Method called twice?

    Hello forum,
    I'm new to struts and want to develop a form, where an internetuser can leave a comment to an article. Just like most sides, an image with an text is displayed, the text has to be written into an inputfield before the comment is commited in order to be saved.
    When an user puts in no text or a wrong one, a errormessage is displayed, the old image is deleted and an new one is created and shown to the user. His input still stays in the fields.
    I proof the correctness of the word in the validate-Method of the ActionForm and it works fine.
    Now I've the following problem:
    If the user puts in the correct text, the comment is saved and the side is displayed again including his comment.. But also all the input of the form should be erased. But for some reason, its not and the validate method is called again and since there is a new wordvarifyingimage and a new text to be inserted, it throws an error which is displayed again. Also, all the input of his last message is present!
    So, I guess I miss a big point about the ActionForm handling. Why is the ActionForm called twice and why doesn't it erase the old input? I try to do this in the Action class after saving the comment, setting all the formparameters to "" or null.
    Can anybody give me a hint?
    Would be a big big help since I've not found anything googling about this issue.
    If you need code, just tell me which part I put in here (ActionForm, Action, struts-config or jsp-file)
    Thanxs in advance,
    strutsnewbytopro

    my jsp:
    <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="struts/html-el" prefix="html" %>
    <%@ taglib uri="jstl/c" prefix="c" %>
    <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <style type="text/css" title="currentStyle" media="screen">
              @import "../library/css/blog.css";     
         </style>
    <script language="javascript">
         function sendMail(){
              document.forms[0].formaction.value ='mail';
              document.forms[0].submit();
         function saveComment(){
              document.forms[0].formaction.value ='comment';
              document.forms[0].submit();
         </script>
    </head>
    <body>
    <html:form action="/blog">
    <div id="container">
         <div id="leftside">
              <logic:messagesPresent>
                   <div id="errors">
                        <div style="color:#CC3333; ">
                        <p><span id="errorHeaders"><bean:message key="errors.validation.header"/></span>
                             <html:messages id="error">
                             <c:out value="${error}"/>
                             </html:messages>
                        </p></div>
                     </div>
              </logic:messagesPresent>
                 .... show blogentry ...          
              <logic:present name="comments">
                   <div id="divblogcomment">
                   <logic:iterate name="comments"  id="com">
                   <div class="breaker10" style="clear:left; "></div>
    <div class="rowblogcommentdate" style="width:150px;"<a href="<bean:write name="com" property="website" />"><bean:write name="com" property="username" /></a> am <bean:write name="com" property="postdate" /></div>
                   <div class="rowblogcomment"><bean:write name="com" property="comment" /></div>
                   </logic:iterate>
                   <div class="breaker10" style="clear:left; "></div>
    </div>
              </div>
                             </logic:present>
                             <logic:notPresent name="savedcomment">
                                  <div id="writeblogcomment">
                                  <div class="topbig"><div class="headsmall">enter Comment</div></div>
                                  <div id="bginhaltwriteblogcomment">
                                       <div class="breaker10" style="clear:left; "></div>
                                       <div align="center">
                                            <table cellpadding="0" cellspacing="0" border="0">
                                                 <tr>
                                                      <td>Name:</td>
                                                      <td>  </td>
                                                      <td><html:text size="50" name="blogForm2" styleClass="inputtext" property="username"/></td>
                                                      <td>  </td>
                                                      <td>Web:</td>
                                                      <td>  </td>
                                                      <td><html:text size="50" name="blogForm2" styleClass="inputtext" property="webaddress"/></td>
                                                 </tr>
                                                 <tr>
                                                      <td>Enter Code:</td>
                                                      <td>  </td>
                                                      <td><html:text size="66" name="blogForm2" styleClass="inputtext" property="commentword"/></td>
                                                      <td>  </td>
                                                      <td >Code:</td>
                                                      <td>  </td>
                                                      <td><img src="<bean:write name="entry" property="commentpicurl" />"></td>
                                                 </tr>
                                                  <tr>
                                                      <td colspan="7">Comment<br><html:textarea name="blogForm2" styleClass="comment" property="comment" /></td>
                                                 </tr>
                                                 <tr>
                                                      <td colspan="7"><html:submit styleClass="inputtext" onmousedown="javascript:saveComment();"><bean:message key="button.save"/></html:submit></td>
                                                 </tr>                                        
                                            </table>
                                       </p>
                                       </div>
                                       <div class="bottombig"></div>
                                  </div>
                             </div>
                             </logic:notPresent>
                             <logic:present name="savedcomment">
                             <div id="writeblogcomment">
                                  <div class="topbig">Comment saved<div class="headsmall">Kommentar gespeichert</div></div>
                                  <div id="bginhaltwriteblogcomment">
                                       <div class="breaker10" style="clear:left; "></div>
                                       <div align="center">
                                            <table cellpadding="0" cellspacing="0" border="0">
                                                 <tr>
                                                      <td>Comment saved</td>
                                                 </tr>
                                            </table>
                                       </p>
                                       </div>
                                       <div class="bottombig"></div>
                                  </div>
                             </div>
                             </logic:present>
                             </div>
    </div>
    <html:hidden name="blogForm2" property="formaction"/><br>
    <html:hidden name="blogForm2" property="id"/><br>
    <% session.removeAttribute("savedcomment"); %>
    </html:form>
    </body>
    </html>

  • LoginModule login method called twice on unsuccessful logins

    This is a cross post of a topic in the Application Server - General forum. The login and abort methods of our JAAS LoginModule are called twice when authentication is unsuccessful. It is called once on successful logins. This is problematic as it puts the user closer to locking the user's network account. We have confirmed that this is an issue, perhaps resolvable, with the container itself - version 10.1.2.0.2. I recreated the problem with a simple web application and using Frank Nimphius' simple JAAS login module. Here's a snippet from the redirected out:
    07/07/07 15:37:01 Enter login
    07/07/07 15:37:01 Performing user authentication for user
    07/07/07 15:37:01 User is not authenticated - Password must be "welcome"
    07/07/07 15:37:01 Enter abort
    07/07/07 15:37:01 Authentication Failed
    07/07/07 15:37:01 Authentication: FAILED.
    07/07/07 15:37:01 JAAS-OC4J: Authentication failure for user: user
    07/07/07 15:37:01 Enter login
    07/07/07 15:37:01 Performing user authentication for user
    07/07/07 15:37:01 User is not authenticated - Password must be "welcome"
    07/07/07 15:37:01 Enter abort
    07/07/07 15:37:01 Authentication Failed
    07/07/07 15:37:01 Authentication: FAILED.
    07/07/07 15:37:01 JAAS-OC4J: Authentication failure for user: user
    Has anyone else experienced this problem and found a workaround or setting to prevent this behavior?

    Follow-up: I ran the sample application and LoginModule using oc4j 10.1.3.2 and it appears that the problem is resolved. As moving to 10.1.3.2 might not be an option is there some patch to 10.1.2 to correct the issue?

  • EO Validation method called twice

    Hi,
    I have written an EO based field Validation method. But the problem is it is being called twice. First time ,it is validating correctly. But the second time it is not taking the field value and giving the error
    I have included it like this in my jspx.
    <af:inputText value="#{bindings.SubOrgName.inputValue}"
    label="#{bindings.SubOrgName.label}"
    required="#{bindings.SubOrgName.mandatory}"
    columns="#{bindings.SubOrgName.displayWidth}"
    binding="#{backing_Org.inputText3}"
    id="inputText3"
    rows="1">
    <af:validator binding="#{bindings.SubOrgName.validator}"/>
    </af:inputText>
    Please help.

    Thanks for sharing! ;-)

  • PrepareForDML method called twice

    Have implemented a typical scenario (search - add - edit jspx pages).
    Within one application module, one view object with dynamically created where criterion is used for searching, and another view object fetching at most one row is used for inserting/updating. The second view object is based on a join of an updatable entity (that has as primary key trigger-generated sequence number) and several referenced readable entities that bring descriptions of the codes of the updatable entity. Have implemented descriptions as output fields in the jspx, settign partialTriggers to the id of the code-field of the updatable entity having autoSubmit=true. Have concentrated business validation logic within the prepareForDML() of the updatable entity implementation.
    Under normal conditions, it works fine.
    Under heavy system load in production, or testing with ADF State Management enabled at work environment, I observe the prepareForDML() called twice instead of once.
    Thus, the first time the insert is commited, the second time the validation rollback, and at last the whole transaction is rollbacked.
    When I commented-out all the fields that bring descriptions and set all autoSubmit=false, prepareForDML() was called once.
    However, my problem is that I have to bring the descriptions, that result from pop-up windows so that the end-user can see them after selecting sthg on his/er screen.
    Why is prepareForDML() called twice, and how can I avoid this?

    (2) Can't change the second trigger-assigned field from DBSequence to simply Number since the Entity Object Editor hides the tab Sequence to declare the sequence from which to get this field's value after insert.
    Please see section "6.6.3.8 Trigger-Assigned Primary Key Values from a Database Sequence" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html for more information on this. The "Sequence" tab doesn't have any runtime behavior influence. The sequence number is not assigned by ADFBC, it is assigned by your trigger. ADFBC only worries about:
    1) Providing a temporary unique negative key so that new detail rows can have a temporary foreign key value to point at until the transaction commits
    2) Refreshing the entity object's primary key value from the database-trigger assigned sequence number (however, we really don't know how the trigger populated the value) Theoretically, it may or may not have used a database sequence to assign the number. It would work just the same at the ADFBC level)
    3) Refreshing the temporary negative foreign key values in newly-created detail rows for new, composed details of the new composing master row with the definitive primary key value.
    So, you should safely be able to change this to a Number, with its Refresh after Insert property set.
    (3) Create() on entity implementation was always called once at page load, unexpectedly prepareForDML() always carried on two consequtive rows (either the new row to insert twice or the query's first row retrieved to update and afterwards the new row to insert) having State Management enabled.
    If create() is being called only once, then next you should check the value of the "operation" flag that is passed to prepareForDML() to understand if the method is being called for DML_INSERT or DML_UPDATE. Perhaps somehow an existing row is being inadvertently updated so one of the calls to prepareForDML() might be an update? I don't understand how prepareForDML() could fire twice for two new entity objects if the entity object's create() method is only called once. If you have a testcase that illustrates this, please report it to Worldwide Support via Metalink so they can triage and file a bug for you on it.
    (4) Swapping selectInputText components with SelectOneChoice, thus avoiding the partial page rendering, I managed prepareForDML() to function logically so that to have only one row to insert, but again since I have validation code in my entity implementation that throws JBO-exceptions, another problem occured. The first time the end-user receives an exception (e.g. invalid Tax Number), the second time he/she corrects it, the created row instance at prepareForDML() doesn't get updated with the new valid Tax Number, but continues to hold the old value at second run. To remind that if insert is successful the navigation moves on to the update page, otherwise it remains at the same (navigation outcome is null).
    Are you absolutely sure in this case that a second new row is not getting created?

  • Swing: actionPerformed method called twice

    Hi All,
    In a Swing application, is it correct to do as below piece of code, In a button click event handler call the actionPerformed method once again when the validation fails. Will it have any effects on the performance.
    The reason for me to ask this is because my Swing application works fine for a level of time. Then suddenly starts to call the actionPerformed method twice without any reason for each button click event.
    All I can suspect is the below piece of code. Pls help. Let me know if I am not clear.
    button_actionPerformed(ActionEvent e) {
      Actions .......
      If(!Validate) {
            button_actionPerformed(ActionEvent e);
    }

    ActionListener is there only once
    button.addActionListener(new java.awt.event.ActionListener() {     
       public void actionPerformed(ActionEvent e) {
             try{
                button_actionPerformed(e);
             catch (Exception ex)
                ex.printStackTrace();
    });

  • Handling result ciontaining xml nodes from  c# web service method call in flex

    I have read a article headed: Handling results as XML with
    the e4x result format
    Using this I have build a test application.But facing lot of
    problems.
    Here are the details of my code.I have used first example of
    using namespace.
    private namespace tempNamespace = "TEST1.WebServices";
    use namespace tempNamespace;
    I have specified result type as 'e4x' :
    <mx:WebService id="myTestService" showBusyCursor="true"
    wsdl="
    http://localhost/TEST/TestFlexWS.asmx?WSDL"
    useProxy="false">
    <mx:operation name="HelloWorldEx" resultFormat="e4x"
    result="Hello_Result_New(event);"
    fault="Hello_fault_New(event);">
    <mx:request>
    <strProductName>Test</strProductName>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    In result handler:
    o/p of myTestService.HelloWorldEx.lastResult is:
    <HelloWorldExResponse xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns="TEST1.WebServices" xmlns:soap="
    http://schemas.xmlsoap.org/soap/envelope/">
    <HelloWorldExResult>&lt;PRODUCTCOLLECTION&gt;
    &lt;PRODUCT&gt;
    &lt;PRODUCTNAME&gt;Test Product
    121&lt;/PRODUCTNAME&gt;
    &lt;/PRODUCT&gt;&lt;/PRODUCTCOLLECTION&gt;</HelloWorldExResult>
    <TestResult></TestResult>
    </HelloWorldExResponse>
    When I display alert for :
    Alert.show(
    myTestService.HelloWorldEx.lastResult.HelloWorldExResult);
    It's showing me result as:
    <PRODUCTCOLLECTION>
    <PRODUCT>
    <PRODUCTNAME>NEW DAM</PRODUCTNAME>
    </PRODUCT>
    </PRODUCTCOLLECTION>
    But when I display alert for inner node it doesn't show me
    anything:
    Alert.show(
    myTestService.HelloWorldEx.lastResult.HelloWorldExResult.PRODUCTCOLLECTION.PRODUCT.PRODUC TNAME);
    Can anybody help me out?
    It will be gr8 help for me.

    I have read a article headed: Handling results as XML with
    the e4x result format
    Using this I have build a test application.But facing lot of
    problems.
    Here are the details of my code.I have used first example of
    using namespace.
    private namespace tempNamespace = "TEST1.WebServices";
    use namespace tempNamespace;
    I have specified result type as 'e4x' :
    <mx:WebService id="myTestService" showBusyCursor="true"
    wsdl="
    http://localhost/TEST/TestFlexWS.asmx?WSDL"
    useProxy="false">
    <mx:operation name="HelloWorldEx" resultFormat="e4x"
    result="Hello_Result_New(event);"
    fault="Hello_fault_New(event);">
    <mx:request>
    <strProductName>Test</strProductName>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    In result handler:
    o/p of myTestService.HelloWorldEx.lastResult is:
    <HelloWorldExResponse xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns="TEST1.WebServices" xmlns:soap="
    http://schemas.xmlsoap.org/soap/envelope/">
    <HelloWorldExResult>&lt;PRODUCTCOLLECTION&gt;
    &lt;PRODUCT&gt;
    &lt;PRODUCTNAME&gt;Test Product
    121&lt;/PRODUCTNAME&gt;
    &lt;/PRODUCT&gt;&lt;/PRODUCTCOLLECTION&gt;</HelloWorldExResult>
    <TestResult></TestResult>
    </HelloWorldExResponse>
    When I display alert for :
    Alert.show(
    myTestService.HelloWorldEx.lastResult.HelloWorldExResult);
    It's showing me result as:
    <PRODUCTCOLLECTION>
    <PRODUCT>
    <PRODUCTNAME>NEW DAM</PRODUCTNAME>
    </PRODUCT>
    </PRODUCTCOLLECTION>
    But when I display alert for inner node it doesn't show me
    anything:
    Alert.show(
    myTestService.HelloWorldEx.lastResult.HelloWorldExResult.PRODUCTCOLLECTION.PRODUCT.PRODUC TNAME);
    Can anybody help me out?
    It will be gr8 help for me.

  • Getting Excel to interpret the return string of a WEBSERVICE() function using a WCF REST service.

    I am using the WEBSERVICE() function in Excel and a WCF REST service is called through this function.  
    The web service returns a string value of true or false when invoked.  E.g. <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">True</string>
    This has been confirmed through debugging and it seems to be working fine when invoked through a client application or browser.
    However, the result shown in the cell in the Excel sheet is #VALUE!. This particular cell has a custom format (set using the Format Cells ... option) that displays "Yes" or "No". (The
    custom format is "Yes" ; "Yes" ; "No".)  Is this the correct way of interpreting the results of a Web Service method called in Excel? Does a #VALUE! result actually imply a formatting issue or some other interpretation
    error? Is there anything missing? Can somebody suggest ideas?
    Any help would be appreciated.
    Many thanks,
    Keith
    R K Howard

    Hi Keith,
    Have you used the formula FILTERXML(xml, xpath) function to extract single pieces of data from the XML string?
    If not, please follow the blog below, the author will guide you to get data from Webservice.
    http://blogs.office.com/2013/03/21/use-webservice-functions-to-automatically-update-excel-2013-spreadsheets-with-online-data/
    Best Regards
    Lan 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Rest services using WCF

    Hi,
    Couple of doubts about wcf rest  services.
    1, how a wcf rest service call is made from a asp.net mvc or asp.net web application .
     a, What is the better way to consume in ecommerce application (where traffic is more)
    b, is it using a httpwebrequest obejct or do we need to create a proxy class , can anybody paste a snippet of the code
    consume it ore please suggest a web reference link .
    2, is the web api took over the wcf rest service role  or still it is using in industry.
    Thanks

    Hi techasuran,
    >>1, how a wcf rest service call is made from a asp.net mvc or asp.net web application .
    a,What is the better way to consume in ecommerce application (where traffic is more)
    b, is it using a httpwebrequest obejct or do we need to create a proxy class , can anybody paste a snippet of the code
    For the WCF Rest Service, we can not do the add the service reference as do in WCF SOAP Service, because the REST Service has no concept of a WSDL in WCF. Then if you want to call the WCF Rest Service from a asp.net mvc or asp.net
    web application, please try to use the HttpWebReqest, HttpClient or the Jquery to help us. In my mind the better way to consume the WCF Rest Services in the ecommerce application is to use the Jquery Ajax Calls.
    For more information, please try to refer to the following articles:
    #Call Restful Service using HttpWebRequest:
    http://fromjami.wordpress.com/2013/05/26/call-restful-service-using-httpwebrequest-and-post-data/ .
    #Create and consume WCF Restful Service using an HttpClient:
    http://chsakell.com/2013/07/12/create-and-consume-wcf-restful-service-using-an-httpclient/ .
    #Consume RESTful service using jQuery in 2 simple steps:
    http://www.topwcftutorials.net/2013/10/consume-rest-service-using-jquery.html .
    >>2, is the web api took over the wcf rest service role  or still it is using in industry.
    Web API is open source an ideal platform for building REST-ful services over the .NET Framework. Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats). It also supports the
    MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection, unit testing that makes it more simple and robust.
    For more information about the difference betwwen the WCF Rest Service and Web API and how to choose betwwen them, please try to refer to the following articles:
    #Difference between WCF and Web API and WCF REST and Web Service:
    http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
    #WCF or ASP.NET Web APIs:
    http://www.codeproject.com/Articles/341414/WCF-or-ASP-NET-Web-APIs-My-two-cents-on-the-subjec .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Action Listener Method called multiple times

    I have a page (fragment .jsff), containing a simple input text and a button called "search". When I click on "Search" the action listener is triggered multiple times. (The results are displayed in a table inside a panel collection).
    The results are actually coming back ok.
    When I debug the code, I can see the action listener method called twice.
    Do you know why is that?
    What should I be taking care of?
    This is my code :
    *** Fragment ****
    <af:commandButton text="#{identityBundle.search_label}" id="cb1"
    actionListener="#{UserDetailsBean.searchUsersListener}"
    disabled="#{!bindings.searchUsers.enabled}"/>
    *** Managed bean ***
    public void searchUsersListener(ActionEvent actionEvent) {
    // Add event code here...
    DCBindingContainer bindings = (DCBindingContainer)getBindings();
    DCIteratorBinding iter = bindings.findIteratorBinding("userIterator");
    DCDataRow row = (DCDataRow)iter.getCurrentRow();
    User user = (User)row.getDataProvider();
    boolean isSearchCriteriaPresent = false;
    if(user != null){
    String fn = user.getFirstname();
    if(fn != null && !fn.trim().equals("")){
    isSearchCriteriaPresent = true;
    user.setLastname(fn);
    user.setNonMTUserLogin(fn);
    try {
    Map <Object, Object> userMap = PropertyUtils.describe(user);
    for(Map.Entry<Object, Object> entry: userMap.entrySet()){
    if(entry.getKey() != null && entry.getValue() != null && !entry.getKey().toString().equalsIgnoreCase("class")){
    isSearchCriteriaPresent = true;
    break;
    } catch (IllegalAccessException e) {
    e.printStackTrace();
    } catch (InvocationTargetException e) {
    e.printStackTrace();
    } catch (NoSuchMethodException e) {
    e.printStackTrace();
    if(!isSearchCriteriaPresent){
    user.setFirstname("*");
    OperationBinding opBinding = (OperationBinding)bindings.getOperationBinding("searchUsers");
    opBinding.getParamsMap().put("user", user);
    opBinding.execute();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
    scopePageFlowScopeVar.put("userSearchCriteria", user);
    ADFContext adfCtx = ADFContext.getCurrent();
    Map sessionScope = adfCtx.getSessionScope();
    sessionScope.put("userSearchCriteria", user);
    setUserSearchCriteria(user);
    if(selectedUserID != null){
    selectedUserID.setValue(null);
    RichTable table = getUserResultsTable();
    DCIteratorBinding searchUsersIterator = (DCIteratorBinding)bindings.get("searchUsersIterator");
    Row[] rows = searchUsersIterator.getAllRowsInRange();
    if(rows.length > 0){
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(rows[0].getKey());
    rks.add(keyList);
    table.setSelectedRowKeys(rks);
    table.setDisplayRowKey(keyList);
    refreshState(table);
    if(!isSearchCriteriaPresent){
    user.setFirstname(null);
    else{
    deleteUserButton.setDisabled(true);
    resetPasswordButton.setDisabled(true);
    enableUserButton.setDisabled(true);
    disableUserButton.setDisabled(true);
    Thanks in advance for your help

    Hi,
    Can you try this?
    1. set partialSubmit=true for the "search" button
    2. set "search" button id as partialTrigger in your result table
    -Prasad

  • Expose REST service in PI

    Hi all,
    I kindly ask if it's possible to expose a REST web service with PI to be called from an external application.
    I've created many scenarios in wich I created a SOAP service (from service interface) in PI and I was able to call the service from an external application (e.g. SOAPUi).
    Is it possible to make the same thing exposing a REST service (the url should contain parameters).
    I've seen some discussions and blogs with examples of usage of "SOAP Axis" but it seems it's be possible only to invoke an external service.
    Is it possible also to create a REST web-service?
    If yes could you please provide examples or step-by-step procedure?
    Thanks in advance for any help.
    Stefano.

    Hi Stefano,
    please check the below link where REST adapter key features.
    >>>I kindly ask if it's possible to expose a REST web service with PI to be called from an external application.
    It can be used to expose internal applications as REST services or to consume external REST services by calling these services from SAP PI.
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2011/11/08/rest-adapter-for-netweaver-sap-pi
    Thanks and Regards,
    Naveen    

  • Making an asynchronous method call in Oracle Weblogic Workshop 10.3.2

    Hi,
    Need to make a non blocking asynchronous method call from my application.
    There is an http url which i need to call but in asynchronous way.
    example:
    URL myPage = new URL("http://www.mypage.com/");
    URLConnection yc = myPage.openConnection();
    but the method to be invoked in non blocking or asynchronous way, so that the thread doesn't get stuck when the server of the target url ( http://www.mypage.com) is not working.
    regards
    pramod
    mumbai/India.

    Hi Pramod,
    Well in generally all the Synchronous call only if you want to achieve asynchronous method calls use Web-services method call.
    Here is link which help you to achieve your task.
    http://docs.oracle.com/cd/E11035_01/wls100/webserv_adv/asynch.html
    Regards,
    kal

  • ItemListener calls Twice

    Hi,
    I am having a ComboBox and when I select an Item, my listener calls twice.
        cmbInputSource.addItemListener(new java.awt.event.ItemListener() {
          public void itemStateChanged(ItemEvent e) {
              setInputSource(cmbInputSource.getSelectedItem().toString());
        });Thats my code, I am using this code in my Constructor, but I still dont find why this method calls twice.
    Any Ideas?
    Thnx

    Great job ��we define this not a bug, but a feature :/
    Or is anyone serious that it is good API design to make a method name look self-explanatory, but have an important detail hidden in the documentation?
    The unnecccessary double call of event listeners may potentially decrease the perceived performance of the system by 50% ��this shouldn't be a favourite solution.
    I searched the bug database for an "RFE" concerning this point, didn't find one. However I don't file one, as I don't have a simple test code at hand to demonstrate the problem.
    Martin

  • How to call rest service with POST Http method in SMP2.3 HWC?

    Hi Experts,
       I am doing a sample for Rest Service in smp.
    http://192.168.1.119:8086/Test/services/Products
    I am calling the above service in the smp it is pulling the data from the service with GET Http Method.
    Now i want to call this service for login functionality.
    http://192.168.1.119:8086/Test/services/auth?uname=:uname&pass=:pass
    here :uname &:pass values are argument values for the uname & pass.
    the output of the service is
    http://192.168.1.119:8086/Test/services/auth?uname=sravanya.k&pass=sravanya
    <?xml version="1.0" encoding="UTF-8"?>
    <details>
    <responsecode>200</responsecode>
    <profile>
    <firstname>sravanya</firstname>
    <lastname>k</lastname>
    <email>[email protected]</email>
    <chart_type>North</chart_type>
    <location>MACHILIPATNAM</location>
    <language>English</language>
    </profile>
    </details>
    How can i do this?
    Thanks & Regards,
    Sravanya K

    Create a uriTemplate like this
    /auth?uname={uname}&pass={pass}
    use GET method only.
    generate the personalization keys.

Maybe you are looking for