Persistency in entity service
Hi all,
am facing a problem with entity servie persistence.
I have created an entity service and am accessing this service in a webdynpro component. I have created all the UI elements(view) i need.I also bound these elements to the context.I also added parameters to the"CREATE" method which is built in method of entity service.But If i want to store the data in local persistency,the "CREATE "method is not allowing to do so....Is there any way to access that "CREATE" method in my application...plz help me out.....
points will be awarded....................
Hi,
you have to publish your busniss object as webservice.
Than create a Webservice Destination in your NWA.
Now you should import the Webservice as model in your WebDynpro Project.
So you can use your entity service in your WebDynpro Apllication.
regards,
robin
Similar Messages
-
Remote Persistency And Entity Services References
Hi Guys,
I try to build a composite service with remote persistency (via webservices). There are several tuturials explainig it:
81 Using a Web Service as External Service
85 Using RFCs as External Services
95 Implementing Remote Persistency with CAF and RFCs
This is no problem at all, when only using one entity service or several entity service with no relations to each other. But for an demo application I try to create two entity services ("Main" and "Sub") and the "Main" entity service should have a relation to "Sub".
What I try:
1.) Create the entity services "main" with an own id.
2.) Create the entity services "sub" with an own id.
3.) Open the attributs for main again and create an relation to the entity service sub (via add button).
4.) deactivate "local persistency" for every entity service
5.) create the mapping for the read and find by operations.
But how can I "teach" my application the relation between these entity services? A look into the sql database shows an empty relation table and the pattern "relation tab" is empty, too.
I try to create a findby operation for the entity service "sub" like "findByMainID". But the attribut list only shows attributs of the "sub" entity service.
Are entity service relations working with remote persistency?
Kind regards
MartinHi Austin,
thank you for you answer. But the findBy operation is only one problem. The main problem is the missing option to map a webservice to a reference/relationship. Due this fact the application has no chance to know which child record is part of which main record or which main record is parent of which child record. As a result I have two totaly isolated entity services which doesnt know, that they relate to each other. The application has no information about the relationship.
When I create only one entity service with a complex attribute for child attributs I didn't have the these problem. I could map parameters to the (parent) attributs of the entity service and the (child) attributs of the complex attributes in the same step. In this way the application have informations about the relationship between parent and child records. For example a web service for the read operation could return exactly one record for the attributs of the parent entity service and a list of records to the child attributes (modelled as complex attributs) in case of a 0...n cardinality. I think there must be a solution like this for two entity services with a relationship between each other.
Do you understand my problem? Maybe I've missunderstood something. But what?
Thank you
Martin -
Table Name Issue of CAF Entity Service
Hi All
I have a problem in the following scenario :--
I have created a CAF project named xflit_01 in local development. Another CAF project xflit_02 is created in local development of another machine's NWDS but both the project has a same entity service name,'Flight'. But one interesting observation from persistency tab of the entity service'Flight' is that for tables generated for both the entity services are same name, 'XAP_XFL_FLIGHT0001' where "XAP_XFL_" is namespace and "FLIGHT0001" is names. Both entity services are mapped with same external service.
Next I have deployed that two projects such as xflit_01 and xflit_02 in same central WAS from different machine's NWDS one by one. but how two tables with same name, 'XAP_XFL_FLIGHT0001' would be handle by WAS? But after the deployment we need to configure external service. So in External Service configuration window we are getting error when the link Service Registry is clicked.
Any idea will highly be appreciated.
Thanks
ChandanSolved by myself. Reason is for same db and CAF table naming convention
-
Error When Testing Entity Services
Hi!
I have recently installed NW04s, and when I develop Entity Services the deploy without any problems. I can also open them in the Service Browser without any problem.
However, when I try to create records in the database I get the following error:
ERROR. Exception thrown in method create. The transaction is marked for rollback.: com/sap/caf/rt/exception/CAFIllegalAccessException
Does anybody knows how to solve this problem?
I use local persistency wothout any permission checks.
i am also facing same problem with EP7.0 combination with NWDS7.0.07Version.
Regards,
Amit.
Message was edited by:
Amit BakshiHi Amit
It seems there is a luck of information to resolve your problem. Please, go to Visual Admin -> Log Viewer service and check log messages with Warning or Error severities. Post them here and it will help to resolve your error.
BR
Sergei -
Wrapping BAPI in Entity Service - good or bad ?
Hi all,
I have a confusion here regarding the usage of BAPI in CAF.
We have two possiblities.
1) directly use BAPI classes in Application service and use it.
2) wrap the BAPI in an Entity service and further use this Entity service in Application service.
Is BAPI -- Entity Service relation a 1 to 1 relation ???
which is the best way and efficient way ??
Thanks & Regards,
Sudheer.
Edited by: Sudheer Kareti on Jun 26, 2008 1:10 PMHi,
In the architechtural guidlines, reasons are given.I am just copying those:
Regarding persistency, there are two options: remote and local:
Remote persistency means the actual Business Object instances reside in an external system, which
has to be accessed by means of so-called External Services mapped to the CRUD and query
methods of the SAP CAF BO (hence, such SAP CAF BOs are called u201CRemote Business Objectsu201D).
SAP CAF offers the possibility to either connect to RFCs or to document-style Web Services via External Services.
Local persistency means SAP CAF will create an own database model for you that reflects the
structure of your BO, which is therefore called u201CLocal Business Objectu201D (e.g. simple attributes with
cardinality 0..1 or 1..1 will be reflected by database table columns, whereas cardinality 0..n or 1..n,
as well as a reference to another Business Object will lead to an additional table linked via foreign
key relationship).
Moreover, there is a special persistency type u201CCustomu201D, which basically allows you to redefine the out-of-thebox
CRUD methods, i.e. you can implement your own persistency logic that way.
Remote Business Objects have the following disadvantages:
1. only query and CRUD operations with quite strict signatures allowed, which makes mapping to complex signatures of Enterprise Services difficult/impossible
2. local persistency footprint for each data record read from the remote/backend system via the mapped service, which means sub-optimal performance
3. at this time, there seems to be no clear benefit over an application service operation mapped to an External Service, therefore they are a somewhat redundant concept.
Sampath -
Obejct key mismatch between webservice and entity service
Hi
I created one web service using entity service in one caf project. Now i created another project. I have one entity service in this project which is using the previous web service. when i am testing my second project using service browser, I am getting object key values which are different from what i am getting using web service browser.
Anyone has any idea regarding this?
Regards
SaurabhHi Sauragb,
the different object keys is normal, because even when you apply remote persistency caf core stores the "startup" attributes in an database. So when using a entity service you will always have attributes like key, createdBy, lastChangedBy... stored in lokal CAF Database.
And that's why you have different keys.
best Regards,
Rene -
How to create index attributes in CAF Entity Service
When one creates an entity service with external persistency (local persistency on the persistency tab is unchecked) you have to create at least one "key" attribute. However, how do you create "index" attributes to improve performance. Currently, if you add custom key you must select "key" checkbox in attribute wizard when creating an attribute and this key field must be unique. This is not what I am looking for. I'd like to create a few custom keys that the contents allow duplicate.
Hi Tom,
This is a very valuable question. Yes, you can add an index for specific fields to the generated database table. You can do in the NWDS, navigate to the dictionnary view and open the corresponding database table. Now you can add an index and assign database field(s) to this index.
However: you must be aware that, if the entity is changed (i.e. new parameters are added), the database table is re-generated and the indices are lost.
Regards,
Jan -
Access to Entity Service from Portal Application
Hi Experts,
I have a hybrid application which will be making use of both Web Dynpro and Portal Applications. I decided to use Entity Services to store my back-end data and can access it fine from the Web Dynpro project. I have included the public part of my CAF project into the Used DCs of my Portal project and while I am able to call the methods of the Entity Service at compile time, at runtime I receive an error message on the page:
An exception occurred while processing a request
I know in order to get this to work for Web Dynpro I had to include sap.com/tccolapi.sap.com/cafruntimeuicouplingapilib as a Library Reference and a few Used DCs, but while I have added the Used DCs to the Portal project, I am unsure of how to add the Library Reference. I assume this has to be added to portalapp.xml, but I don't know the syntax.
Could somehow please reply with how to do this and whether this is all that is required in order to call Entity Service methods from Portal applications?
Thanks,
JPHi Smith,
Write click on the Project then goto the Properties=>Webdynpro References=>Library references
add
caf/eu/gp/api
sap.com/cafruntimeuicouplingapilib
And add the following DC in your project.
1> External in caf/eu/gp/api (CAF domain)
2> caf/eu/gp/api/wd (CAF domain)
3> com.sap.security.api.sda (SAP-JEE)
portalapp.xml
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal, SAPJ2EE::library:cafeugp~api"/>
</application-config>
<components/>
Check this thread .
Using CAF GP API in Portal Application project
Regards,
Mithu -
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
JoschiOk, 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 building the DC for CAF entity services
Hi all,
I am trying to create entity services in CAS and following the following help document from help.
http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
But While building I am getting following imports errors:
Error:
com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface
com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
changedData cannot be resolved ,CarJDO.java
com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved CarJDO.java
The method removeACL(String, String) is undefined for the type CAFPermission CarServiceBean.java
loadByCustomKeys(Car) is undefined for the type IDataAccessService CarServiceBean.java
Can anyone help.Hi all,
I am trying to create entity services in CAS and following the following help document from help.
http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
But While building I am getting following imports errors:
Error:
com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface
com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
changedData cannot be resolved ,CarJDO.java
com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved CarJDO.java
The method removeACL(String, String) is undefined for the type CAFPermission CarServiceBean.java
loadByCustomKeys(Car) is undefined for the type IDataAccessService CarServiceBean.java
Can anyone help. -
Error while testing the created entity service
Hi
I have an error "access forbidden.please login again" while testing the entity service in the service browser.Please help.
Regards
ms.Hi,
I think this is not a problem from your end. You please check for another entity service. If you get the same error then this is the problem from server side. If possible please restart the server and try it again.
Thanks
Chandan -
Error after Deploying a new Entity Service
After deploying an entity service and testing it via the testtool the following error occured. Do you have an idea about the reason for this strange behaviour?
Thanks in advance.
ERROR. Exception thrown in method create. The transaction is marked for rollback.: javax/jdo/InstanceCallbacks -
Loader Info -
ClassLoader name: [siemens.com/sm3kshtlog] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service:p4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl library:ejb20 library:j2eeca library:jms library:opensql common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore interface:resourcecontext_api interface:webservices interface:cross interface:ejbserialization sap.com/cafcore library:cafmetamodellib library:cafruntimeapilib sap.com/cafruntimeear Resources: C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\EJBContainer\clientjars\clientsiemens.comsm3kshtlogejbmodule.jar C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\EJBContainer\applicationjars\siemens.comsm3kshtlogejbmodule.jar C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\src.zip Loading model: {parent,references,local} -
The error occurred while trying to load "com.siemens.sm3k.shtlog.besrv.sigdatsource.SigDatSourceJDO".:Hi Samir,
you could be right...
it could be, that our metadata are inconsistent, because we had before problems with the automatic code generation.
What should we do, if we have such a inconsistency of our ejbmodule, dictionary and metadata model?
is there a way to repair the project?
Undeploy and Redeploy doesn't have an effect on this.
We cannot start again, because we put in 10days of development?
Thanks for any help.
Greetings Jens -
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 advanceHi 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 -
Error while testing entity service
Hi all,
I created a CAF Development component and an entity service for the same. While trying test the entity service through service browser i get the follwing error :
Application error occurred during request processing.
Details:com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create deployable object 'sap.com/cafUIservicebrowser' since it is not of a Web Dynpro object.
Exception id: [0014225F392C006100000013000009A400042388306C40DD]
Please help...
Regards,
Sharmila
Message was edited by:
Sharmila SHi Sharmila,
It looks like your WAS does not have CAF deployed.
Regards,
Shubham -
Problem in data source mapping - CAF entity service.
Hi,
I created an external service for the bapi given below.
It has 2 tables as input parameters.
In entity service I created attributes(for input parameters) for table1 and table2. but in data source i couldn't map more than one attribute to the MATNRSELECTION and PLANTSELECTION.The attributes of the bapi are under the same collection.
I'm using NWDS version 7.0.06.
BAPI_MATERIAL_GETLIST (To List all Materials for a Particular Plant)
Input Parameters:
Table1: MATNRSELECTION
MATNRSELECTION-SIGN
MATNRSELECTION-OPTION
MATNRSELECTION-MATNR_LOW
Table 2: PLANTSELECTION
PLANTSELECTION-SIGN
PLANTSELECTION-OPTION
PLANTSELECTION-PLANT_LOW
Regards,
Shobhendrain your entity if you did create 2 attributes for one material number and one for plant, you can map them to the corresponding MATNRSELECTION-MATNR_LOW and PLANTSELECTION-PLANT_LOW.
For the sign and option, you should uncheck the IsNull parameter in the "Entity to External Operation parameters" mapping window of the Datasource Tab of your entity. And you should set default values like sign = I and option = EQ or something like that.
But if you want to pass a list of material numbers or plants, I do have a recollection from last year experiments of some limitation using collections as input parameters. maybe somebody else had better success with that
Maybe you are looking for
-
Error while opening external list in share point 2013.
I am getting an error: - "Unable to render the data. If the problem persists, contact your web server administrator. Correlation ID:bbc0a39c-f375-306e-e5af-59e06e900a3e".
-
Safari Java Isnt working!
I wanted to post pictures on Facebook, which uses Java, and for some reason Java isnt working! I uploaded the new java just like technical support told me to do, but it still doesn't work. Please help me!
-
Default email for each contact when emailing to a group?
Hi When I use Mail.app's shortcut for sending email to a group, I don't seem to have control over which of several emails (work, home, etc.) that exists is being used for each contact. I want to specify a default email for each contact so that I don'
-
every time when I run function GET_PURCHASEORDER_VALUE Oracle rises error ora-30625 in line*. I work in Oracle release 9.0.1.3.0. what shuld I do? help me. please. create or replace function GET_PURCHASEORDER_VALUE(PURCHASEORDER in sys.XMLTYPE) retur
-
Incorrect Processing lead time showing in ASCP exception
Hi All, We have a buy Item say TEST01 which is used in two Different organization A and B and its processing lead time at item level and ASL it 10 for Org A and 111 for Org B, However issue is when we run collection plan for Org A and check for ASCP