Java DC calling Operation on Entity Service

I have three entities (Entity Services) and one Application Service.
Application Service needs a operation to pull data from each entity based on the input parameter (name, type String).
The operation, builds an object with attributes from all three entities, and returns that newly created object.
I have a Java DC, that's going call this operation on the Application Service.
Question: How Java DC would know the object type of the object returned by the operatio on the custom operation on the Application Service?
Is it possible to do something like this or is there a better way to do this?
BTW, This Java DC is being used as Callable Object in GP.
Can I create a Service Endpoint for the Application Service and build the Callable Object directly against the Application Service. Then how to invoke method on the Application Service? How to handle the Object returned by the Application Service method?

At first, I'd say you shouldn't be needed a java dc with gp interface if you have a CAF application service.
GP has a CO for CAF application service you can use out of the box to reference a method of an application service you've deployed on your server. Pretty straight forward. No need of endpoint if service is deployed locally.
That is assuming you don't have any particular requirements I'm not aware of here.

Similar Messages

  • Entity Services: readByCustomKeys operation mapped to External Service

    Hello *,
    in my CAF application I'd like to read a product from SAP PLM. Within my Entity Service materialNumber is my custom key and therefore a corresponding operation exists: readByCustomKeys.
    I map this operation to my External Service (Web service provided by XI).
    As I can't test this operation directly with the Service Browser (deosn't appear there), I wrap  my Entity Service with an Application Service where I use the readByCustomKeys operation from Entity Service.
    Now when I test the Application Service operation I get the following error message in Service Browser:
    ERROR. Invalid type value :
    In XI I can see that there was no error and I got well defined XML data as response. So the problem must occur anywhere in the mapping back from External Service data to Entity Service attributes.
    Wrong data type mapping can be excluded as I already tested this possibility.
    Does anyone know what could be the reason?
    Thanks for your answers and best regards
    Joschi

    Hello Joachim,
    I dont have a lot of experience with readByCustomKeys (one experience which failed) but uou can also use read itself. If you have defined materialNumber as a key in your entity service, then this field can be used in read operations as well (I have a lot of positve experiences with this approach). You will find materialNumber while mapping read with your external service and you need not map the key field generated by Entity Service.
    For testing entity services, we have had several positive experiences with the config browser, specially for a findBy, read and even update operation. It was very easy to have a prototype UI to check the entity services.
    I know this isnt the answer to your question, but just sharing my experiences.
    All the best!!!
    Regards,
    Parag.

  • Find operation with range of dates in entity services

    Hello,
    I created an entity service called A with 3 attributes: description (string), startDate (date) and endDate (date). I need to have a find operation that retrieves all A instances where startDate and endDate are in specific ranges of date.
    For example, operation needs to return all instances where startDate is between 01/03/2007 and 05/03/2007 and/or my endDate is between 10/03/2007 and 15/03/2007.
    Is it possible to do using entity services operations ? If yes, how can I do that ?
    Thanks in advance,

    Hi Helder,
    Create a findBy method (findbyDateRange) for the entity service with the fromDate and toDate as input parameters. In the app service create a method with four input parameters of type caf.core.timestamp/date (fromdateStart, fromdateEnd and todateStart and todateEnd). In the method implementation write :
    //instantiate query filters
    QueryFilter qfInputfromDate = new QueryFilter(fromdateStart, fromdateEnd);
    QueryFilter qfInputtoDate = new QueryFilter(todateStart, todateEnd);
    //get entity service instance
    myEntityServiceLocal entityServiceInstance = this.getmyEntityService();
    //call entity service method
    List dataList = entityServiceInstance.findbyDateRange(qfInputfromDate, qfInputtoDate);
    for(int i=0; i<dataList.size();i++)
       myEntityService data = (myEntityService) dataList.get(i);
      //do your custom processing
    retValue = dataList;
    Hope this helps.
    Thanks,
    Dipankar

  • Java client for calling a XI web service

    Hello,
    does anyone have created a Java client
    with Apache Axis? I tried it and it works
    for web service which aren't provided by
    SAP XI, but if I use to call a XI web service
    something went wrong.
    The XI web service works. I tested it with
    XML Spy.
    I think there must be something special with
    XI web service.
    So anyone got a tutorial/guide for this???
    thanks
    chris

    Hola mi  nombre es Luis,
    Creyendo que eres español te escribo en tal idioma.
    He visto que a ti también te devolvía un error de autentificación 401, y que lo subsanaste, pero a mi con la solución que te dieron no me vale, ya que implemento el código que te ofrecieron para arreglarlo y ahora me da un fallo de "Server Error" poniendo en usuario y password, los correspondientes a XI.
    +Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay req=new Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay();
    wdContext.nodeRequest_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay().bind(req);
    req._setUser("username");
    req._setPassword("password");+
    No sé si es que ese usuario y contraseña son otros distintos.
    Si pudieras ayudarme, te lo agradecería.
    Un saludo, Luis

  • Java calling secured IIS web service

    I have a java servlet calling a IIS based .NET web service. The original code called the web service without authentication required, but recent changes mean that the WS has to be locked down with Integrated Windows authentication.
    Calling the WS returns the 401 error which is fine, but how do I authenticate the http connection?
    I've been told to use Kerberos, I don't know how to get started.
    I've also tried use the java.net.authenticator object, and get a 415 error upon trying to retrieve the getinputstream. The authenticator seems like the most straight forward, but I haven't be able to get un stuck.

    Hi Rika,
      have a look to the blog: https://weblogs.sdn.sap.com/pub/wlg/1645. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
      Screen shots are "old" but the concepts are already there. Serach the chapter "SAP Side - Setup".
      Basically: define your RFC destination via SM59 of type G. There you'll define the target host and the user/password.
      Then in LPCONFIG you can specify the defined RFC destination.
      Have a look also to http://help.sap.com/saphelp_nw2004s/helpdata/en/16/285d32996b25428dc2eedf2b0eadd8/content.htm
      and to
    http://help.sap.com/saphelp_nw04s/helpdata/en/da/11df3a9b10355ae10000000a11405a/content.htm
    Sergio
    PS
    Kindly close the thread and award appropriate a points to the answer given.
    Message was edited by:
            Sergio Ferrari

  • Calling a soap web service from a java desktop application

    Hi,
    Does anyone know how to call a soap web service from a java desktop application? I've seen examples using Apache Axis, but it sounds like Axis needs to run on a web server and we are trying to avoid that. My initial thought was that, "of course we need a web server", but I'm wondering if there is a way to do this without a web server.
    Any help is greatly appreciated.
    thank you,
    Julie

    If you are the consumer you don't need any web server. The web server is only needed in the provider end.
    In java 6 there is a built in framework to call web services without the need of third parties (such as apache axis)
    take a look at:
    https://jax-ws.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html
    http://java.sun.com/webservices/technologies/index.jsp
    For the provider end there is also a built in http server to expose web service via HTTP without the need to
    use any external web server.
    take a look at:
    http://java.sun.com/javase/6/docs/api/javax/xml/ws/Endpoint.html

  • Anybody has experience calling ID API web service in Java

    Hello,
    as you know we can programmatically update ID objects by call ID APIs (web service). To do that you need to import the wsdl into a java project, generate web service client and call the client to update ID objects.
    I've tried this in NWDS CE version. However I got error when generating web service client from the wsdl of the ID web service. Only the BusinessComponentService passed the ws client genertion, the rest web services do not work.
    The error I got:
    IWAB0399E Error in generating Java from WSDL:  java.lang.NullPointerException
        java.lang.NullPointerException
        at org.apache.axis.wsdl.toJava.JavaInterfaceWriter.writeOperation(JavaInterfaceWriter.java:126)
    Anybody has experience with ID API?
    Thanks
    Jayson

    HI Jayson,
    you can also request the web service directly.
    For example, you could create a local xml file with the values you want to pass to the web service and configure a file 2 soap scenario within XI itself.
    You can create interfaces for each available web service.
    You could call this scenario "ID objects generator" or something and save the .tpz for the repository objects of this scenario, since you could reuse it in other projects.
    Other than that, in Teched '08, Bill Li showed a lot of proxies developed over Java to consume the ID API web services, and they all seemed to work ok. However I do think he used NW Developers Studio 7.0 (2004s), not CE.
    I'd raise an OSS msg with SAP in order to check the problem you're getting.
    Regards,
    Henrique.

  • Problem defining a java client on tomcat to call the esb web service

    Dear Support,
    I have a java program that has been incorporated on the oracle SOA suite. We now have a problem defining a java client on tomcat to call the esb web service. The Oracle SOA part is running fine”.
    The software versions we are using :
    1 - Oracle SOA suite on 10.1.3.3 Oracle AS
    2 – Java 1.5
    3 – Tomcat 5.5
    4 – OS XP Professional

    If you have a main method in jour generated WSclient class (by the proxy) add the following code below the //add your own code:
    AddFileResponseType testResponse = myPort.addFile(testRequest);
    where AddFileResponseType is the responsetype of the WS and addFile is the method to call. this is just an example of my own webservice.
    Next stap is to put the cursor in the main method and choos debug or run.
    This should invoke the main method en call the webservice
    I hope this helps you
    Kim

  • How to call other Entity service

    Hi,
    How to call other Entity service to our entity service?
    Regards
    Ashif

    Hi,
    I mean,  need to call the other project entity service to my project application service, for example, am having the project with the name "aaa", and i wanna to get the entity services of the other project "xxx" to my project "aaa".
    Can you please, let me know how to call the same.
    provide me some links for the same.
    Thanks

  • Calling Operating System Commands from PL/SQL using java

    Calling Operating System Commands from PL/SQL - The Java Way
    wlth help of given thread link,
    Calling OS Commands from Plsql
    but i had user privilege problem
    Declare
    x Varchar2(2000);
    Begin
    x := OSCommand_Run('/tmp/sri/GROUP_ho.sh');
    DBMS_OUTPUT.Put_Line(x);
    End;
    o/p;
    can't exec: /tmp/sri/GROUP_ho.sh lacks user privilege
    i done the grant privillage also
    part
    dbms_java.grant_permission('abcd', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    dbms_java.grant_permission('abcd', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission('
    abcd', 'SYS:java.io.FilePermission','<<ALL FILES>>', 'execute');
    again
    get
    can't exec: /tmp/sri/GROUP_ho.sh lacks user privilege
    same error;

    Process management at the OS level should prevent execution continuing in the calling code until the command has completed (either successfully or with error).
    If the low level java code were to spawn child process threads then execution could continue, but I'm guessing the Java function your talking about doesn't do that and just calls the operating system to execute the command and waits for the returning code to come back.

  • Call operating system services from Jdeveloper

    How can i call operating system services from Jdeveloper ?
    null

    We do not use JDeveloper but use external procedures/routines called from the database. Then you can call a database procedure to an operating system task.
    Linda

  • Deleting Entity Services

    Hi All:
    I deleted an entity service call Status_Obj, but after Generate all Project Code, appears the following error:
    Error               Status_ObjServiceLocal cannot be resolved (or is not a valid return type) for the method create     Status_ObjServiceLocalHome.java     NWD_agiletrk_Dpmg_env_orgejbmodule~agile.com/ejbModule/com/agile/pmg_env_org/besrv/status_obj     
    Someone have an idea about how can resolve this.

    Hi,
    It seems that the you are returning same structure in one of your operations that you have used to create the Entity Service. Now that service is deleted .. its structure might as well not be there .. and thats why the project gives build error.
    Hope this helps,
    Ashutosh

  • Realationship enterprise service - application/entity service

    I read some books about ESA and CAF but I still don't know the relationship between enterprise services in ESA and application and entity services in the Netweaver DevStudio (CAS framework).
    Are application/entity services also enterprise services? Or is there a difference?
    Thanks for your answers.
    Joachim

    You can consume SAP Enterprise Services. You can also participate in the definition of the Enterprise Services  through the ES Community (see ES Community under Enterprise SOA in SDN) and even create your own Enterprise Services. You can use whatever web development tools you like. In Netweaver Java stack, you can use CAF to implement or develop Application Services (where business logic is coded) leveraging Entity Services taping into your local or remote data model(s). Enterprise Services can be modeled and coded in CAF Application Services but you can use plain J2EE as well. In SAP case, the interfaces for Enterprise Services are defined in XI (input/output/exception). Their implementation happen in the appropriate SAP solutions like ERP where business logic can execute against appropriate data.
    Practically CAF Entity Services cannot be called Enterprise Services unless you want to. They just perform basic CRUD (create/read/update/delete) operations on an data object. They're more like utility services. But like Anton's mention of "Private Enterprise Services", what's private remains your own business!

  • Using different RFC's in one Application / Entity Service?

    Hello *,
    I just want to create my first Composite Application Service but before I begin I have some questions.
    The service will read out material master data from PLM. For that it has some findBy-operations with full-text search (creationDate, MatNr. ...) which return a result list and one operation which returns the material object for a given MatNr.
    For this operations I need to call different RFC's which are imported by external services.
    Now my questions:
    1. What kind of service should wrap my external services and provide the operations? Should I use one or more entity service to wrap external services and then realize the operations in an application service? Or should I just take an application service without entity services?
    2. The created service should not only be an internal CAF  service but also a Web service? How can I realize this?
    Thanks for your answers.
    Best regards
    Joschi

    Ok, thanks a lot. So nearly everything's clear now. Only one question remains:
    > 6. mark the entity service as "remote" and create a
    > web service from it
    > (note: this requires NW04s SP8)
    Is this possible? I can't find any checkbox to mark an entity service as "remote" like in an application service (NWDS 7.0.07 and NW04s SP8).
    So I have to map the findBy operations to an application service and create a web service from it!?
    Regards
    Joschi

  • Error while "Project Code Generation" in Entity service

    Hi SDN's,
    I have created an entity service which is the help documentaion of NWDS. After completion of all steps while generating project code i am getting an error called "AbstractStringBuffer not reachable"
    Can any body help me in solving this issue.
    Thanks in advance

    Hi Raju,
    it seems like you have a version problem, try to use jdk 1.4 or higher and try.
    Or go to
    Prefrences --> Java --> Installed JRE's here change the Jdk to the latest,compatable version
    Sometimes reinstallation also solves such problems.
    Award pts if help full
    Cheers
    Souza

Maybe you are looking for

  • Apex 4.1 Grid branching two pages from a field

    Apex 4.1,how create two branches inside the GRID Hello, I'm using Apex 4.1, as per the functionality, I need to use interactive report to "SEARCH records", the same will be shown in the GRID. GRID should look like as below, | Col 1 | Col 2 | Col 3 |C

  • Adobe Acrobat 8.0.1

    Hi Folks, I am currently putting together a document to be handed out at the end of a training week. The document contains questions with multiple choice/ true or false questions. Is there anyway I can configure the document so the students can selec

  • Issue with the process chain?

    Hi All, I have a process chain triggerred by an event.I had this transported into Q box.After moving it to Q i did click on acativate and schedule icon.When i triggered the event in Sm64.The process chain triggerred successfully.The next day when i t

  • Windows not defined in the form

    Hi I created a zscript defining all the windows.and wrote a driver programm for the same. When I execute the driver program ,it runs into an error sating that 'window' including main window is not defined forthe form. Can anybody throw some light reg

  • Email CollectOverMetrics.ps1 HTML Report

    Exchange 2013 SP1 with 2 member DAG with 1 DB. I want to monitor the DAG using collectovermetrics.ps1. I want to have the html report from collectovermetrics.ps1 email to administrators. I know I have to have task scheduler run the command: CollectOv