Use the findByMultipleParameters bo operation in application service
Hi
I am trying to use the default findByMultipleParameters operation of a business object in an application service.
I want to use the application service exposed as a webservice within webdynpro.
But how can I pass all the parameters i a way, that it is not necessary to fill all fields in webdynpro? Is there any example code?
Any help would be appreciated.
Bernd
Hi Ketan,
You can implement findAll or findById in application service. First while defining the operations set the output parameter to be a structure which contains that BO(You create yourself a complex structure for it-there you can set cardinality).
Then in the application service under that operation using the service Bean of the BO access the Bo's corresponding methods(either findById or findAll). Get that output and set it in the output parmeter and return it.
public com.caf.types.FindAllAmendmentsResMsg findAllAmendments(
@javax.jws.WebParam(name="inputParameter1")
com.hcl.xapps.ipr.caf.types.FindAllAmendmentsReqMsg inputParameter1) {
FindAllAmendmentsResMsg response = new FindAllAmendmentsResMsg();
try {
List<Amendment> amendmentList = new ArrayList<Amendment>();
amendmentList = (List<Amendment>) this.getAmendmentService().findAll();
response.setAmendmentList(amendmentList);
} catch (CAFFindException cfe) {
return response;
The above is an example for findAll.
Hope it helps you
Regards,
Srinivasan Subbiah
Similar Messages
-
Problems using the Java API inside a Web Service
Hi,
after I've built a standalone Java RMI client, using the API, I wanted to use the same code in a Web Service I've built and deployed in tomcat (jwsdp-1.3). But i ran into a few problems..
- although I have the exact same code in both programs, the one in the web service simply blocks when I initiate the Locator class (see above...);
- all the .jar's that I use in the client are deployed in the WEB-IF/lib of the web service directory on tomcat;
- no exceptions are thrown in tomcat, so i don't know what's going on;
Is there any specific configuration for the API to run on tomcat?
Could it be that the .jar's needed by the Locator class may have some kind of conflict with the ones in tomcat?
Thanks...
Note: The code on the client is totaly stable and fully operational.
The web service uses java.rmi.Remote (extends Remote).
Here's part of the code:
Properties env = new Properties();
env.setProperty("orabpel.platform", "oc4j_10g");
env.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
env.setProperty("java.naming.provider.url","ormi://dellpc05/orabpel");
env.setProperty("java.naming.security.principal","admin");
env.setProperty("java.naming.security.credentials","welcome");
Locator locator = new Locator("default", "bpel", env);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
(...)I've put a
try{Locator...}
}catch(Throwable t) {
System.out.println(t.getMessage());
t.printStackTrace();
around the Locator..
I still don't know why it's throwing this...
Here's what it gets:
before Locator
javax/jms/JMSException
java.lang.NoClassDefFoundError: javax/jms/JMSException
at com.evermind.server.ThreadState.getCurrentState(ThreadState.java:206)
at com.evermind.server.rmi.RMIConnection.checkServletCaller(RMIConnection.java:3448)
at com.evermind.server.rmi.RMIConnection.<init>(RMIConnection.java:181)
at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:856)
at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:953)
at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:309)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.collaxa.cube.util.CXBeanRegistry.lookupDomainManagerBean(CXBeanRegistry.java:205)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:84)
at com.oracle.bpel.client.Locator.<init>(Locator.java:120)
at com.oracle.bpel.client.Locator.<init>(Locator.java:91)
at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.taskTimeoutExceeded(ResultProviderImpl.java:231)
at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.run(ResultProviderImpl.java:160) -
All is in the title, so I repeat it below with a better identation.
What are the pros and cons of
1) choosing to use the SAME
Apple ID for iCloud services on one side, and
purchases on the iTunes Store, App Store, and iBookstore, on the other side; or
2) to have and use two separate Apple Ids for these "two sides"?
P.S.
I have loads and loads of free podcasts in iTunes in my iMac, that are certainly more thant the 5 gigas the iCloud provides for free, so I don't want those to go to the cloud. But this is perhaps a different question...
Also need to mention that I have itunes on a mac, a pc and an iphone.
Sorry to look so silly with this question, but I don't get the "big picture".You need to create a user account for your wife (or yourself depending on who has the current user account). When syncing, each of you should sign in as a separate user, login to iTunes and then sync. I had this problem when my sister got an iPhone. When we did her initial sync, everything on my iPhone showed up on hers. Apple gave me this solution.
-
How to use the same component in different applications
Hi All,
I need to use the same component in different applications. i.e In opportunity, Quotation & Promotion.
The Search help view in the component PRD01QR should be used in all these components but with different search criteria.
With help of the DO_determine_configuration, different view configurations are possible but Different search criteria is not possible.
for Eg. search parameter without DDLB, F4 options in another components.
How can I control the behavior of the search view in different applications with restricting the field properties?
Is it possible to find out where and in which component these search_help_search component is used?Hi Harry,
Is it possible to find out where and in which component these search_help_search component is used?
ans: I am giving an Example for your question go through that u might get clear about this.
Ex: BT115IT_SLSO sales order component
below screen they component usage using for populate the product search component.
please let me know any help required .
Regards,
vishwa. -
How to use the same element in different Web-Services?
I have defined a web-services in two WSDL files.
I want to use the same type in this two services. Because if one service call the other one, it could pass the class it just got. Otherwise, the classes can't be casted.
Web-Service1:
public com.package1.State inputValue (com.package1.State state) {
return state;
Web-Service2:
public com.package2.State inputValue (com.package2.State state) {
return state;
}And now, If I call from the Service2, the Service1 and put
Service1.inputValue(com.package2.State state) ;
I can't do this, can't cast and so on. But I want my tool WSDL2Java, will create the same State.class for two Web-Services, like:
Web-Service1:
public com.package3.State inputValue (com.package3.State state) {
return state;
Web-Service2:
public com.package3.State inputValue (com.package3.State state) {
return state;
}Is it possible? How to define it in wsdl?
Thanks in advance.You can certainly do this in WSDL, simply put your
common element in a schema file and "include" it into
each of your WSDL files. Obviously your element will
have to use the same namespace in all places.
I'm not sure whether wsdl2java can cope with
"include" statements in WSDL. I know plenty of other
similar tools, e.g. Axis and .Net tools, didn't
support this however they may have moved on since I
used them.
To get around this you have to "manually" include the
schema in each wsdl for code generation purposes.Thanks for the answer. I did as you said and it works fine. -
How to catch the user defined exception in application service
Hi All,
How to catch the user defined exception in application service when it is throwed by the external service..
Regards,
Thirumurugan.Hi,
Thanks for your reply,
Actually I am calling validate Login method of External service from the application service. When the login fails, my external service will throw user defined Exception.I want to catch the user defined Exception.
But in the application service , validate Login method can catch only Invocation Exception and Engine Exception.
These two exception are present in the Application service remote interface.
public com.sap.comptest.extsrv.accrjavawsvi__document.output.
Ns1_validateLoginResponse validateLogin(com.sap.comptest.extsrv.accrjavawsvi__document.input.Ns1_validateLogin input) throws com.sap.caf.mp.base.exception.InvocationException, com.sap.caf.mp.base.exception.EngineException;
User defined exception is not present there. When i include the webservice as external service in CAF, it suppossed to generate the java file for the custom exception of validate Login method and this generated file should be included in the application service remote interface..
public com.sap.comptest.extsrv.accrjavawsvi__document.output.
Ns1_validateLoginResponse validateLogin(com.sap.comptest.extsrv.accrjavawsvi__document.input.Ns1_validateLogin input) throws com.sap.caf.mp.base.exception.InvocationException, com.sap.caf.mp.base.exception.EngineException,
(generated file name of user defined Excpetion.
Then only validate login method of application service can catch the user defined Exception which is thrown by the external service.
regards,
Thirumurugan.p -
We are using the Azure server for our web services. Server is generating an error "Unable to connect to the remote server". What is this error means
Hello,
Did you means that you use the Windows Azure Virtual Machine DNS name as the server name in the Reporting Server Web Services URL?
For example:
Report server:http://uebi.cloudapp.net/reportserver
Report manager:http://uebi.cloudapp.net/reports
If you want to connect to Report Manager on the virtual machine from a remote computer, you should create a virtual machine TCP Endpoint and open the port in the virtual machine’s firewall. By default, the report server listens for HTTP requests
on port 80.
Reference:http://msdn.microsoft.com/en-us/library/jj992719.aspx#bkmk_ssrs_connect_2_remote_RM
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Using the match/merge operator
Hi guys,
I have created a simple table with 4 columns:
EMPLOYEES
- employee_id
- emp_firstname
- emp_lastname
- emp_telephone
I have placed 5 entries in the table:
11, jane, doe, 80980980
12, william, gates,6876876868
13, john, anderson, 545646546
14, michelle, millo, 340580334
15, john, anderson, 545646546
Row 13 and 15 are duplicates, except for the employee_id. I'm trying to use the match-merge operator to check for matches on emp_firstname, emp_lastname and emp_telephone. I would like to merge the rows matching on firstname, lastname and telephone number, and would like to keep the lowest employee_id as PK.
I have tried to use the match-merge operator with the following settings;
Input connections:
- employee_id
- emp_firstname
- emp_lastname
- emp_telephone
Merge output
- employee_id
- emp_firstname
- emp_lastname
- emp_telephone
Xref output
none
Match bins:
- emp_firstname
- emp_lastname
- emp_telephone
Match rules:
MA_0, all_match
Merge rules:
emp_firstname: all match
emp_lastname: all match
emp_telephone: all match
When I debug the match merge operator I get " 4 in, 4 out", but I expected to have "5 in, 4 out". Am I using this match/merge operator the right way?
thx for you help!
michiel
nullHi Robert,
I tried on 3 database installations (all 10.2). there is no parameter DB_BLOCK_BUFFERS set. And i do not assume that there is a reasn for increasing the db_cache_size - means: why i did not get any error for that presumed case?
btw: can you explain why i should increase db_cache_size?
thanks,
Andreas -
I'm tring to install a d2 quadra external drive but can't use the setup assistant because "PowerPC Applications are no longer supported". Anyone have any ideas?
You shouldn't need to install anything just to use the drive. Just connect it to your Mac and it should mount. If it's the Intego Backup Assistant you're trying to install, try the latest version which you can download here:
http://www.lacie.com/products/product.htm?id=10323
Regards. -
Keyboard shortcut for using the color picker in another application
Hi, I'm new here. My first post.
I remember there were a keyboard shortcut in Ps for using the color picker in another application. For example picking a color in a web browser. I just don't remember the keyboard shortcut. Anyone know it?
Regards,
LeifThanks! This was the method I was looking for. Unfortunately it doesn't work when I drag the eyedropper to a browser window on a secondary monitor. Maybe it has to do with my setup, Mac/Mavericks and Ps CC 2014. Anyway thanks for your help, you gave me the answer I was looking for.
// Leif -
How do i use the jsp session in web application
pls i do i go about trying to maintain a user in a web application when he sign in so that his state would be mainain through out the other pages and also adding sound to my pge the page is being design with jsp thank u frm hamzah
I see what you are saying.
The JNDI approach should work-we will try to reproduce this internally.
I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
There are a couple of options.
If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
You can also put the following in your spring application context file
<osgi:reference id="myDataSource"
interface="javax.sql.DataSource"/>
This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
http://www.springframework.org/osgi/specification
(Look in section 3.3)
Hope that helps.
Seth
Edited by swhite at 08/01/2007 6:19 PM -
Using the variable ? operator in an XPath Expression
I'm trying to using the variable operator (?) in an Oracle prepared statement used in a query where clause. Here is the query:
select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
from AUDITED_EVENT_XML_MIN e,
XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
'/xae:auditable-event'
PASSING e.xml_event_content
COLUMNS
APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
VERSION VARCHAR2(255) PATH 'xae:version',
EVENT_TYPE VARCHAR2(255) PATH 'xae:event-type',
SENDING_SITE VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
RECEIVING_SITE VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
EVENT_ID VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
where existsNode(E.XML_EVENT_CONTENT, '/xae:auditable-event[xae:event-type=?]','xmlns:xae="http://gov/va/med/datasharing/audit/endpoint/audit"') = 1This code works when the ? is replaced with "aValue". I need to use the ? so that my Java client can pass a variable value into the query.
Is this a supportable feature or am I doing something wrong?
I didn't see any examples in the Oracle XML DB Developers Guide where there was a ? in an XPath expression.
I also tried "?" with the same issue...
Here is the version info:
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 10 18:41:55 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAny assistance would be greatly appreciated.
Thanks in advance...I incorporated this suggestion and it worked very well. Thanks!
Now I have converted my solution to use a structured index. As such, I want to write the where clauses in terms of column names rather than XPath expressions.
I hoped it was as simple as changing the code that generates the XPath expression to generate a SQL expression. After making that change, I'm now getting this error:
Caused by: java.sql.SQLSyntaxErrorException: ORA-00920: invalid relational operator
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:686)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:617)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:559)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1077)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490)
at gov.va.med.datasharing.audit.dao.jdbc.runner.MapQueryRunner.run(MapQueryRunner.java:47)
at gov.va.med.datasharing.audit.web.dao.jdbc.AuditableEventsQueryDAOImpl.getAuditableEventsByDate(AuditableEventsQueryDAOImpl.java:150)It seemed to me that if it worked for the XPath expression that it should also work for the SQL expression.
The static SQL is:
SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
(SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
(SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
FROM AUDITABLE_EVENT_XML aet,
XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
'/xae:auditable-event'
PASSING aet.xml_event_content
COLUMNS
EVENT_TYPE VARCHAR2(255) PATH 'xae:event-type',
SENDING_SITE VARCHAR2(255) PATH 'xae:sending-site',
RECEIVING_SITE VARCHAR2(255) PATH 'xae:receiving-site',
EVENT_ID VARCHAR2(255) PATH 'xae:event-id',
PATIENT_ID VARCHAR2(255) PATH 'xae:patient-id',
OUTCOME VARCHAR2(255) PATH 'xae:outcome') xt
WHERE aet.CREATED_TIME BETWEEN ? AND ?
AND ?
) ORDER BY CREATED_TIME desc
) WHERE rn > ? and rn <= ?So I'm thinking that Oracle must perform strong checking in SQL, not allowing the '=' operator to be substituted. If I run this query in Toad, replacing the ? with the SQL, it runs fine...
Can someone tell me whether or not this is a legal substitution?
The SQL that runs in Toad is:
SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
(SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
(SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
FROM AUDITABLE_EVENT_XML aet,
XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
'/xae:auditable-event'
PASSING aet.xml_event_content
COLUMNS
EVENT_TYPE VARCHAR2(255) PATH 'xae:event-type',
SENDING_SITE VARCHAR2(255) PATH 'xae:sending-site',
RECEIVING_SITE VARCHAR2(255) PATH 'xae:receiving-site',
EVENT_ID VARCHAR2(255) PATH 'xae:event-id',
PATIENT_ID VARCHAR2(255) PATH 'xae:patient-id',
OUTCOME VARCHAR2(255) PATH 'xae:outcome') xt
WHERE aet.CREATED_TIME BETWEEN TO_DATE ('9/19/2011 12:00:01 AM','MM/DD/YYYY HH:MI:SS PM')
AND TO_DATE ('12/20/2012 12:00:00 AM','MM/DD/YYYY HH:MI:SS PM')
AND (OUTCOME=0 or OUTCOME=1)
) ORDER BY CREATED_TIME desc
) WHERE rn > 0 and rn <= 5;Any assistance will be appreciated,
Thanks in advance. -
Complex return type for operations in Application Services
Hi all,
I am trying to create a complex return type for one of operation in CAF Application service.I have created a complex dataStructure named productList and added product bussiness object as its attribute with cardinality 0--n. And used product dataType as my return type.
But I am not getting any output but its work fine with cardinality 0--1.
I am using CE 7.1 SP5 trial version.......
Can anyoneHi,
And used product dataType as my return type.
Are you sure you did not forgot to change you operations return type to "productList"?
Best regards
Philipp -
Consuming Busniess Object Operations in Application Service
Hi,
I am currently working on CE7.1.
Is there any way in CE7.1 to consume the operations of a business object in a application service present in the same application? Please give the procedure in detail.
I am able to access the business object structure in the application service by maintaining a dependency but not the operations defined for the business object.
Thanks,
RahulHi Rahul,
I am facing the same problem.
I am not able to access the Business Object Operations namely CRUD operations in the application service.
I have defined the BO as dependencies in the application service.
But when i open the Operations tab, it is empty.
can you please help me out as to how you solved your problem?
Thanks & regards.
Gaurav Raghav -
I am trying to use the T. S. operator interface I need to add pass fail and error
Hello:
I am using Labview 6.1 and Test Stand 2.0
I have made some modification to a copy of the T.S. Labview operator interface. How do I get the pass/fail or error from test stand to be pass to LabView so I can tell the operator that the unit pass or fail the test. I do not want to use the Test UUTs. I want this to be very low operator response.
Message Edited by Toro on 02-28-2006 01:52 PMNot sure if this is available in the earlier versions of TestStand, but I think so.
You could post a UI Message, from your execution entry point in the process model, to your User Interface indicating the pass/fail/error status when a test run is complete. You will need to handle the UI Message in your Operator Interface. See TestStand II Customisation course notes for handling UI Messages.
The data passed in the UI Message can be anything you like, the UI Message handler in the User Interface will have to process the message and update the display as required.
Hope this helps
Steve
Message Edited by SercoSteve on 03-01-2006 10:02 AM
There are 10 types of people in the world that understand binary, those that do and those that don't.
Maybe you are looking for
-
In J1IJ we r not able to get excise invoice which was captured earlier
Dear experts, while doing depot sales, In J1IJ we r not able to get excise invoice which was captured earlier through J1IG at depot. please suggest me what are the possible causes for the same. Regards, Balu R.V
-
Removing the entity object commit from transaction handler
Hi, The business reuirement of the OAFWK page developed by us is as explained below: The basic functionality is of updating the attributes of items attached to the change order. The UI components displayed in the page(Item attribute changes region) a
-
Need field 1 to active second page - Help!
I have a form with many pages. I want page (1) active and visible. I want all other pages invisible unless the corresponding sn field on page (1) is filled in. Example Page 1 sn for page 2 entries sn for page 3 entries sn for page 4 entries etc pag
-
EREC: Internal Error while logging in using Registered External Candidate
Hi, We are on ECC 6.0 EHP 5 & ERECRUIT 605 (0005) and EP 7.0 SP22. I'm on the final stages of config on Production system for eRec applications, all works fine and ready for LIVE except the below functionality: 1. i've registered 2 uses as external c
-
How do i import a DVD to my MAC
i am trying to import or copy a DVD of a memorial to my MAcPro but cannot find any help topic for DVDs Please advise