Calling webservice in code using data control ADF Mobile

Hi,
I am calling webservice in code using data control. Below image is show my binding.
https://www.dropbox.com/s/ufjnnd67mfaeucq/Snap%202013-05-13%20at%2011.49.17.png
My code is :
ValueExpression ve1 = AdfmfJavaUtilities.getValueExpression("#{bindings.WeatherDescriptionIterator}", AmxIteratorBinding.class); // Using IteratorBinding
AmxIteratorBinding iter = (AmxIteratorBinding) ve1.getValue(AdfmfJavaUtilities.getAdfELContext());
GenericType row = null;
iter.getIterator().first();
iter.release();
for(int i = 0; i < iter.getIterator().getTotalRowCount(); i++)
row = (GenericType)iter.getCurrentRow();
Integer s = new Integer(i+100);
row.setAttribute("deptId", s);
This code is work fine in POJO data control. But When I used this code for calling webservice data control then i get following error.
can not find property bindings.
And I also use below code but same error occur.
ValueExpression ve1l = AdfmfJavaUtilities.getValueExpression("#{bindings.WeatherDescription.collectionModel}", AmxCollectionModel.class); // Using CollectionModel
AmxCollectionModel model = (AmxCollectionModel)ve1l.getValue(AdfmfJavaUtilities.getAdfELContext());
Object[] myArr = model.getKeys();
for (int x = 0; x < myArr.length; x++)
Object myObj = myArr[x];
Map provider = (Map)model.getProviders().get(myObj);
String deptName = provider.get("deptName").toString();
}

!!!! IMPORTANT !!!!
The use of +*#{data.view_FlexFieldDisplayPageDef.publicflexfieldflow1.regionModel}"*+ in your code is an *absolute no-go and serious coding issue* as there is no guarantee that this PageDef file exists in the application you use the declarative component in. Even if you don't plan to use the declarative component anywhere else, you should pass the model reference as an input attribute to the declarative component so it can be configured by each use of the component
Frank

