Expose ADF Business Components as Web Service

Hi,
In order to expose ADF BC as Web Services, and return a set a rows from a table, I have followed the tutorial on this page :
http://www.oracle.com/technology/tech/webservices/htdocs/series/pattern/
However, the set of rows returned are un-typed XML elements, because the method is :
public Element getEmp(int empNo)
getEmpView1().setWhereClause("empno = ?");
getEmpView1().setWhereClauseParam(0, new Number(empNo));
return (Element)getEmpView1().writeXML(1,Row.XML_OPT_ALL_ROWS);
As a consequence, in the WSDL the response port is returning a complex type with an "<any />" element. Instead, I would like the response complex type to be an Employee type.
How can I get the AppModule method to be something like :
public Employee getEmp(int empNo)
< what is here ? >
Can I generate the Employee class automatically with ADF BC and serialize it to expose the method as a Web Service ?
Thanks.

up

Similar Messages

  • Problem to deploy to a WebService interface for ADF Business Components to Weblogic Server

    Hi,
      I'm trying to deploy a custom application ,in which i have exposed ADF Business Components through a WebService interface, to a standalone weblogic server.
    Application Module is configured with a Service Interface for ordinary ViewObjects.
    Now I want to create a EAR file of this application to deploy it on the weblogic server.
    But I got an error while deploying it.The error i am getting is shown below.
    ERROR: No Java EE modules detected in EAR archive. Deployment aborted. == (oracle.jdevimpl.deploy.ear.WeblogicAssembler)
    I have followed the steps mention in the below link :
    http://technology.amis.nl/2010/12/29/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components/
    I'm using Jdeveloper 11.1.2.4 on windows.
    Please suggest what i could be doing wrong.
    Regards,
    Himanshu

    Does the deployment profile include Java EE modules?
    Refer
    Java EE Developer: ERROR: No j2ee modules detected in EAR archive. Deployment aborted. == (oracle.jdeveloper.deploy.Veto…

  • Exposing business rules as web services in 11g

    Hi all,
    I have deployed my business rules in Enterprise Manager, but the test button is disabled and I'm getting the next message: "In Enterprise Manager only can be tested composites that are exposed as web services". Does anybody knows how can I do that?

    There are a couple of ways you can do it.
    1. Drag a Web Service Adapter in the 'Exposed Services' panel in your composite and during configuration choose the WSDL of the Decision service i.e Rules. This will expose the rules as a web service if not already.
    2. Double Click on the Reference icon on the Decision Service component (small rounded blue arrow). An Update Interface window will pop up. Check box 'Create Composite Service with soap binding' and select the appropriate port type from the available list.
    You can now invoke your rule as web services and even test them from the EM console

  • Help required building ADF-Swing/ADF-Faces using ADF Business Components

    My question is in regards to how you can go about building a light swing application to an ADF model?
    In particular if I were to say that we were developing a 3-tier project whereby we had a database tier, a series of EJB-ADF façade session beans to the database (middle-tier), and a swing client communicating with the session beans (view-controller tier), how would you go about developing these screens?
    In particular can we develop these screens using ADF-Faces and also ADF-Swing?
    The EJB session façade beans of course are ADF app modules with customised methods. The methods would return back customised DTO objects. These DTO objects are wrappers to row objects ADF would create. This would be mainly due to making these facade beans web service enabled (Oracle state that these methods cannot return oracle.jbo objects if they are to be web service enabled).
    This would be typically deployed to an app server, like Oracle App Server 10G.
    Could you please have a look at this, as I am doing a lot of research into this.
    eg. Taking example from oracle magazine sept/oct 2006
    with slight enhancements
    package oramag.frameworks.example.common;
    import oracle.jbo.ApplicationModule;
    import oramag.frameworks.customdto.EmployeeDTO;
    public interface HRService extends ApplicationModule {
    void deleteCurrentEmpAndCommit();
    EmployeeDTO findEmployee(int employeeId); // new method
    import oramag.frameworks.customdto.EmployeeDTO;
    public class HRServiceImpl extends ApplicationModuleImpl {
    public void deleteCurrentEmpAndCommit() {
    Row empRow = getEmpView().getCurrentRow();
    if (empRow != null) {
    empRow.remove();
    getDBTransaction().commit();
    public EmployeeDTO findEmployee(int employeeId)() {
    EmployeeDTO employeeDTO = null;
    EmployeesImpl employees = getEmployees();
    employees.setNamedWhereClauseParam("EmployeeId", employeeId);
    employees.executeQuery();
    if(employees.hasNext()) {
    EmployeesRowImpl employee = (EmployeesRowImpl)employees.next();
    employeeDTO = new EmployeeDTO(employee);
    return employeeDTO;
    public EmployeesImpl getEmployees() {
    return (EmployeesImpl)findViewObject("Employees");
    Now given the above code snippet, how could you turn this into an ADF-Swing/ADF Faces application so that if a user using the swing application enters an employee id, then the application will execute the query on the app server, the app server in turn returns the results to the client, and the client finally display the results. Typical MVC example.
    Cheers
    Rodney

    The tutorial is for ADF BC used with JavaServer Faces.
    While the tutorial doesn't cover it, we also support drag and drop development for Swing and visual WYSIWYG layout for Swing panels and windows, too. For a very simple example, watch screencast #4 on my blog here:
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    One thing I have noticed is that when using ADF business components, when the app module returns a custom DTO object like the above example, it returns the data in a element structure according to the data control palette.
    You don't generally ever need to create your own custom DTO's when working with ADF for use by client UI's. The only situation where can be necessary -- until we simplify this in the JDeveloper/ADF 11g release -- is when you desire to expose custom methods that can return sets/arrays of typed row structures through a web service. However, web services are not involved/required in building 3-tier Swing applications.
    When dropping onto a page it does so like a string and doesnt give option to display the data in a read only form etc. Is there anything we need to do, to get the functionality.
    It's more of what you don't need to do :-)
    Just leverage the active data model that the ADF application module provides. You can read more about it in section 4.5 "Understanding the Active Data Model" 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). Your UI's bind to view object instances in the data model, and your UI's are automatically kept up to date without needing to write methods that return data. I short article I wrote that preceeded my writing the ADF Developer Guide content on this topis is here:
    http://radio.weblogs.com/0118231/stories/2006/01/26/theAdfBusinessComponentsActiveDataModel.html
    I know that when dropping a view object you get this functionality. Also was wondering if we were to pass an object of thios type back to the model it might not give us the rich functionality like input forms, like what Oracle provides if we were to drop a enitity view object.
    Just use the active data model and everything becomes totally easy, with no changes required to switch between local or three-tier deployment configurations.
    Trying to do everything with hand-coded DTO beans is really going the hard way.
    Could you help us regarding this?

  • ADF business components and scalability ?

    Hello,
    I am new to the ADF Framework, I come from an open source background.
    I have a limitation to use Oracle technologies for an internet banking design.
    My concern is the large number of users accessing the system and how we scale up through clustering.
    Do you recommend ADF business components for this application, can ADF be simple POJOs handlers or EJB 3.0 session facades ? if that is the case, would you recommend EJB 3.0 for clustering and scalability for an internet banking system.
    Any guidance is appreciated.
    Thanks.

    Thanks for the reply, I will read the document, however,
    If I try to compare ADF to other frameworks, creating BCms as POJOs would take advantage of the Apache clustering(web tier, same as Tomcat clustering in Jboss), there is no need for OC4J services of the 10gAS, on the other hand, if I go with EJB3 stateless session beans BCms then i would need 10g OC4J container and its clustering capability(AS clustering).
    Your time is appreciated and please respond only if you time, i will go through the doc.

  • Refresh ADF Business Components

    I create view(ADF business components) with my sql statiment
    select e.*,d.* from scott.emp e, scott.dept d where e.deptno=d.deptno
    on my first page JSP I drop ReadOnly table
    on my second page JSP i drop InputForm for edit.
    and so
    I run my project, on first page have the button "Edit" which is bound my JSF Navigation Case with second page.
    I try edit emp.DeptNo and commit change. When I back on first page i see that emp.DEPTNO changed but dept.DNAME not changed.
    How I can refresh my first page that see all changed?

    Hi Frank!
    I use JDeveloper 10.1.3 EA1.
    I Create Application through Application Template (Web application [Default] -
    This application template is configured for building a data-bound web application. It consists of one project for the view components (JSF, JSP) and controller (JSF), and another project for the data model (ADF Business Components))
    I create page through faces-config.xml.
    I create JSPX page. Then I Drag and Drop my VO from Data control palette.
    My CommandButton from ADF Faces core from Component palette.

  • Expose C based system as Web Service

    hi,
    I have a C based MES which is storing data in non-relational file based DB from Stratus.
    I need to integrate this system with SOA.
    Not sure how do I expose this system as a web service.
    Any thoughts, any links are most welcomed.
    Thanks in advance.
    Regards,

    No, it is not yet possible.
    You can only create a web service for an RFC Function Module, Function Group or Business Object.
    You may create a RFC FM as a wrapper to your Class methods and create a web service on the RFC FM.
    Regards,
    Naimesh Patel

  • Expose a class method as web service

    hi ABAPers,
    is it possibile to expose a class method as web service? I would like to write a base class with common code, while derived classes implement specific application logic.
    I have both R/3 6.40 and Netweaver 7.0 kernels, so I'm interested in both.
    thank you.

    No, it is not yet possible.
    You can only create a web service for an RFC Function Module, Function Group or Business Object.
    You may create a RFC FM as a wrapper to your Class methods and create a web service on the RFC FM.
    Regards,
    Naimesh Patel

  • ADF Business Components - Cascading Tables

    I am using Oracle Jdeveloper 11.1.1.4.0
    I have tried an approach to cascade two tables using ADF Business Components.
    A single column is declared as Foreign key.
    I have used 2 drop downs. During the value change of the first drop down, the values of second sholud be populated from data base.
    How to achieve this using cascading tables.
    Kindly help.

    Hi,
    For creating cascading(dependent) LOV in adf,list of values in ADF Application using BC4J as model.please follow below links,
    https://blogs.oracle.com/aramamoo/entry/how_to_create_multi_level
    http://mjabr.wordpress.com/2011/04/01/cascade-list-of-values/
    Best Regards
    Siva Sankar

  • Adf business components n Ejb Concepts

    peoples. sorry for asking this silly doubts.
    reason behind this question.
    most often use the adf business components i doesnt know it. but now i am learning with help experts blogs. In some blogs, peoples using Ejb concepts.
    but ,some what i know ejb.
    My doubt:
    for desiging an transaction oriented projects. and multiple peoples work on my form.
    what should i use.
    ejb or adf business componets. which is suitable for the transaction orientation.
    please guide me.....

    Either is suitable for transaction semantics.
    Which one you choose would likely depend upon your background. If you are already well versed in EJB/JPA, then you would follow that approach. If you are already versed in ADF BC or Oracle Forms, then ADF BC would be a logical choice. I will also say that Oracle seems to have invested more effort in the ADF BC side of things, so if you are still undecided, then maybe that observation can sway you to the ADF BC side.
    john

  • ADF Business Components from Tables - adding more tables

    Hi.
    I have already created a ADF Business Components from Tables and added tables from the Oracle database.
    My question is:
    Is it possible to add more tables to the same Business Components model?
    Not as a new Component Table, but with the same tables so i can use the same relations and mappings?

    Hi and thanks! Yes, I am talking about recreating a the same View Object that i already has created. In my first model i had the tables Name and Address. I want to add a new table called zipcode to the same View som i can choose colums from the zipcode-table in the same View as Name and Address.
    I'm not shure what you mean by Data Model tab? Can you spesify?
    Thanks!

  • Where to learn ADF business components??

    hi,
    can you please share a link regarding about using adf business components references. any ebook or book titles would also be appreciated. :D
    regards,
    simon
    Edited by: 848858 on Apr 24, 2011 3:27 AM

    Also this book:
    http://blogs.oracle.com/grantronald/2011/01/learning_adf_and_jdeveloper_is_a_top_seller.html
    Regards
    Grant

  • Modifying SQL used by ADF Business components

    How can we modify the query used by ADF Business components that are generated from database tables by dnd in JDeveloper?

    I would like to change the where clause at runtime based on some configuration that can be changed while application is up and running. Can I just over ride the getWhereClause of the ViewObjetcImpl for that?

  • Best Practices ADF Business Components

    Hi all,
    I'm reading the Dev Guide of ADF Business Components, and I've some questions:
    a) In the business tier, Which is the best way to create new rows in the db? I've found two ways: Using a ViewObject and then call create and insert or using the EntityDefinitionImpl object and call the createInstance2 function.
    b) In the business tier, which is the best way to search for a row in the db? I've found two ways: Using findByKey on the ViewObject or using the findByPrimaryKey on the EntityDefinitionImpl object.
    Thanks!

    Hi,
    a) use a ViewObject
    b) also I would think its the ViewObject
    Frank

  • Why ADF Business Components and TopLink

    Hi All,
    Why are there two types of components in Businses Tier? (ADF Business Components and TopLink). Even through there are other types, I can visualize the use of other components but ADF Business Components & TopLink seems to serve the same requirement.
    Can some one provide me information on what is the difference between these two and when to use which one?

    ADF Business Components (aka BC4J) are different from Toplink from approach point of view. Basically if you are more comfortable with SQL and want fine grain control over what and how SQL are run against the database, BC4J is the way to go, because, it's you who write the queries(in ViewObjects)
    If you are from more of java backgroup and can visualize things in term of Object and relationships among objects, so on and so forth then Toplink would be the right choice.
    Pls see the post by Shay in his blog:
    http://blogs.oracle.com/shay/2006/03/10
    regards - rutwik

Maybe you are looking for