How to expose a bapi as Rest webservice to consume in web applications

Hello experts , i now seriously need your suggestion here. Is there a way to expose a BAPI as a rest webservice which can be consumed by a web application in the end.
What is ICF ( Internet Communication Framework) ? Does this help in generating web service from BAPI ?
Netweaver Gateway might help to generate services but may not be recommended here in our scenario.

Please refer Real Web Services with REST and ICF for creation of rest services in sap. The BAPI will have to be called in your handler class.
I think your best bet would be to transfer the data in the body of the http request and use simple transformation(with multiple roots) to convert the xml data to sap formats. GZIP can also be used to compress the data that is being sent. We have done this successfully in one of our projects.
However this approach(RESTful Service) would involve more work when compared to the approach suggested by Vikram. If SOAP based services are ok, then you should go ahead with Vikram's approach.

Similar Messages

  • How to Expose SOA component as Rest Service

    Hi,
    Is there a example to show how to expose SOA component as Rest Service using Http Binding adapter ?
    or
    How to call Rest Service from BPEL/Composite application ?
    Thanks,
    Naveen
    Edited by: 975104 on Dec 21, 2012 1:57 AM

    Please refer Real Web Services with REST and ICF for creation of rest services in sap. The BAPI will have to be called in your handler class.
    I think your best bet would be to transfer the data in the body of the http request and use simple transformation(with multiple roots) to convert the xml data to sap formats. GZIP can also be used to compress the data that is being sent. We have done this successfully in one of our projects.
    However this approach(RESTful Service) would involve more work when compared to the approach suggested by Vikram. If SOAP based services are ok, then you should go ahead with Vikram's approach.

  • How to include html page or html code in adobeflex 4 web application please give me a solution.

                     How to include html page or html code in adobeflex 4 web application please give me a solution.
                       Thank you
                       Chandra Sekhar

    hi,
    go thru this link, may be of some help for you
    About IFrames
    http://www.deitte.com/archives/2006/08/finally_updated.htm
    IFrame Src
    http://code.google.com/p/flex-iframe/
    About the IFrame Approach
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm

  • How to Call an ADF Bounded Task Flow Located in Another Web Application

    Hi.
    I'm working in JDev 11G TP3.
    I've read the section from the 11G documentation on Working with Task Flow Activities,
    specifically the section 15.5.3 on How to Call an ADF Bounded Task Flow Located in Another Web Application.
    I've followed the instructions but still can not seem to call another task flow in another application correctly.
    Can someone send a small example specifying how the (TaskFlow Reference) section
    should be filled in, and just a general simple outline of process to set the whole process up.
    Thanks

    Your EL for the remote-app-url needs to return something like this
    "http://www.acme.com:80/myapp/faces/adf.task-flow"
    where "http://www.acme.com:80/myapp/faces" is the root of the url you'd normally use to access the remote application.
    I filed two bugs:
    bug 6944247 to improve the documentation
    bug 6944246 to fix the fact that you currently have to specify the 'adf.task-flow' part. You shouldn't need to do that. But doing so for now will get it to work.

  • How to Deploy the third party EJB 3.0 jar in web application

    I have a web application which calls services provided by EJB 3.0 beans packaged in third party jar. How do a configure the ViewController project to deploy the beans to the weblogic server when I run the application rather than deploy the EJB ear as a stand application to the server?
    The jar file has already referenced by the project. In the "EJB Module" of project properties I've set the EJB Version property to 3.0, but the Annotated EJB 3.0 Bean Classes list remains empty, presumably because I have no beans defined in the sources of the application. When running the project the EJB jar did not deploy automatically. Is there something wrong? How can I achive this goal?
    Best Wishes~
    ELeven.Xu
    IDE: JDeveloper 11g (11.1.1.2.0)
    OS: Linux

    I don't think this technique will work. I added a META-INF/ejb-jar.xml file to the application, and added a <session> section for one of the EJB 3.0 beans from my third party jar. I specified values for <ejb-name>, <ejb-class>, and <session-type> hoping the rest of the configuration would be determined from the annotations in the class. When the server starts, this warning message is displayed:
    Oct 30, 2009 12:06:41 PM com.evermind.server.ejb.logging.EJBDeploymentMessages warningSessionBizInterfaceNotDefined
    WARNING: \[current-workspace-app: ... \] - The session bean does not has at least one business interface defined for client access. The bean is not accessiable and usable at runtime.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 11042 ms.
    \[sic\]
    EJB 3.0 beans are not required to define business interfaces, as they are supposed to be generated by the container.
    Good idea, but still cannot deploy beans from the third party EJB 3.0 jar referenced by my project to the embedded OC4J container. Still investigating.
    Thanks,
    Steve
    By the way, I have been able to use your technique to deploy EJB 2.1 beans from third party jars in other projects, just not EJB 3.0 beans that do not provide ejb-jar.xml deployment descriptors, nor business interfaces.
    Edited by: user10375549 on Oct 30, 2009 9:51 AM - Added relevant comment regarding technique described for solving problem. It works for EJB 2.1 beans but not EJB 3.0 beans.

  • Calling a webservice from within Bex Web Application Designer

    Hi
    I have a web-template built with BEx web application designer which also contains textboxes. This text should be stored by calling a webservice (standard BI-documents are not an option).
    Can anyone tell me how I could call a webservice from within the BEx web template to store the text contained in the textbox? The webservice-call should include some of the filter-varialbes of the web application.
    Is this only possible by the use of a JavaScript WebItem? If so - does anyone have an example of such a JavaScript.
    Thanks a lot in advance.
    Kind regards.
    Christoph

    Thanks for your response. The BSP page would work out fine if I only needed to save the data.
    But the next time I call the webtemplate, the textarea should be filled by another webservice call with the stored text (so the text can be modified und saved again). This will not be possible by calling a BSP page.
    Do yoiu have any suggestions how to integrate the text (return value from the webservice call) into the textbox in the webtemplate?
    Kind regards.
    Christoph

  • How to configure request manager service for multiple website in one web application

    I have set up sp 2013 as below:
     web application : wa1
    site collection : sc1
    sp site: site1, site2
    I used 2 WFE, 1 APP, how can I use request manager service to control  site1 to wfe1, site2 to wfe2?
    Awen

    That's not what i'd describe as load balancing.
    A better description would be load-isolation. In your description then if the load on site1 was large (and growing) but site2 was quiet then site1 would struggle and eventually become unable to handle the number of users but site2 would still be ok. That's
    fine from a QOS point of view but it's not the norm for load balancing. It would work in simple scenarios but the out of the box load balancing tools are much better suited than that sort of approach.
    This article shows how to configure the RMS and may help show how your request is difficult to configure:
    http://www.harbar.net/articles/sp2013rm2.aspx

  • Adding a WebService Client to a Web Application

    Hi, Everybody,
    I built a Bepl Module in which I had a ECHO WebService and the response parameter is a complex type.
    Then I built a Web application, and used the WSDL file to add a WebService Client to a this Web Application,
    but I found that the WebService Referrence dose not contain any method, so I could not add it in my jsp page.
    But when I changed the Response Message Part Type into a simple one, everything worked fine.
    *All the progress is the same as " [Using a Manually Created WSDL as a Web Service Client|https://open-esb.dev.java.net/kb/v2/javaeesetut.html] ", but change the simple type into complex type.*
    I want to know if the WebService Client Referrence dose not support generating java code which contains complex type or I had a wrong operation?
    thanks

    There are current limitations with the wsimport functionality and an issue has been logged.
    If you have a look at the blog entry from Andrew Hopkinson.....
    [http://blogs.sun.com/toxophily/entry/javacaps_tip_migrating_a_simple]
    ...you'll see part way down what the WSDL must look like to work with wsimport, i.e.....
    Message parts must be created using an Element rather than a specific type and the element must be defined in a local in-line schema.
    This in-line element can only contain a sequence with a single sub-element of a specific Complex Type.
    The name of the input element must be the same as the operation it will be used in.
    nillable element option should not be used because this will cause your strings to be returned as JAXBElements and not Strings.
    ...etc....
    Bit painful I know, but this is the only workaround until the bug is fixed.

  • How to resolve the "Builld error mxmlc task failed" in flex4 web application

    hi all,
    I am using flex 4 mxml web application wiht as3. when i deploying this project i am facing the folling error.
    Environment:
    Flex 3.5 SDK
    Flash builder 4 .                 APPLICATION NAME: BillProcess
    Ant compile tasks
    ============
        <property name="FLEX_HOME" value="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.5.0/>
        <property name="JAVA_HOME" value="C:\Program Files\Java\jdk1.6.0_06"/>
        <property name="JRE_HOME" value="C:\Program Files\Java\jre1.6.0_06"/>
    ERROR:
    init:
    [ippprojectproperties] qbServer = workplace.intuit.com
       [delete] Deleting directory C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\Dev
        [mkdir] Created dir: C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\Dev
    checkForCustomBuild:
    custombuild:
    dependentProjects:
    compile:
    [ippflexbuild] Parsing: C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess/.actionScriptProperties
    BUILD FAILED
    C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\ippbuild.xml:101: mxmlc task failed
    Total time: 16 seconds.
    HOW TO RESOLVE THIS.
    please share your useful suggession,
    cheers,
    B.venkatesan.

    hello,
    Check out this link http://www.kirupa.com/forum/showthread.php?309387-ant-mxmlc-task-don-t-compile-with-FlexSD K-4 this may solve your problem.
                         Gajanan Hiroji | [email protected] | www.isacglobal.com

  • How can make java servlet sent soap message to other java web application

    hello,
    i want to make simple servlet send soap message to other java web application containing web service????
    for example
    web application " A " contain web service add two number
    java servlet " B " send soap message contain num1 and num2 to A to add them.
    how can do this????

    I tried that but my problem is that the code is so old. At least what I saw. I don't know how old is too old and I'm trying to do things "right." I saw code from 1998, but I don't know if that's still what you do. It might still work, but that doesn't mean it's correct. There's so much out there on Java that so old that half the time I'm not sure what to do because some other technology in J2EE or the latest Java SDK might have come up with a new way to do things. Thanks.

  • How to call a BAPIs that requires a commit as a Web Service

    We have a Web Dynpro Java application which has some business objects that generate notifications in a backend R/3 system.  Using JCo we simply call BAPI_ALM_NOTIF_CREATE, followed by BAPI_ALM_NOTIF_SAVE, and finally BAPI_TRANSACTION_COMMIT all using the same connection (e.g. these are stateful calls.) 
    Now we need to change from using JCo to calling these BAPIs as Web Services.  We have generated the deployable proxy for these but can't find a way to call them in the same "ABAP session."  The ports generated in the deployable proxy are set to use HTTP Cookie based sessions but the BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT return empty results as if they are not being executed in the same ABAP session as the call to BAPI_ALM_NOTIF_CREATE. 
    We're running WAS Java 6.40 SP15.  Any help would be very much appreciated.

    Hi Jason,
    try to do this using JRA.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cb/072642c9dedd2ce10000000a1550b0/frameset.htm
    Vito
    Best regards,
    Please mark helpful answers

  • How to print formatted data / report on user's printer in Web Application

    Hi All
    I want to print some formatted data/report ( it might be 1000 pages) on user's printer.
    application is web based and tech. used are Java - jsp - servlets
    now prob. is ...
    how i will transfer all data to client (web browser) from the server and how i can print that data on user's printer ...??
    there is requirement that I can not use applet for this purpose.
    if any one done or have idea then let me know.
    thanks
    Shailesh Koradiya

    Hi
    Its simple, first of all break ur data in terms of pages. Write the logic in one JSP.
    suppose i have jsp PrintReport.jsp , for page 1 url will PrintReport.jsp?page=0 ... so on
    get the page parameter in JSP
    String page="";
    if(request.getParameter("page")!=null)
    page=request.getParameter("page");
    get the rowcount from the Result and assume records per page is 100
    if u have 1000 rows then 10 pages u have to serve
    StartRowNumber=page*recordsPerPage
    EndRowNumber=StartRowNumber+recordsPerPage
    Execute a SQL query , select * from table where rownum between
    StartRowNumber and EndRowNumber
    Provide google like pageNumbers in ur HTML page
    ie 1 2 3 4 5 6 ..10
    Regarding printing , Create HTML button called 'print' and add Javascript ' window.print()' on clicking it.
    Hope it would solve ur problem
    Cheers
    Rajendra Bandi

  • How to write perfect refresh function for each module in flex4 web application

    hi all,
      I am doing web application, i am using 5 modules in that,every module in a single page.
    In this application i am using datagrid in last 3 models. the operation is same for the models, select a record from grid then click post it should move to next page.
    In that i am writting init() function . this for showing the last module posted records here while i am entering this model.
    At the panel initializing time the records loading and showing in the gird,
    i written refresh function for this .
    But some times the function working properly and show the records in grid.
    some time it wont show the records.
    refresh function not working properly..
    looking for usful suggession,
    Thanks,
    B.venkatesan.

    hi all,
      I am doing web application, i am using 5 modules in that,every module in a single page.
    In this application i am using datagrid in last 3 models. the operation is same for the models, select a record from grid then click post it should move to next page.
    In that i am writting init() function . this for showing the last module posted records here while i am entering this model.
    At the panel initializing time the records loading and showing in the gird,
    i written refresh function for this .
    But some times the function working properly and show the records in grid.
    some time it wont show the records.
    refresh function not working properly..
    looking for usful suggession,
    Thanks,
    B.venkatesan.

  • How to Expose  a Function Module  as a WebService...

    Hi All,
           We are Currently using SAP Enterprise 4.7.Now I Want to Expose one of my Function Modules as a WebService.
    Does anyone has as any Clue on how to Expose a FM as a WebService and also the steps required say for exposing a Standard FM as a WebService...

    Hi,
    In fact an FM is standard a WS in WebAS 6.2 (what's under the hood of 4.7) and you can consult them via the webservicebrowser where you can find the WSDL and stuff.
    Check things like https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a4433436-0301-0010-f2a9-9281ad574054
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
    http://help.sap.com/saphelp_webas620/helpdata/en/bb/ddb33d2ae46b3be10000000a114084/frameset.htm
    and http://help.sap.com/saphelp_webas620/helpdata/en/94/f8c8c8e68811d6b2dc00508b5d5211/frameset.htm
    Eddy

  • Error while bringing up ATG REST Webservice

    Hi,
    I am trying to bring a REST Webservice using ATG 9.3 version.I am getting the below errors in the startup of the instance.I have added "REST" module in the Manifest file and am able to see the entry " C:\ATG\ATG9.3\REST\config\config.jar" in CONFIGPATH(Please let me know if there are other ways to find if the service has come up properly).I am trying to connect to the server using JAVA based REST Client as given below.Also,i have placed the jar files in the CLASSPATH of the module.I am hoping that the webservice have not come up properly because of these startup errors.Please help me out to resolve this issue.
    STARTUP EXCEPTION SEEN IN SERVER
    ========================
    2012-06-25 06:20:36,815 INFO [STDOUT] Unable to create class atg.rest.servlet.HeadRestServlet for configuration /atg/dynamo/servlet/dafpipeline/HeadRestServlet java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.servlet.HeadRestServlet
    2012-06-25 06:21:56,325 INFO [nucleusNamespace.atg.userprofiling.sso.PassportAuthorityService] Starting passport authority service
    2012-06-25 06:21:56,460 INFO [STDOUT] **** Error
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] Mon Jun 25 06:21:56 EDT 2012
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] 1340619716460
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] /
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] Unable to set configured property "/atg/dynamo/servlet/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/dynamo/servlet/dafpipeline/HeadRestServlet
    2012-06-25 06:22:06,528 INFO [STDOUT] Unable to create class atg.rest.RestConfiguration for configuration /atg/rest/Configuration java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.RestConfiguration
    2012-06-25 06:22:06,528 INFO [STDOUT] **** Error
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] Mon Jun 25 06:22:06 EDT 2012
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] 1340619726528
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] /
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] Unable to set configured property "/atg/rest/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/rest/Configuration
    CLASSPATH ENTRY
    ============
    <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/atg-rest-1.0.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-fileupload-1.2.1.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-io-1.4.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/dom4j-1.6.1.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/log4j-1.2.15.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/client-lib/java/atg-rest-client-1.0.jar"/>
    REST CLIENT:
    ========
    import java.util.HashMap;
    import java.util.Map;
    import atg.rest.client.RestClientException;
    import atg.rest.client.RestComponentHelper;
    import atg.rest.client.RestResult;
    import atg.rest.client.RestSession;
    public class RestClient {
    RestSession mSession;
    protected void execute() throws RestClientException {
         System.out.println("inside execute");
         mSession = RestSession.createSession("localhost", 8080, "<USERNAME>", "<PASSWORD>");
         mSession.setUseHttpsForLogin(false);
         try {
         mSession.login();
         System.out.println("Login Successful");
         catch (Throwable t) {
         System.out.println(t);
         finally {
         try {
         mSession.logout();
         System.out.println("Logout Successful");
         catch (RestClientException e) {
         System.out.println(e);
    * @param args
    public static void main(String[] args) {
         System.out.println("inside main");
         // TODO Auto-generated method stub
         RestClient testATGRest = new RestClient();
         try {
         testATGRest.execute();
         catch (Throwable t) {
         System.out.println(t);
    REST CLIENT ERROR SEEN:
    =================
    atg.rest.client.RestClientException: java.io.IOException: Not Found http://localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser
    atg.rest.client.RestClientException: This session is not logged in and cannot be logged out

    I am trying to expose a method using REST Webservice and access the method using the browser.I have followed the steps specified in the thread:
    http://ecomwriter.com/2012/03/19/building-restful-web-services-using-atg/ .Have added a component called ProfileRESTWebservice and have defined a method “getLoginInfo” in the class file. The following entry is placed in the restSecurityConfiguration.xml
    <resource component="/atg/userprofiling/ProfileRESTWebservice" secure="true">
    <method name="getLoginInfo" secure="false"></method>
    </resource>
    But, I am receiving the following exception when trying to access the method using http://localhost:8080/rest/bean/atg/userprofiling/ProfileRESTWebservice/getLoginInfo
    10:07:33,147 ERROR [BeanServlet] Error code: 400
    atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    atg.rest.RestException: atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    at atg.rest.output.RestOutputCustomizerImpl.outputBeanProperty(RestOutputCustomizerImpl.java:616)
    at atg.rest.processor.BeanProcessor.doRESTGet(BeanProcessor.java:157)
    at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:394)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:237)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:298)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:241)
    Can you pl help me out on this?

Maybe you are looking for