Calling operation of the exposed BO Service in another Application Service

Hi,
I am working on Composite Application development in CE7.1.
I have the following scenario:
A business object is exposed as a web service.
The web service of the business object is imported as an external service in another CA Application.
On the composite application explorer,
under the "composite application --> external --> External Services" node I can see both the operations provided from the exposed business object.
My Question: If I define an operation on the application service as implemented, how can I call the operations of the exposed business objects?
Thanks,
Yasar

Hi Yasar,
Fallow the fallowing steps.
1)  First expose your BO(Exp_BO) as a web service.
2) Import that web service( (Exp_BO) as an external service in what ever project you want.
3) create an application service(eg AppService)
4) right click the imported external service and choose default mapping. select "create methodes in existing application service" and choose AppServioce.It will create the methodes with same name and map them to the Exposed BO methodes.
5)Next in the implemted method call the web service(ExpBO) methodes.
I am giving an example:
LocalInventorBO is the local BO.
Inventor is the Exposed BO.It is having a method create(inventorId).This create method dosn't return actual Inventor.But it will create InventorType.We have to use that type.
public com.hcl.ramp.types.LocalInventorBO CustomImplementedOperation(java.lang.String inventorId) throws com.sap.caf.rt.exception.CAFServiceException {
          com.sap.caf.demo_sap_com.xipvault_practice1.modeled.InventorType inventorType=this.create(inventorId);
          com.hcl.ramp.types.LocalInventorBO localInventorBO=     this.getLocalInventorBOService().create();
          localInventorBO.setInventorId(inventorType.getInventorId());
          return localInventorBO;

Similar Messages

  • Call external service in a Application service created from ES

    Hi Experts
    I have the follow situation:
    I've modeled a new service in Enterprise Service Builder. This service i'll implement in caf application. In the method create by application i'll call one method of external service.
    I imported this modeled service in Create Web Service Provider option in external package, select the Enterprise Service Repository source option and choice the respective Service Interface.
    In this moment the caf created a new application service, with methods of modeled service. That's all right.
    Now i import a external service of esworkplace. All the step are ok. But the problem is going to next step.
    I need to call this imported service in the method of application service. I know 3 way to do this:
    1. Mapping the external service with this application service. In this case i have a problem - the method of external service is expose as web service, and i don't want this. Just the method of modeled service must be expose.
    2. Create another application service, map the external service with this application service, and create a depency between this application service and the application service created by modeled service. I think this work fine and resolve the problem of expose the method of external service. However i think this isn't a good way to do.
    3. Instantiate the service class of exernal service. From this class i can call the method of external service in application service. But now i have another problem. If i see the implementation of this class, it have a static block which call a URL class, and pass as parameter a wsdl file located in one directory of my computer like
    url = new java.net.URL("file:/D:/SAP7110Workspace.jdi/LocalDevelopment/CRVP/demo.sap.com//ejbmodule/
    _comp/tmp/0/EJB/src/META-INF/xml/ext/rootwsdl_WorkCentreSimpleByPlantQueryResponse_InService.wsdl");
    when execute the application in the server it don't find this file and i give one error.
    I think the best way to do is the 3° way. But why did the caf generate the URL with My computer directory instead of in directory of application? There are some solution to this problem?
    I've change this line manualy, but all the time when i generate the project, i need change this code again.
    Regards
    Marcos

    Hi,
    You may consume external service via JNDI
    Context context = new InitialContext();
    <JNDI OBJECT> local = (<CAST JNDI OBJECT>)context.lookup("<JNDI OBJECT>");
    //Call the method
    If you are using CE 7.11, go to NWA -> Problem Management -> JNDI browser  > ..... -> ObjectName for <JNDI OBJECT>
    - julius

  • Calling a Web Service in another Web Service using JDev10.1.3 and AS 10g

    I am using JDeveloper 10.1.3.0.4.3673 and Oracle AS 10g 10.1.3 on Windows XP Professional Version 2002 service pack 2.
    Has anyone called a web service in another web service? I have not researched this yet. I assume it is possible. I need to get this figured out asap.
    My guess is that
    1. For the web service which is going to be called in the other web service, you need to create client-side proxy to call the web service - create a static method to instantiate and call the service.
    2. I would deploy this client-side proxy Stub which calls the web service along with the other web service which calls it to the Oracle AS 10g.
    Is this right? Is there any documentation on this specific thing?

    Hi,
    rhis kind of orchestration is what BPEL is made for.
    http://www.oracle.com/technology/products/ias/bpel/index.html
    Frank

  • Invoking one web service from another web service

    Hi there,
    I want to invoke a web service lets say X. But befor sending parameters to this web service, what i want to do is first pass the parameters to a web service called Y and Y will decide wether to call X or not. In other words i want to invoke a web service from another web service.
    Its kind of urget so do the needful asap.
    Thanks

    Calling another webservice from within a webservice does not require anything special. The service (say svc1) that calls another service (svc2) will be a web svc client. So you will have to do the same steps for svc1 as you would do for any other web service client

  • Web service as another web service client - problem in JavaEE SE?

    Hello,
    I observed strange behaviour with OpenESB, Glassfish (build 33) and following scenario:
    I need to call web service from another web service. When I use simple schema:
    web service client -> web service (as EJB) -> another Web service
    everything works. But I would like to use JBI/ESB, so:
    web service client -> HTTP SOAP BC -> JAVAEE SE -> web service (as EJB) -> another Web service
    the following exception prevents success:
    com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class cz.muni.fi.yucca.client.jbiws.gamanager.Calculate is not fou
    nd. Have you run APT to generate them?
    at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:254)
    at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:550)
    at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:497)
    at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:339)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:225)
    at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:584)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:287)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:270)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:263)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at cz.muni.fi.yucca.client.jbiws.gamanager.GAManagerService.getGAManagerPort(GAManagerService.java:51)
    When I call both services separately they work correctly, when I don't use JBI it works correctly too.
    Should anybody help me solving this problem?
    Thanks in advice, Vlado

    Fine,
    I've found out that this problem is caused by different classloaders assigned to directly (EJBClassloader) and through-JBI (improperly configured URLClassloader) called web services.
    I've moved my question to GlassFish forum (http://forums.java.net/jive/thread.jspa?threadID=24901&tstart=0) beacause of it's "technical" nature.
    Despite this, any help is welcome:-)

  • Application Services uses other application Services like business Object

    Hallo
    I use the SAP NetWeaver 7.1 SP3.
    One question can i use in the Applcation Service another Application Service (not Business Object)?
    The reasons I want to have this possibility:
    If I use the external service and I will be exposed as a new Applicaiton Service, thus it can be used by several application Services.
    I have put one Application Service A into the dependency of Application Service B... but in code i can not find out the API to lauch to the Application B.
    Thanks and Kind Regards
    Ping

    Thanks
    But I can not find  the Object ApplicationServiceALocal
    and the code
    ApplicationServiceALocal appServiceA = this.getApplicationServiceA();
    I can not get it.
    Maybe I should after the add dependency Generate Application, buîld Application?
    Kind Regards
    Ping

  • Does business service have an application service for secure access?

    Hi
    Recently we had faced a strange situation when we are attempting to execute a script
    these are the steps i followed
    *1.Created a business service*
    This is my business service with service name CILCSVAP
    <schema pageAction="read">
    <said mapField="SA_ID"/>
    <indt mapField="START_DT"/>
    </schema>
    *2.Added the above business service in service script and used the edit data step to invoke the bs*
    No application service given for the script.
    invokeBS 'Cm_serviceagreement' using "cm_serviceagreement"
    Now when i execute the above script
    i am getting the following error
    You are not allowed access (directly/indirectly) to this account.
    *     Description: Please contact your security administrator to check your security for this account.*
    I know that this error occurs if a user doesnt has accesss to a account but i had checked that too by verifying account's accessgroup which i am using,then its access roles then i had checked that user with which i had logged in is present or not.yes it is present
    Now i am wondering whether business service has an application service
    I cant find any field for entering application service on business service page.
    Although i have access to execute the script and the business service why i am getting this error,plz help.

    Hi shanker,
    I'm working with MDM 2.0 and I've a field to enter an application service.
    During my customizations I've used the 'default execution application service'.
    I've tried to attach an image to this post, but it seems to be not possible.
    When I add a new business service, I got these settings:
    * Business Service (in your case CILCSVAP)
    * Description
    * Detailed Description
    * Service Name (Name of the System Service)
    * Application Service (I've used F1-DFLTAPS)
    and on an additional tab the Schema of the BS.
    Please check if the application service is assigned to your User Group and if the execution right is set.
    /Markus

  • I have set up iPhoto 11 so that pictures will be edited in Photoshop elements 11.  I selected the option to edit in another application.  But when I select edit in iPhoto, elements opens but the photo does not open in elements.    What is the problem?

    I have set up iPhoto 11 so that pictures will be edited in Photoshop elements 11.  I selected the option to edit in another application.  But when I select edit in iPhoto, elements opens but the photo does not open in elements.  I'm using a Macbook pro 15 inch with retina display with OS 10.8.4  What is the problem?

    http://barbarabrundage.com/2011/10/05/adobe-hide-and-seek-setting-pse-10-as-exte rnal-editor/
    It relates to Elements 10, but it's the same for 11.

  • How can I call the create method in BO from Application Service

    Hello!
    When I create a Business Object, CAF generates some methods automatically.
    How can I call the create method in the BO from Application Service logic?
    When i call the method then the entityManager and the sessionContext is NULL.
    How can I initialize this?
    Can anybody help me?
    Thanks, Thomas

    If you are using CE 7.11...
    1) In the Application Services, add the BO as dependant object in dependencies tab.
    2) In the implemention, add the following codes to call create method of the BO:
    this.get<BO>.createMethod();
    julius

  • Working with the line item table in CAF application service

    Hello SDNs,
    I am trying to retrive a value from the Nested list of one of my application service.
    for example,  suppose i have 2 operations in a application service, 1, calls the BAPI_PO_GETDETAIL1 based on the PO number given it returns the POItem, POServices tables.
    2, operation accepts itemno and PO number as a input, and inside calls the 1st operation and wants deal with the POItem and POServices tables which of type standard BAPI classes nested under the main structure created in application service.
    For example, i want to compare the item number given as input with the item numbers in the Item table, which is a output of 1st operation .
    How to get the itemnumber from the POItem table, as this is a nested structure under POOut(defined in AS level) and how to compare this.
    i have written the code as follows but it is returning the error. Can any look into this and suggest me.
    public com.xxx.demo.goodsnserviceack.types.POProcessOut getPOServices(@javax.jws.WebParam(name="PONumber")
    *     java.lang.String PONumber, @javax.jws.WebParam(name="POItem")*
    *     java.lang.String POItem) {*
    // POProcessOut is a output node of current operation
    *          POProcessOut PPO= new POProcessOut();*
    //POHeader details is the nested structure under POProcessOut
    *          POHeaderdetails header=new POHeaderdetails();*     
    //POOutDetails is the output structure of 1st operation     
    *          POOutDetails pt=new POOutDetails();*
    *          try{
    //calling the first operation          *
    *          pt= executeBAPIPOGetDetail(PONumber,"X","X");*
    *          //setting header details*
    *          header.setPO_NUMBER(pt.getPOHeader().getPO_NUMBER());*
    *          header.setVendor(pt.getPOHeader().getVENDOR());*
    *          header.setCOMP_CODE(pt.getPOHeader().getCOMP_CODE());*
    *          header.setSTATUS(pt.getPOHeader().getSTATUS());*
    *          PPO.setPOHeaderdetails(header);*
    *     //comparing the POItem number from POItem table and input of current operation
                       List<BAPIMEPOITEM> itemlist= pt.getPOItem();*
    *          while(itemlist.isEmpty()==false){*
    *          String itemnum= itemlist.get(0).getPO_ITEM();*
    *          if(itemnum.equals(POItem))*
    *               PPO.setItemno(itemnum);*
    *          catch(CAFServiceException e){*
    *               e.printStackTrace();*
    *          return PPO;*
    Your inputs will be appreciated.
    Thanks,
    Sireesha.

    Have you accessed the external webservice in this way:
    EJBLocalHome localHome = HomeFactory.getInstance().getLocalHome("localejbs/sap.com/comptest/ACCRJAVAWSVI__DOCUMENT");
    Method m = localHome.getClass().getMethod("create", new Class[]{});
    ACCRJAVAWSVI__DOCUMENTLocal srv = (ACCRJAVAWSVI__DOCUMENTLocal)m.invoke(localHome, new Object[] {});
    srv.validateLogin(input) ;
    Aliaksei

  • Calling one WTC service from another WTC service

    Hi,
    We have a service called COLLECT defined in our WTC server.
    Recently we've added a second service called SUM in the same WTC server.
    We were wondering if it's possible to call SUM from COLLECT, and if it is, what configuration changes should be made in order to do it?
    Currently both services are exported by the WTC server (and imported by our Tuxedo).
    Thanks,
    Shy

    Hi Shy,
    Although I haven't tried it, I'm fairly certain you cannot call a Tuxedo EJB using tpcall() within a WTC based application. What I normally advise customers to do when writing a Tuxedo EJB is to implement two separate interfaces. One is obviously the TuxedoService interface that all Tuxedo EJBs must implement. In particular you must implement the service() method that accepts a TPServiceInformation instance that provides access to the typed buffer passed to the EJB. Normally one then extracts the necessary fields or information from the typed buffer, performs whatever necessary business logic needs to be performed, and then constructs a reply typed buffer.
    What I recommend is that you separate out the business logic into a separate interface and have your class implement both interfaces. The service() method would only deal with the marshalling/unmarshalling of the information contained in the typed buffers, and leave all business processing to methods on the second interface. Then if you need to access another "service", you would use the second interface, thus saving you from all the typed buffer manipulation.
    So in your case, the business logic in the second interface of the COLLECT implementation would simply call the SUM implementations second interface (the EJB's business logic) instead of trying to call a Tuxedo service. While this helps in reuse of the business logic, it doesn't address the issue of trying to transparently move a service implementation from say Tuxedo to WLS. If that's what you are trying to do, you might try exporting the SUM service from WTC to the Tuxedo domain gateway, and then importing the SUM service from that gateway. This would likely cause a network round trip if it works, but it's something to consider.
    Another alternative is to use something like the Apache Tuscany/Java project and build your Java applications using SCA. Tuxedo SALT includes a Tuscany/Java binding extension that allows Tuscany/Java applications to transparently call Tuxedo services. The choice of whether to actually call a Tuxedo service or call a Tuscany/Java based SCA service is determine by the binding selection and not changes in your code. Just a thought...
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • How to use bapi /external service directly in application service

    Hi
    I have to use BAPI_ALM--RDER_MAINTAIN in my caf application
    i have imported it as external service.As there are problems mapping its input fields to entity service , it has to be consumed directly vai application service.
    But i ahve never done so before.Can someone give me an example as to how t do it.
    If someone can give example of how to code in the application service to call  the bapi , it would be great . as i have some time constraint.
    Thanks ,
    Points assured for help.

    Hi Vivek,
    As you asked for an example to call a bapi directly from Application Service you can follow this link.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/44/57fff3b10b3672e10000000a114a6b/frameset.htm">Using Generated External Proxy in Application Service</a>
    Thanks and Regards
    Avijit

  • Web Service and CAF Application Services - How to return a table

    Hello,
    I'd like to build a CAF Application Service and expose it as a Web Service. This service should return an array or table which I'd like to display in a Visual Composer model.
    I understand that there're limitations at CAF regarding supported data types.
    Does anyone know how to get a workaround?
    Any information is very appreciated.
    Kind regards
    Stefan

    Hi,
    You can return a list.
    The standard way to do this is you have to create a complex data type for response.
    Configure the cardinality of this data type to 1..n so as to accomodate a list.
    In your implementation add your list to this response message and return the list.
    This waly you can return collections.
    Hope it helps.
    Regards,
    Srinivasan Subbiah

  • Properties of Web Services generated from Application services in CAF

    Hi to all,
    first sorry for posting one question twice (in CAF and CE forums) but I am not sure where exactly it belongs.
    I experience problems with exposing web services from application service in CE 7.1 (trial version).
    I want to add fault elements or use document literal instead of RPC binding. I do it from the design page for web services. The problem is that after saving and regenerating the application, the changed information gets lost.
    Is it possible to expose these services while changing some information?
    And another question that would arise if this is possible. How can I catch the faults in VC? Is there e possibility to show different panels according to the value returned (from the data service, which is a web service with fault element).
    Thank You in advance!
    V S

    Hi,
    Please check note 1004108.
    Methods of Application and/or Entity Services (Business Objects) of CAF of SAP NetWeaver CE 7.1 cannot be exposed in document style, only RPC/literal is possible. Sorry.
    It's a restriction that is planned to be solved in one of the next releases.
    Regards,
       Jan

  • Method as a WEB Service in an Application Service

    Dear Colleaguaes,
    When importing a web service method into a caf project, and exposing it as method into an application service, is it necessary to create an Entity Service as Web Service wrapper still?
    I can check that a web service method works, it returns the data, but it returns nothing when I try to test the corresponding method in the application service.
    I've also created a destination in Destination Template Management and done the external service to the destination configured mapping. But still without success....
    Thank you in advance,

    Hi,
    Thanks a lot for your help.
    Sorry i didn't specify before but I also have created Web Service Proxy from the URL of my Web Service into my web app. But now I don't now how to use the method that i created on my web service on to my web application.
    To be more specific I don't know how to wire the two af:InputText with my web service method in the way when I click the submit button it past the info to web service and which has to return the Student ID :
    Ex:
    Name: af:InputText
    LastName: af:InputText

Maybe you are looking for

  • Bluetooth icon GONE

    My wireless Mouse stopped working - figured it was the mouse so grabbed another wireless and it would not find it either.  Restarted the computer and then went to 'Mouse' and it says to connect USB mouse.  Finally (after looking at my iMac preference

  • JPA: IN parameter to take in a Collection

    Hi, I am wondering whether in latest Toplink Essentials this issue (reproduced below for convenience) https://glassfish.dev.java.net/issues/show_bug.cgi?id=2484 has been fixed: "For instance, the query "SELECT i FROM Person i WHERE i.address IN (:col

  • Presenter add-in error - stumped...

    Hi, has anyone ever come across an error with the cisco presenter add-in when trying to share a screen in meeting place? One user is getting this error and we are not able to find a solution anywhere.  His is running XP SP2. The add-in installs fine,

  • How to supply wallet location to OCI client for SSL connection other than sqlnet.ora

    I have a oracle 11g database server and I am connecting to it through OCI client in OBIEE Admin tool. This is working fine, but now the requirement is we need to connect to an SSL enabled database. For this I had to update the sqlnet.ora under $ORACL

  • ABAP QUERY HEADER from "selection criteria"

    Dear Expert,            I would like to add coding for showing "billing date from - to" (selection criteria) to my ABAP QUERY Header. I used "SAP List Viewer" as my reports. Can anyone sharing idea and how to code it? Greate Thank, Prach