Can I access my data control from a normal httpServlet [ SOLVED ]

I have created one Method in my applicationModuleImpl.java file. By client interface I have exposed that method. Now I want to call that method from a httpServlet. What is the procedure to do so?
Is there any way to access the bindingContainer from the servlet? T
Message was edited by:
su2

Invoking Application Module method from a httpServlet ->
Application Module method is like this one ->
The method is only inserting one row in the database table "Address".
public void createAddress(String Name,String Phone){
Row newRow = getAddressView().createRow();
newRow.setAttribute("Name", Name);
newRow.setAttribute("Phone", Phone);
getAddressView().insertRow(newRow);
getDBTransaction().commit();
getAddressView().executeQuery();
Now add ADFUtils.java and JSFUtils.java file in your view layer application.
Create a httpServlet "Servlet 1.java". In the post method write the code as follows ->
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
          response.setContentType(CONTENT_TYPE);
          AppModule bam = (AppModule)ADFUtils.getApplicationModule("AppModule");
          //AppModule is the Application Module Name
          String Name = request.getParameter("Name");
          String Phone = request.getParameter("Phone");
          bam.createAddress(Name,Phone);
Now from any html/JSP/JSF page call the servlet to insert your "Name" and "Phone" in the database table Address. The code is as follows ->
<form action="servlet1" method="post">
Name input type="text" name="Name"/>
Phone<input type="text" name="Phone"/>
<input type="submit" name="Save" value="Save"/>
</form>

Similar Messages

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • Not able to access SOAP web service data control from adf mobile

    Hi,
    I am trying to call web services from adf mobile..
    I have created data control from external web service and it is perfectlly working on web browser..
    But why it is showing an error on emulator??
    Is there any .jar file missing in adf mobile so that it is not supporting a web service?
    Or is there any other problem? Emulator is connected to network and I am able to run WSDL in emulator's browser..
    Please help me to solve this issue..
    Thanks,
    Laxmi

    Emulator is connected to network and I am able to run WSDL in emulator's browser..
    Connecting to WSDL in the browser is not the same as connecting to WSDL in an application.
    To access a web service from an Android device enable a permission in AndroidManifest.xml that allows applications to open network sockets. Add the following uses-permission element.
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

  • I upgraded to the new IOS, but lost data and apps. When I try and restore the only backup I see is the one made AFTER the lost data. How can I access an older backup from the cloud?

    I upgraded to the new IOS, but lost data and apps. When I try and restore the only backup I see is the one it made AFTER the lost data. How can I access an older backup from the cloud?

    Why don't you talk to apple and find out if backup exists? That conversation with apple will stop your guessing.

  • Can i access my data on time capsule from some other network

    can i access my data on time capsule from some other network that is my data at home from office over internet

    There is plenty of info out there if you google..
    Here is a summary I just put into another thread.
    Remote access has been added back into iCloud that was in MobileMe..
    Read the info on setting it up from cloud service.. BTMM.
    http://www.apple.com/support/icloud/back-to-my-mac/
    If you want to do it without the cloud service, you have one major issue.. the public IP for WAN..
    The internal IP of the TC.. which will default to 10.0.1.1 btw.. is irrelevant. It is the IP of the WAN which you use to access the TC over the internet. And here you have a problem.. the TC does not include dyndns service. So unless you have a static IP address from your ISP, this will cause you grief.
    (If it is offered by your ISP.. get a static IP.. that eliminates all the issues.. and is far superior. Even dyndns service has issues if your public IP rotates too often. It is generally an extra cost item and requires a business account but some ISP offer it cheap or even free.. I joined an ISP that offered static ip for free because it gives me the ability to remote access my network without all the hassles you will see below.)
    There are ways around it.. setting up your own domain for instance.
    http://dyn.com/support/airport-time-capsule-with-dynamic-dns/
    But it is easier to simply use a different router.. almost all of them have dyndns service available.. place the TC behind the router in bridge and forward port 548 TCP to it.
    This is a bit old but still relevant.
    http://gigaom.com/apple/access-your-time-capsule-over-the-internet/
    Note .. there is no ftp, http, ssh (there is actually but it isn't accessible), or any other service to allow connection other than AFP.. so you must use a Mac in remote location to access the TC.
    The setup for the two methods is slightly different in the TC.. in the first instance, you need to turn on WAN access via disk sharing page in the manual setup.
    In the second case you do not need this.
    Remember security and put strong passwords on the disk. There are still security questions about this.
    If security is important.. there is a third and better (IMO) method and that is vpn.. you will need to buy a vpn router as TC also missed out on that.. establish a vpn with the main router and that will allow you access to your network.. you will also then be able to use SMB remotely not just AFP.
    Also if this office is a large company they should be running a firewall, which would block your access to home. You should check your IT admin people for what is allowed.. generally the only acceptable method is vpn otherwise you can drag viruses and trojans right into the network without the firewall catching them.

  • Can I access the data on the time capsule from the Internet?

    Can I access the data on the time capsule from the Internet?

    You need to follow the BTMM via icloud instructions.
    http://www.apple.com/support/icloud/back-to-my-mac/
    There are plenty of other ways to do it.. but issues to do with Apple not using a dynamic DNS client so if your ISP does not allocate you a static public IP there is no way to find it, if the public ip rotates as they are designed to do hourly or daily.
    Do a google search, remote access time capsule..
    Or use the more like this on the right hand side... there are plenty of posts and even youtube video which go right through it.
    BTW your school system may simply block the port.. if I was a school IT admin.. I would. You are dragging files across to the internal school network bypassing the firewall.. that is unacceptable risk to the whole school system.

  • Verizon Chat advises pdf attachment non-download from AOL email is a software problem and directs me to Apple Support. I see "can't access cellular data network" in an instant before the file's icon turns into the file's name.

    Verizon Chat advises pdf attachment non-download from AOL email is a software problem and directs me to Apple Support. I see "can't access cellular data network" in an instant before the file's icon is replaced by the file's name. In Inbox three emails in a row show there is an attachment. My iPad 3rd gen. runs 7.1.

    You have Acrobat Pro on your system. It will try to open PDFs, and of course it will fail. You must uninstall it. Then, you will need a PDF reader. So install Adobe Reader. That seems quite simple, but perhaps something is wrong. If anything goes wrong with these two steps (1) uninstall Acrobat Pro (2) install Adobe Reader, then please let us know the details.

  • Java to access Webservice Data control?

    We created a Data Control from a Web Service.
    My question is can one use this Data Control using POJO.
    I think you should be able to do it but cannot find good documents or examples. Any pointers is much appreciated.

    Hi,
    if you mean a POJO in a SJF or JSP/STruts application, then yes, you can. You expose the data control methods on the binding and access the binding layer. If you mean using it from a non ADF application in a plain POJO, then the answer is no. In this case you would use a WS proxy class
    Frank

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How can I access my iTunes account from my iPhone.

    1- I can't access my iTunes account from my iPhone.
    Do I have to sync them or can I download the songs I bought without connecting with my macbook?
    Last time i connected the two, all my music got deleted. Must have done something wrong, but have no idea how to prevent that from happening again.
    2- My "preferences" panel in iTunes, only shows apps and books, not music- Why?
    3- I can't save any music on iClod.

    hello. 
    i followed your link on how to delete content from all things Apple, and nothing removes books, movies, music... it just gives said device(s) the iCloud/download icon on top of the book, movie...  not sure what the 'hide' purchase actually does - after X'ing/hide, everything STILL appears across all devices using that account.  could you clarify this any further?
    if i am understanding iTunes correctly, then EVERYTHING we download (free or purchased) will be FOREVER accessible with zero way for us to control what is filling up this mysterious vault called the cloud?  (creepy- apple is keeping EVERYTHING, what happens when the cloud gets full?)
    since we have iCloud.com and it shows our "stuff" that we iCloud sync from our devices such as notes, contacts, calendar... then why doesn't apple provide an iCloud.com tab that shows ALL of our purchases so we as CONSUMERS control/delete what is in our account? 
    we download ALOT of apps to try and then delete them off our devices.  that works fine, but movies and books are always there.  maybe a glitch?

  • How can I access a calendar backup from my old iPhone?

    How can I access a calendar backup from my old iPhone?
    I recently had to get a replacement iPhone 4. The tech at the Apple Store thought that I might have had a software problem and recommended that I not "restore from backup," but start this phone as a new device and just sync the apps and what-not. My calendar on my computer was different than the one on my old phone, though, and now I need the data from my old iPhone calendar. I did back up my old phone just prior to taking it to the Apple Store.
    HELP!

    Well what you can do is update to ios5 then use icloud to sync your calandar up to your phone then restore your phone as new and when prompted in the new phone setup put in your icloud username and password and you will have your calandar events back.

  • Hii . , any method can help resotore my data back from the sync service ?!

    hii ,
    I have set up a Firefox Sync account . and, I backed up my laptop but forgot to back up the sync key or the recovery key ! .so Now, I can't set up the Firefox Sync service anymore, as my email address has already registered but i don't have a sync key to access.
    I would like to have the sync key back wthout losing any of my data !! only what i want is my data !!
    so what do i have to do ? can u help me ? or can u send me the recovery sync key ? how can i have my data back from the service ? can u tell any method that can help me or can restore my data plzz ; (
    i have realy important data !! = (
    my email : (Email removed by mod)

    You can try to run a recovery program (recuva, or the like) but that is a slim chance. Otherwise, you can't get that data back after deleting it.

  • Can't access iPhoto 09 library from outside iPhoto

    Since upgrading to iLife 09 I can't access my iPhoto library from anywhere BUT iPhoto. I use Photoshop CS2 and open my photos directly from that application. But now when the directory actually appears, it is greyed-out and inaccessible.

    Yes you can do this
    In Finder you can right click the iPhoto library and choose 'show package contents'.
    but you shouldn't.
    With iPhoto 7 (iLife 08) the old iPhoto Library Folder is now a Package File. This is simply a folder that looks like a file in the Finder. The change was made to the format of the iPhoto library because many users were inadvertently corrupting their library by browsing through it with other software or making changes in it themselves.
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    All of these are a: faster and b: safer than rooting around in the folders of the Library package
    Regards
    TD

  • Calling Data Control from Session bean

    Is it possible to use workshop data control from with in Session bean.

    If the client code is located in the same "deployment unit" (e.g. EAR
    file) as the EJBs, then you can pass the data by reference.
    Serialization is required when crossing between deployment units. This
    is required to support redeployment.
    Hyung-Jin Kim wrote:
    I recently downloaded WL6.0 and I noticed that when a
    session bean returns data to its client, the data is
    always serialized back the client -- EVEN it the client
    is on the same machine. Ideally, I would prefer that a
    reference to the data simply be returned to the client.
    Does the serialization occur because WL6.0 put session
    beans in its own ClassLoader or does the serialization occur
    because of the way WL6.0 compiles the RMI stubs? Thanks
    for your response.
    -hjk

  • Create data control from java class, not see "ADF Parameter Forms" option

    Hi,
    I have created a Fusion Web Application (ADF) in jdev 11g. In the application model project, I created a java class. Inside the java class, I have a public method as below
    public Asset [] searchAsset3(SearchTerm s) // SearchTerm is a java bean. It implements java.io.Serializable.
    I created data control from my java class. After that, I see an xml file generated under the same folder of my java class. Here is the xml content.
    <?xml version="1.0" encoding="UTF-8" ?>
    <JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.53.62"
    id="AIAAsset" Package="oracle.apps.aia.oer.model"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset" isJavaBased="true">
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.AssetSummary"
    BeanClass="com.flashline.registry.openapi.entity.AssetSummary"
    id="searchAssetSummary" ReturnNodeName="AssetSummary"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    <ParameterInfo id="type" Type="java.lang.String" isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset3" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="s" Type="com.flashline.registry.openapi.query.SearchTerm"
    isStructured="true"/>
    </MethodAccessor>
    <ConstructorMethod IsCollection="true"
    Type="oracle.apps.aia.oer.model.AIAAsset"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset"
    id="AIAAsset"/>
    </JavaBean>
    Then, in application user interface project, I created a JSPX page. From the data controls palette, I want to drag and drop the searchAsset3 onto my page. However, I don't see an option for me to choose "Create -> Parameters -> ADF Parameter Form". I only see "Create -> Methods". Unlike other public methods (e.g.searchAssetSummary and searchAsset) which have simple data type as input, I can see the "Create -> Parameters -> ADF Parameter Form" option when I drag and drop to my jspx page. Is that something I missed while creating data controls?
    Thanks.
    Arnold.

    Then, my other question is how do you do the bindings? I drag and drop the attributes from SearchTerm bean. Now the pagedef file has the AttributeValues added but my method is actually expecting one input parameter of type SearchTerm. How do you bind the attributes to the input of the method? Thanks.
    See below of my pagedef xml file.
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.53.62" id="SearchAssetBySearchTerm1PageDef"
    Package="oracle.apps.aia.oer.view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <methodIterator Binds="SearchTerm.result" DataControl="AIAAsset"
    RangeSize="25"
    BeanClass="com.flashline.registry.openapi.query.SearchTerm"
    id="SearchTermIterator"/>
    </executables>
    <bindings>
    <methodAction id="SearchTerm" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="SearchTerm"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    ClassName="com.flashline.registry.openapi.query.SearchTerm"
    ReturnName="AIAAsset.methodResults.SearchTerm_AIAAsset_SearchTerm_result"/>
    <attributeValues IterBinding="SearchTermIterator" id="key">
    <AttrNames>
    <Item Value="key"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="operator">
    <AttrNames>
    <Item Value="operator"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="value">
    <AttrNames>
    <Item Value="value"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="searchAsset3" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="searchAsset3"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    InstanceName="AIAAsset.dataProvider"
    ReturnName="AIAAsset.methodResults.searchAsset3_AIAAsset_dataProvider_searchAsset3_result">
    *<NamedData NDName="s"*
    NDType="com.flashline.registry.openapi.query.SearchTerm"/>+
    </methodAction>
    </bindings>
    </pageDefinition>

Maybe you are looking for