Similar Messages

  • Web Service Data Control ADF

    Hi,
    I am trying to create an application using Web service Data control in Jdeveloper 11g TP4. This web servcie returns complex data type: that is an object.
    while creating data control using wizard : Web service Data control, I am able to get the data control having input patrameter and return object and on exapnding that in data control palette I am able to get all atrribute of that objects.
    Data control Palette:
    operation : viewRequest(String)
    Parameter
    REQID
    Return
    viewrequest_result
    ReqID
    Product Code
    Quantity
    Price
    I have created a simple JSF form by draging and droping the components fron Data control palette. There are two problems that I am facing while running the application:
    1. Getting NullPointerException for the input parameter stating that input parameter can not be null: Error while building SOAP request
    oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider setParameters
    Value for parameter 'USRID' cannot be null
    2. Setting that parameter with a default value I am able to call the web servcie and web service is successfully get invoked too and returns the response but the problem is that on Jdeveloper JSF screen it is not showing the output. I have created a read only form by dragging and dropping the return parameter from Data control palette. Even though the reponse is not getting dispalyed.
    Do i need to do anything more or I am missing any step. I have referrrd the link http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html : stating the complex return type handling in Jdeveloper 10.3. Do I need to create a Java Bean for the complex type even though data control is having all object attribute of complex data type.
    Thanks in advance.

    Please make sure that the service's return strcture follows the same strutre as described in the WSDL file. In almost all of the cases like this, I found that service returns doesn't exactly match the structure definition. In that case the WSDC fails to parse the output the way it's told to and the EL used in the pages will fetch nothing, hence a black page shows up.

  • Jdev 11g, Passing data between pages using data control

    Hi,
    I'm fairly new to Jdev, J2EE, and ADF. I created a project using the tutorial "Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces" (found here: http://www.oracle.com/technology/obe/obe11jdev/11/ejb/ejb.html).
    Data model part seems to work fine. I am able to connect to the database and print out a record using the sample client.
    Now I'm trying to build the web front end for it. I started using a data control and ADF to make the components. I built a search page by dragging and dropping my method from the data control onto a form. I set the action on the form to go to a detail page which I put a database node from my table product_group. My thinking was the user would put in the id and then be taken to the next page that has the detail on it.
    When I ran the page though the search page seemed to execute fine but the detail page came up blank. There were no runtime errors. I think data is not being passed to the next page.
    This is the code for the form on the search page:
    <af:form>
    <af:panelFormLayout>
    <af:inputText value="#{bindings.p_id.inputValue}"
    label="#{bindings.p_id.hints.label}"
    required="#{bindings.p_id.hints.mandatory}"
    columns="#{bindings.p_id.hints.displayWidth}"
    maximumLength="#{bindings.p_id.hints.precision}"
    shortDesc="#{bindings.p_id.hints.tooltip}">
    <f:validator binding="#{bindings.p_id.validator}"/>
    <af:convertNumber type="number"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.queryProdGroupFindByID.execute}"
    text="Search ID"
    disabled="#{!bindings.queryProdGrouptestFindByID.enabled}"
    action="search"/>
    </af:panelFormLayout>
    </af:form>
    This is the detail page:
    <af:form>
    <af:panelFormLayout>
    <af:panelLabelAndMessage label="#{bindings.description.hints.label}">
    <af:outputText value="#{bindings.description.inputValue}"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.id.hints.label}">
    <af:outputText value="#{bindings.id.inputValue}">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.id.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.status.hints.label}">
    <af:outputText value="#{bindings.status.inputValue}"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.storeId.hints.label}">
    <af:outputText value="#{bindings.storeId.inputValue}"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.type.hints.label}">
    <af:outputText value="#{bindings.type.inputValue}">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.type.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    </af:panelFormLayout>
    </af:form>
    I guess what I'm asking is how does data get passed to the detail page using a data control? Also if anyone has an online book about data controls and how they work I'd appreciate that too. Too much magic going on.
    Thanks in advance.
    Edited by: user2936931 on May 3, 2009 5:15 PM

    I went to the bindings tab for my search.jspx page and found in the 'executables' table queryProdGroupFindByIDIterator. I looked in the properties for that and 'CacheResults' is set to '<default>true'. Next page still looks blank. I changed it to straight up 'true' and that didn't work either.
    If I'm in the right place I guess it must be something else?

  • Input Number Spinbox using data control

    Hello,
    I have a simple question :)
    I have created a data control using a simple POJO class. I am trying to create an input number spinbox on the page.
    i created an int with getter/setters in my POJO and generated the DC, but when i drop it on the jsf, i do not get the option of creating an input number spinbox. I tried creating an "Integer" object and a String as well, but no luck.
    What do i have to create in my POJO so that when i drop it, i get the option of creating an input number spinbox
    Thanks

    Hi,
    not all ADF Faces components are listed in the ADF binding dialog. So in your case, you create an inputText and then change it to a spinBox. You can do so by selecting the spinbox in the component palette using the right mouse button and move it on top of the input text field you want to change to become a spinbox. Then when converting the components, then IDE tells you which attributes are changed (e.g. no longer available in the new component)
    Frank

  • Need pointers on how to use SQLite in  ADF Mobile applications

    Hey,
    I am trying to develop an ADF mobile App. I am new to ADF mobile. I went through some of the tutorials but still need some clarification on how to use SQLite inside the application. Can i get a Data control out of it? Or is it just to read and write data .
    that brings me to the other question, Is the 'demo.db' i.e the db file which represents the Database, supposed to be packaged as a resource with the application?
    Pls give me some info abt this.. If you can provide me links with this information, it would be of great help.
    Thanks,
    Jithesh

    You can expose a java class containing methods (select, update, ...) as a Data Control.
    Yes, you need to add your .db as a resource.
    Here a blog post about SQLite in ADF Mobile:
    http://adf4beginners.blogspot.be/2013/03/adf-mobile-sqlite-in-adf-mobile.html

  • Is it possible to call a task flow present in 1 ADF Mobile Application to another ADF Mobile Application?

    In ADF Mobile, I want to call a task flow present in application1 to a different application2 on click of a button. Is it possible?

    Hi,
    This is my code to call the package.
    String amDef = "model.service.DAFService";
    String config = "DAFServiceLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
         CallableStatement cstmt = null;
         String stmt = "begin call CP_DAF_PKG.DAF_PROCESS(?,?,?,?,?,?,?,?,?); end; ";
         cstmt = getDBTransaction().createCallableStatement(stmt,0);
    But in this case, I am getting
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    I understand the reason for this error. I need to call the
    createcallableStatement from the application module that I have above.
    Something like am. (call the package)
    But not sure about any method which does that..
    Please let me know if you know the way to solve it.
    Thanks,
    Venki

  • Call webservice from domino use in webdynpro

    Hi all
    I m trying to get a web service from domino for that I created a webservice project and deployed it. Now Is it possible to use that webservice in webdynpro, if possible help me doing the same.
    Thanks in advance.
    Regards,
    Suresh.A

    Hi all
    I m trying to get a web service from domino for that I created a webservice project and deployed it. Now Is it possible to use that webservice in webdynpro, if possible help me doing the same.
    Thanks in advance.
    Regards,
    Suresh.A

  • Using data controls in a Declarative Component

    Hi,
    I'm trying to create a Declarative Component that uploads a file and update a database table, I've created an entity and a updatable view object of the table. When I put the Declarative Component in another project it renders correctly but the af:table that shows the database records show me "Access Denied". When I try to list the datasources available programatically it does not show the DS I've created in the declarative component project. How do I access this datasource?

    Hi,
    you expose an attribute on the declarative component that then you pass in the binding reference to access the View Object. If you expose an attribute of type DCIteratorBinding, then this can take an iterator reference (EL) as the input. In a managed bean in the declarative component you then resolve the #{comp} EL string (its a variable defined on your declarative component to point to itself) to access the attribute and get a hold to the iterator binding you passed in.
    See sample 24 for a simplified version of what I decsribe: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    Frank

  • How to get open calender of specific date from adf-mobile

    HI,
    I have 2 variablesin my bean class. 1st contains the date and 2nd contains the event name.
    in my poc when user click on a commandLink it opens the calender with that date selected and with an event which is in our second variable.
    Kindly help me in this, how can i do this with ADF-Moble on AMX or HTML page.
    Thanks and Regards,

    Hi,
    Please try this.
    PARAMETERS: P_START LIKE SY-DATUM,
                P_END   LIKE SY-DATUM.
    DATA: DAYS    TYPE I,
          WEEKDAY LIKE DTRESR-WEEKDAY.
    DAYS = P_END - P_START.
    DO DAYS TIMES.
      CALL FUNCTION 'DATE_TO_DAY'
        EXPORTING
          DATE    = P_START
        IMPORTING
          WEEKDAY = WEEKDAY.
      IF WEEKDAY = 'Sat.'.
        WRITE: / P_START.
      ENDIF.
      P_START = P_START + 1.
    ENDDO.
    Regards,
    Ferry Lianto

  • Scope of java class used for building data control

    Hello,
    I have tried a sample application where in we are using Datacontrols to render the UI.
    The data control is generated off a simple java class(abc.java) which is used to render a "Page called - Employee". This java class then uses a session bean which in turn talks with the database entities. The database entities(POJO's - employee.java) are then exposed in the abc.java and used to display data on the UI such as employee name, id , etc.
    My question is regarding the scope of abc.java. I presume, that the constructor of this class will be called when the page is rendered.
    Now say i am navigating from some Page-A to Page-Employee. On click of a button in Page A, i want to go to the Database, retrieve a particular employee's details and then place it in the employee entity exposed in abc.java so that it gets displayed when Page-Employee is rendered.
    If the actionlistener method of the button click in Page A has the code of - 1)create new instance of abc - new abc() 2)retrieve employee entity 3) set employee entity in the class level attribute of abc
    But on going to the next page-employee, a new instance of abc is getting created and i am losing the employee that i had retrieved in the previous screen.
    Is there a scope for abc that can be set somewhere similar to managed beans? or is there some other solution.
    -thanks

    Hi,
    Say, on an 'employee create page' we use data controls which are generated from a java class, 'EmployeeService'.
    This java class has the POJO(entity) - Employee whose attributes like name, description are used to create input text boxes on the employee page.
    Now, assume we come to the Employee create page from some other page in the application; where exactly is the best place to make an instance of the employee entity.
    Do we place- Employee emp = new Employee(); in the constructor of the EmployeeService.java class or is there some other way?
    Any pointers would help.
    Thanks
    Edited by: user9935204 on Feb 4, 2010 8:44 PM

  • Programatically retrieve data using iterator in oracle ADF Mobile

    I want to read programatically data using iterator in ADF mobile. My code is :
    try
    ValueExpression vex = AdfmfJavaUtilities.getValueExpression("#{bindings.WeatherDescriptionIterator}", Object.class);
    AmxIteratorBinding iter = (AmxIteratorBinding)vex.getValue(AdfmfJavaUtilities.getAdfELContext());
    GenericType row = null;
    BasicIterator bIter = iter.getIterator();
    iter.getIterator().first();
    ArrayList employees = new ArrayList();
    for(int i = 0; i < iter.getIterator().getTotalRowCount(); i++)
    row = (GenericType)iter.getCurrentRow();
    String phone = "";
    String email = "";
    if(row.getAttribute("Description") != null)
    phone = row.getAttribute("Description").toString();
    if(row.getAttribute("WeatherID") != null)
    email = row.getAttribute("WeatherID").toString();
    setTempValue(phone + " " + email);
    iter.getIterator().next();
    catch(Exception e1)
    AdfException ex = new AdfException(""+e1.getLocalizedMessage(), AdfException.ERROR );
    throw ex;
    I get error :-> cant not find property bindings
    Edited by: user12190920 on May 7, 2013 5:48 AM

    Hi,
    You can try the below code. Make sure the WeatherDescription should be of type Tree binding
    ValueExpression ve1 =
    AdfmfJavaUtilities.getValueExpression("#{bindings.departments.collectionModel}", AmxCollectionModel.class);
    AmxCollectionModel model = (AmxCollectionModel)ve1.getValue(AdfmfJavaUtilities.getAdfELContext());
    Object[] myArr = model.getKeys();
    for (int x = 0; x < myArr.length; x++) {
    Object myObj = myArr[x];
    Map provider = (Map)model.getProviders().get(myObj);
    String deptName = provider.get("deptName").toString();
    Hope this article may help you - http://deepakcs.blogspot.in/2013/02/adf-mobile-iterate-through-all-rows-in.html
    - Deepak

  • Manipule a lista in data control

    Hi everyone,
    I have a data control from a oracle component and I don't have access to this code, so I used it in my page, the data control returns a collection of items, so I can use adf tree and other thinks like that.
    The data control is a data control from a UCM component and I'm using getItems method.
    So, as I say before I don't have access to the code of data control but I need manipulate the return with java operations, I need sort this list.
    I was thinking about call this method in my java method and create my custom data control, but I don't know how "call" the data control method in my custom method.
    I would like to know if it's possible cat the result of this oracle data control in a java method and so I can manipulate this.
    Thks in advance,

    Is it possible to which type of Object, the list returned by the datacontrol contains?
    If yes, you could create a custom comparator,
    (The below sample NavigationTreeNode is the type of each item in the list)
    import java.util.Comparator;
    public class NavigationTreeNodeComparator implements Comparator<NavigationTreeNode> {
    public NavigationTreeNodeComparator() {
    super();
    @Override
    public int compare(NavigationTreeNode navigationTreeNode1,
    NavigationTreeNode navigationTreeNode2) {
    int displaySequence1 = navigationTreeNode1.getDisplaySequence();
    int displaySequence2 = navigationTreeNode2.getDisplaySequence();
    if (displaySequence1 > displaySequence2) {
    return +1;
    } else if (displaySequence1 < displaySequence2) {
    return -1;
    } else {
    return 0;
    After getting the list from method, you can use the custom comparator to sort the list as follows:
    Here, the navigationTree contains the list of navigationTreeNodes
    NavigationTreeNodeComparator navigationTreeNodeComparator =
    new NavigationTreeNodeComparator();
    Collections.sort(navigationTree, navigationTreeNodeComparator);
    Thanks,
    Navaneeth

  • Selected node in a tree table (via Data Controls and not managed bean)

    I am facing some problems in getting the selected row in a tree table.I have used data controls for creating the tree on the page.
    I have 3 POJO's,ex; Class AB which has a list of Class CD.And Class CD has a list of class EF. (Used for the tree table)
    Now i have a java class, called MyDelegate.java which has a list of AB.I generated data controls off this MyDelegate class and have dropped the ABlist as a tree table (also displaying CD and EF in the tree table).
    It displays fine with nodes of AB,CD (child of AB)and EF(child of CD)
    The tree table is not bound to any managed bean.
    For performing actions on the tree, i create a method - "doSomething() in the delegate class",generate data controls and drop it as a button.
    Inside doSomething(), i need acess to the selected node in the tree (it can be a node of type AB or CD or EF).
    The problem: I always get access to the node of type AB, and not the child nodes no matter what i click in the tree table.
    doSomething(){
    DCBindingContainer dcBindingContainer = (DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
    DCIteratorBinding dcTreeIteratorBinding = dcBindingContainer.findIteratorBinding("lstABIterator");
    RowSetIterator rowTreeSetIterator = dcTreeIteratorBinding.getRowSetIterator();
    DCDataRow rowTree = (DCDataRow)rowTreeSetIterator.getCurrentRow();
    if (rowTree.getDataProvider() instanceof AB) {
              //do something
              AB selectedAB = (AB)row.getDataProvider();
    } else if (rowTree.getDataProvider() instanceof CD){
              //do something
    } else if (rowTree.getDataProvider() instanceof EF) {
              // do something
    How do i access the "selected child node of the tree table" here in the delegate class method? Pls help.

    Hi Frank,
    Thanks for the response. In my case, i dont have a managed bean, so i am slightly unsure how to do it.
    There is a mention "Note that another way to access the treeTable component at runtime is to search for it in JavaServer Faces UIViewRoot. This latter option allows you to write more generic code and does not require to create a page dependency to a managed bean"
    How do i use this adf view root (without a managed bean) to get hold of the selected row in the tree table. Pls help.
    Thanks.

  • Calling a transaction code

    Dear Expert,
    Is that possible to call a transaction code using a webdynpro for abap. I have a button in my program where when i click on the button, it need to all up the su01 screen.
    My coding is as below
    method ONACTIONEDIT_APPRAISAL .
    LEAVE TO TRANSACTION 'SU01'.
    endmethod.
    However when i run this program, and click ont he button, the system return a short dump.
    Any idea?
    Thanks,
    Regards,
    Bryan

    Dear Suman or anyone,
    I have solve this using the navigate_absolute method, however the NAVIGATION_MODE seem that does not works.
    Code begin*
    method ONACTIONEDIT_APPRAISAL .
      data lr_componentcontroller type ref to ig_componentcontroller .
      data l_api_componentcontroller type ref to if_wd_component.
      data lr_port_manager type ref to if_wd_portal_integration.
      lr_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
      lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
    Data:
    target type string.
    Data:
    nmode type string.
    target = 'pcd:portal_content/mysap/Appraisal/PPPM_PAGE'.
    nmode = 'INPLACE'.
      call method lr_port_manager->navigate_absolute
        exporting
          NAVIGATION_MODE = nmode
          navigation_target = target
    endmethod.
    *code end
    I have tried to use the INPLACE navigation mode, but it still display it in a new portal page. Anyway to control it? Do i need to define a area so that the target will show in that particular area?
    Please help me...
    Thanks
    Regards,
    Bryan

  • How to control and display video from IP camera using ActiveX control over Internet.

    Hello,
    I need to control my IP cameras over the internet. I need to log into the cameras and then display the video.  There's an ActiveX control registered on the computer and works fine with IE to access and control the cameras. Controlling the cameras using IE works fairly well, but there are some quirks that I'd like to eliminate by using my own custom code.
    Has anyone created a vi that controls a Foscam FI8905W over the Internet? I’ve attempted, but I keep getting a catastrophic failure when I try to call ManagementConnect Method in the DVM_IPCam2 ActiveX Control Module V1.0. I'm not sure whether I need to establish an IP connection with the cameras first, or allow the ActiveX control to establish it for me.
    Some example code would be greatly appreciated. Running LabVIEW 2011 on a Win7 32bit.  Even some code used to control a similar device using ActiveX over Internet would be helpful.

    I have an example vi for interfacing to the foscam activex.
    I plan on using mouse click events within the activex window to trigger the PT function.
    I only have the basic up/down/right/left directions and not the down-right/down-left/up-right/up-left in the enum.  You can load the camera's web page and view the source to see the Java script code that uses the activex control.  There are definitions for the other directions.
    I had to mark the control as "Disabled" to keep click events from going to the activex control.  If I double click the control, it goes full screen.  If I then click on it to get out of full screen mode the video never returns or returns to the wrong spot in the VI.
    Attachments:
    Foscam Demo.vi ‏24 KB

Maybe you are looking for

  • G/L Account Line Display Vendor

    Hi Gurus, I have a FICO requirement that user wants an additional field in FBL3N, Vendor means G/L Account Line Display Vendor... I hava configure it, throught SPRO....and it is showing now in FBL3N (Vendor Field)... But problem is that This Vendor f

  • How to get back lost pictures, HELP!

    Okay, so I was trying to get my photos to the "Downloads folder to use them on editing sites, and I accidentally exited off iPhoto, and all my pics are gone.. How can I recover them?

  • Disabling User Account Control - CUBAC

    Installing Cisco Unified Business Attendant Console.  Documentation says that on server 2003 / sever 2008 installations, disabling of the user account control is required.  It gives a procedure to do this on Server 2008. The install I'm working on is

  • Change_pointers_read FM

    Hi All, I have a requirement like whenever a class(cl02) is created,an idoc should be created. I have maintained two fields in BD52 :class and clint of klah table. object       table name      field name klasse      klah                 class klasse 

  • How do I open Multiple JPG files in RAW with Elements 11

    I choose OpenAs in the editor, and set to Raw, but I can only open one file at a time. Am I doing something wrong? Dennis