Java Code for using an Enterprise Service?
Hi,
I am new to CE , Can some one please provide the code for consuming an Enterprise Service inside my Application Service.
I have Imprted the Inventory LookUp ES insid emy project, create the default mapping for the same inside an application service, created a method which calls the mapped ES method.
But I got stuck at this juncture as I dont know how should I recieve the data from the user and through which object also how should I send this data to the ES to recieve the response.
Please reply ASAP.
Thanks,
Manish
Hi Dipankar,
i as not aware of the steps which you just mentioned. Here I would like to ask that I should provide the Destination Name as the name of the Application Service or something else.
Presently I have taken the name of the Aplication Service as the Destination Name and provided the WSDL of the Enterprise Service as the URL.
And after that I mapped the application service with the Destination Created.
The implementation code written is :
public com.sap.xi.appl.global2.InventoryByLocationAndMaterialResponseMessage_SyncType findInventory(java.lang.String id, java.lang.String location) throws com.sap.caf.rt.exception.CAFServiceException {
com.sap.xi.appl.global2.InventoryByLocationAndMaterialQueryMessage_SyncType request = new InventoryByLocationAndMaterialQueryMessage_SyncType();
InventoryByLocationAndMaterialQueryMessage_SyncTypeCS1E data = new InventoryByLocationAndMaterialQueryMessage_SyncTypeCS1E();
Material mat = new Material();
Location loc = new Location();
mat.setId(id);
loc.setId(location);
List locList = new ArrayList();
List matList = new ArrayList();
locList.add(loc);
matList.add(mat);
data.setLocation(locList);
data.setMaterial(matList);
request.setInventorySelectionByLocationAndMaterial(data);
com.sap.xi.appl.global2.InventoryByLocationAndMaterialResponseMessage_SyncType response = this.InventoryByLocationAndMaterialQueryResponse_In(request);
return response;
I believe that when I test the application service in CAF runtime it will provide the Id and Location when I enter that in the UI to the Application Service and then I can use that to pass the data onto the Enterprise Service.
Please correct me if I am wrong.
But now I am getting the following error :
"com.sap.engine.services.webservices.espbase.query.exceptions.TechnicalException: Deserializing WSDL stream http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1 failed "
The details are :
Error Details
com.sap.caf.rt.connectivity.exception.EngineException: com.sap.engine.services.webservices.espbase.query.exceptions.TechnicalException: Deserializing WSDL stream http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1 failed
at com.sap.caf.rt.connectivity.ws.WSExecuteManager.executeWS(WSExecuteManager.java:136)
at com.sap.caf.rt.connectivity.ExecutionManager.executeWS(ExecutionManager.java:126)
at com.sap.caf.rt.connectivity.ExternalOperationExecutor.execute(ExternalOperationExecutor.java:80)
at com.sap.caf.rt.connectivity.ExternalOperationExecutor.execute(ExternalOperationExecutor.java:55)
at com.sap.caf.rt.bol.da.remote.GenericOperationExecutor.execute(GenericOperationExecutor.java:53)
at com.sap.inventory.modeled.appsrv.ecc_inventory002qr.ECC_INVENTORY002QRBean.InventoryByLocationAndMaterialQueryResponse_In(ECC_INVENTORY002QRBean.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext$InvocationContextImpl.proceed(AbstractInvocationContext.java:131)
at com.sap.caf.rt.interceptors.LogInterceptor.aroundInvoke(LogInterceptor.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Application.invoke(Interceptors_Application.java:37)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at $Proxy418_10002.InventoryByLocationAndMaterialQueryResponse_In(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.caf.rt.services.serviceaccess.ServiceWrapper.findByDataObject(ServiceWrapper.java:330)
at com.sap.caf.rt.services.serviceaccess.CAFServiceAccessBeanImpl.findByDataObject(CAFServiceAccessBeanImpl.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatefulTransactionAssociation.invoke(Interceptors_StatefulTransactionAssociation.java:43)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatefulSessionInstanceGetter.invoke(Interceptors_StatefulSessionInstanceGetter.java:37)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at com.sap.engine.services.ejb3.runtime.impl.StatefulBMProxyInvocationHandler.invoke(StatefulBMProxyInvocationHandler.java:55)
at $Proxy123_10002.findByDataObject(Unknown Source)
at com.sap.caf.rt.ui.esf.BONodeServiceAccess.findBy(BONodeServiceAccess.java:296)
at com.sap.caf.rt.ui.esf.Query.execute(Query.java:222)
at com.sap.caf.ui.servicebrowser.components.visualizer.controllers.TableViewCC.execute(TableViewCC.java:353)
at com.sap.caf.ui.servicebrowser.components.visualizer.controllers.wdp.InternalTableViewCC.execute(InternalTableViewCC.java:181)
at com.sap.caf.ui.servicebrowser.components.visualizer.views.TableViewCV.onActionExcuteQuery(TableViewCV.java:429)
at com.sap.caf.ui.servicebrowser.components.visualizer.views.wdp.InternalTableViewCV.wdInvokeEventHandler(InternalTableViewCV.java:342)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:131)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:72)
at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:156)
at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:91)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:161)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:109)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:96)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:469)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:52)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1388)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1208)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:145)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForAppProcessing.doService(DispatchHandlerForAppProcessing.java:35)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:114)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:80)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:506)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:526)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:457)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:248)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:698)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:230)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:228)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:192)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.doService(DispatchHandlerForRequestManager.java:38)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToRequestManager(ExecutionContextDispatcher.java:140)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:92)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:104)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:431)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: com.sap.esi.esp.service.server.query.discovery.ExtendedServiceException: com.sap.engine.services.webservices.espbase.query.exceptions.TechnicalException: Deserializing WSDL stream http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1 failed
at com.sap.esi.esp.service.server.query.discovery.DestinationsHelperImpl.getEndpointConfigurations(DestinationsHelperImpl.java:884)
at com.sap.esi.esp.service.server.query.discovery.DestinationsHelperImpl.getWSDLUrl(DestinationsHelperImpl.java:401)
at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.getWSDLUrl(GenericServiceFactory.java:222)
at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService_NewInstance(GenericServiceFactory.java:192)
at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:175)
at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:160)
at com.sap.caf.rt.connectivity.ws.WSExecuteManager.executeWS(WSExecuteManager.java:106)
... 137 more
Caused by: com.sap.engine.services.webservices.espbase.query.exceptions.TechnicalException: Deserializing WSDL stream http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1 failed
at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.getWSDLDefinitions(WSQueryImpl.java:509)
at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.initialize(WSQueryImpl.java:310)
at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.findWSEndpoints(WSQueryImpl.java:165)
at com.sap.esi.esp.service.server.query.discovery.DestinationsHelperImpl.getEndpointConfigurations(DestinationsHelperImpl.java:873)
... 143 more
Caused by: com.sap.engine.services.webservices.espbase.wsdl.exceptions.WSDLException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1"
at com.sap.engine.services.webservices.espbase.wsdl.WSDLLoader.loadDOMDocument(WSDLLoader.java:140)
at com.sap.engine.services.webservices.espbase.wsdl.WSDLLoader.load(WSDLLoader.java:91)
at com.sap.engine.services.webservices.espbase.wsdl.WSDLLoader.load(WSDLLoader.java:80)
at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.getWSDLDefinitions(WSQueryImpl.java:507)
... 146 more
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://iwdf0512.wdf.sap.corp:55080/sap/bc/srt/xip/sap/ECC_INVENTORY002QR?sap-client=800&wsdl=1.1"
at com.sap.esi.esp.service.server.query.discovery.WSTransportSettingsResolver.resolveEntity(WSTransportSettingsResolver.java:362)
at com.sap.engine.services.webservices.espbase.wsdl.WSDLLoader.loadDOMDocument(WSDLLoader.java:127)
... 149 more
Close
-Manish
Similar Messages
-
Regd. use of enterprise services : Best approach
Hi Experts,
I have configured a scenario using standard enterprise services,used soamanager of ABAP and tested the services,it works perfectly.
But the issue came with terms of security ,it seems we cannot expose our sap system as url for the services.
need to use PI to connect to the third party...I need suggestions on following
1. Can we connect ABAP of PI to ABAP of SAP ,with some configuration , i dont want to create any additional
structures is PI apart from the one which i imported.
2.If i set up a soap to proxy(ABAP) then i need to duplicate the structure for source and use the standard ES
service at proxy receiver, but i want to avoid duplication as it is cumbersome to do for all services.
3.If i create communication /service user i need to give access for some of sap tables to support the service functionalities.
what is the best approach for exposing services from PI using standard enterprise service.
Any pointer will be appreciated.
Regards,
Srinivas
Edited by: Srinivas on Jul 7, 2010 7:29 PMHi
Following is answer of your question:
>(1)How can I search relevant Enterprise services in PI for the SAP R/3 BAPI.
There is no way to look for enterprise service for BAPI, ES are harmonized services based on GDT whereas BAPI is more SAP oriented in datatype definitions, only way is to find out is look into code as many ES are calling BAPI internally. Best way to identify correct ES is business use (like Purchase Order Creation etc)
>(2)If relevant ES is available then what are the steps to be performed?
It depends how you want to use this ES, you can call this ES from outside world (read thirdparty tools, application) and these services can be used as ready-to-use building block for new applications. You must know URL of wsdl and security setting (user/password) to use it with any application. You can call it from ABAP, .Net, Java applications. You can test ES with any SOAP testing tool like WSNavigator or SOAP UI.
>(3)If relevant ES is not availabe then what are the steps to be performed?
You have few options if ES is not available, design of your own by following proper governance model (i.e. PIC process) or you can live with existing BAPI, RFC and convert them into Web Service using webservice wizard available in SE80 and SE37.
Regards,
Gourav -
Hello Experts,
My Scenario is Java Application(Source Data) - SAP PI 7.1 - SAP R/3.
I have standard R/3 BAPI available for Data posting in SAP R/3 system. This same scenario I can implement by creating and exposing the Web Service in SAP PI system. but here I want to use the Enterprise service(ES) concept which is new for me.
The following are my queries.
(1)How can I search relevant Enterprise services in PI for the SAP R/3 BAPI.
(2)If relevant ES is available then what are the steps to be performed?
(3)If relevant ES is not availabe then what are the steps to be performed?
Please suggest me.
Thanks & Regards
JageshHi
Following is answer of your question:
>(1)How can I search relevant Enterprise services in PI for the SAP R/3 BAPI.
There is no way to look for enterprise service for BAPI, ES are harmonized services based on GDT whereas BAPI is more SAP oriented in datatype definitions, only way is to find out is look into code as many ES are calling BAPI internally. Best way to identify correct ES is business use (like Purchase Order Creation etc)
>(2)If relevant ES is available then what are the steps to be performed?
It depends how you want to use this ES, you can call this ES from outside world (read thirdparty tools, application) and these services can be used as ready-to-use building block for new applications. You must know URL of wsdl and security setting (user/password) to use it with any application. You can call it from ABAP, .Net, Java applications. You can test ES with any SOAP testing tool like WSNavigator or SOAP UI.
>(3)If relevant ES is not availabe then what are the steps to be performed?
You have few options if ES is not available, design of your own by following proper governance model (i.e. PIC process) or you can live with existing BAPI, RFC and convert them into Web Service using webservice wizard available in SE80 and SE37.
Regards,
Gourav -
Creating Java code for the function module
Hi Colleagues,
I have a fuction module in ABAP system. Now I want to Generate java code for the FM.
I cam to know that we can achive that using AXIS, By getting the XML file for the fuction module and generate Java
Class file using that XML file.
Can any one tell me how to achive it.
Or any other way to do that?
Please provide you valid suggestions.
Regards,
SathyaHi,
You can integrate axis2 in eclipse. I think you have to find the plugin for that.
After that you can let axis generate the jave code (stubs and proxies) for your web service via the wsdl file.
Kind Regards,
Robin -
What is the transaction code for see the Web Services available in SAP
Hi
I came to know that SAP has provided its own webservices... I need some information on that... If any one has documentation on that can u please send it to me... My ID is <b>[email protected]</b>.
What is the trasaction code for see the web services available in SAP.... Can any one help.. Please its urgent
Best Regards
Ravi Shankar B
Message was edited by:
RaviShankar BHi,
you can find Web Services (Enterprise Services) in the Enterprise Services Workplace (ES Workplace). The ES Workplace allows you to explore, test, and use enterprise services to make enterprise SOA tangible. Here, you will find all of the currently productized enterprise services by SAP.
Best Regards,
Boris Mueller
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/esa/esapreview">ES Workplace at SDN</a>
<a href="http://esapreview.sap.com:82/socoview(bD1kZSZjPTgwMCZkPW1pbg==)/flddisplay.asp">ES Workplace</a> -
Hi,
Here are the steps to reproduce the problem with the examplesWebApp application
bundled with wlserver6.0(sp2):
Product: Weblogic server 6.0 (sp2)
Browser: IE 5.0
1. Add index.jsp as the welcome file in WEB-INF/web.xml
2. Create index.jsp as below:
<%
response.sendRedirect("index.html");
return;
%>
<html>
<head>
<title>Index JSP file</title>
</head>
<body>
<font color="red">This is index.jsp file </font>
</body>
</html>
3. Create index.html as below:
<html>
<head>
<title>Index HTML file</title>
</head>
<body>
<font color="red">This is index.html file </font>
</body>
</html>
4. Run the examples server and make sure examplesWebApp is deployed on the examples
server using the console
5. Access the URL http://localhost:7001/examplesWebApp
The page will display a compilation error as below:
C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
unreachable statement
out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
^
and a look at the generated java code for index.jsp (_index.java) will reveal
the erroneous code snippet below in the jsp service method:
try { // error page try block
//[ /index.jsp; Line: 1]
response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
return; //[ /index.jsp; Line: 3]
out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
} catch (Exception __ee) {
while (out != null && out != _originalOut) out = pageContext.popBody();
pageContext.handlePageException(__ee);
The above web application works fine in Tomcat 3.2.X environment. The Weblogic
server 6.0 servlet engine should not generate the "out.println()" corresponding
to the html section of index.jsp. The moment it sees the "return", it should stop
processing further.
Can someone from Weblogic support team please verify this and let me know when
this bug will be fixed?
One interesting thing I noticed was when we last tried weblogic 6.0 at its beta
stage, it worked fine after we put in a special patch jar file called "redirectfix.jar"
we received from weblogic team but somehow it got re-introduced by the time it
was released!!
We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0. Our
product has a lot of pages with such conditional {response.sendRdirect("page.jsp");return;}
blocks. We would really appreciate a faster response form weblogic team.
Thanks in advance.
sam...
Sam Palanisamy
Senior Software Engineer
Manage.com
2345 N. First Street First Floor
San Jose CA 95131
Why should it stop when it sees a return? Is that in the spec?
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"Sam Palanisamy" <[email protected]> wrote in message
news:[email protected]...
>
> Hi,
>
> Here are the steps to reproduce the problem with the examplesWebApp
application
> bundled with wlserver6.0(sp2):
>
> Product: Weblogic server 6.0 (sp2)
> Browser: IE 5.0
>
> 1. Add index.jsp as the welcome file in WEB-INF/web.xml
>
> 2. Create index.jsp as below:
> <%
> response.sendRedirect("index.html");
> return;
> %>
> <html>
> <head>
> <title>Index JSP file</title>
> </head>
> <body>
> <font color="red">This is index.jsp file </font>
> </body>
> </html>
>
> 3. Create index.html as below:
> <html>
> <head>
> <title>Index HTML file</title>
> </head>
> <body>
> <font color="red">This is index.html file </font>
> </body>
> </html>
>
> 4. Run the examples server and make sure examplesWebApp is deployed on the
examples
> server using the console
>
> 5. Access the URL http://localhost:7001/examplesWebApp
>
> The page will display a compilation error as below:
>
C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_
war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
> unreachable statement
> out.print("\r\n<html>\r\n<head>\r\n<title>Simple
html</title>\r\n</head>\r\n<body>\r\n<font
> color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
> ^
>
> and a look at the generated java code for index.jsp (_index.java) will
reveal
> the erroneous code snippet below in the jsp service method:
>
> try { // error page try block
>
> //[ /index.jsp; Line: 1]
> response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
> return; //[ /index.jsp; Line: 3]
> out.print("\r\n<html>\r\n<head>\r\n<title>Simple
html</title>\r\n</head>\r\n<body>\r\n<font
> color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
> } catch (Exception __ee) {
> while (out != null && out != _originalOut) out =
pageContext.popBody();
> pageContext.handlePageException(__ee);
> }
>
> The above web application works fine in Tomcat 3.2.X environment. The
Weblogic
> server 6.0 servlet engine should not generate the "out.println()"
corresponding
> to the html section of index.jsp. The moment it sees the "return", it
should stop
> processing further.
>
> Can someone from Weblogic support team please verify this and let me know
when
> this bug will be fixed?
>
> One interesting thing I noticed was when we last tried weblogic 6.0 at its
beta
> stage, it worked fine after we put in a special patch jar file called
"redirectfix.jar"
> we received from weblogic team but somehow it got re-introduced by the
time it
> was released!!
>
> We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0.
Our
> product has a lot of pages with such conditional
{response.sendRdirect("page.jsp");return;}
> blocks. We would really appreciate a faster response form weblogic team.
>
> Thanks in advance.
> sam...
> Sam Palanisamy
> Senior Software Engineer
> Manage.com
> 2345 N. First Street First Floor
> San Jose CA 95131
>
>
-
ESW: How can I use an enterprise service from ES Workplace?
Hi All,
i would have to use the enterprise service "SupplierERPCreateRequest_In" I found in the SAP ES Workplace. But how can I now use the service? I don´t find the Service in SOAMANAGER.
The corresponding package is installed and in SE80 in Enterprise Service Browser I see the "Service" or Proxy. But in the Enterprise Service Browser appears "Local Objects only (No Connection to ESR)"! Must be activated here anything?
Has anyone any idea what the problem might be or how should I proceed?
Regards,
BastianHi Gourav,
thanks for your answer.
I have looked at the blog, but it´s about XI. From step 2 in the blog, the description is no longer true in my system. The system that I use and where I need the service is SAP ERP ECC 6.0 EHP4, so the latest release.
Do you have another idea?
Thanks and Regards,
Bastian -
How to convert these java codes (for a feedback) to javabean?
Can anyone please help me to convert these java codes (for feedback) to javabean using the MVC Model-View-Controller pattern design?
<%
//instantiate variables
Connection con = null;
Statement stmt = null;
Statement stmt2 = null;
ResultSet rs = null;
String queryString;
int newInBoxMsg = 0;
int newSentMsg = 0;
int newSavedMsg = 0;
int newTrashCanMsg = 0;
String currentUserID = 1+"";
String adminID = 1+""; //change this ID to your adminID in the db
try
//Load the JDBC driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
//Get the connection getConnection("access driver", "userID", "password")
con = DriverManager.getConnection("jdbc:odbc:FREN_DB","","");
stmt = con.createStatement();
//sql statements: create, update, query
Calendar cl = Calendar.getInstance();
%>
<%
if(request.getMethod()=="POST"){
int y = stmt.executeUpdate("INSERT into Feedback(`whom`, `msg`, `date`)"
+" values ('"+currentUserID+"', '"+request.getParameter("date")+"', '"
request.getParameter("msg")"')");
int x = stmt.executeUpdate("INSERT into MailBox(`whom`, `who`, `mailheader`, `mailbody`, `date`)"
+" values ('"+adminID+"', '"+currentUserID+"', 'Feedback', 'We have received your feedback and we will respond to you as soon as possible', '"+request.getParameter("date")+"')");
out.println("Feedback Sent!");
else {
%>
<form name="compose" method="POST" action="Feedback.jsp">
<input name="date" type="hidden" value="<% out.println(cl.get(cl.DAY_OF_MONTH)+"/"+cl.get(cl.MONTH)+"/"+cl.get(cl.YEAR)); %>" maxlength="20">
<p>Your Feedback</p>
<p>
<textarea name="msg" cols="50" rows="10"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<%
}catch(Exception e) {
System.out.println(e);
%>Okay, first suggestion is to never create database connections in JSP/Servlet. SInce you mentioned MVC, JSP is the View, and a servlet can be the controller to process requests and redirect accordingly.
This piece of code should be in a class invoked from the model layer (business logic components) preferably with some abstraction. Maybe you should search around for DAO pattern. That might give you an idea. -
Java API for Primavera p6 Web services
Hi All,
- Anyone can please suggest me how to create the Java API for primavera p6 web services ?.
-if is this inbuild then from where we can download please suggest me or give me some link ?.
Thanks & Regards
DharmendraYou can review P6 Professional Project Management 7.0 Documentation Library for documentation on API and how to use it.
API are available and can be downloaded from edelivery.oracle.com. -
Java code for converting EDI file to XML file
Dear friends,
Can you please help me in getting the java code for converting to EDI file to XML file.Hi,
You can convert the EDI file to XML in any of the ways
1) Using third party seeburger adapters
2) Conversion agent
3) Stylus studio.
I think using java code it will be very difficult.
Thnx
Chirag -
I Need Java code for following Algorithm
* I Need Java code for following algorithm. Kindly any one help.
1. Read the contents (ideas and its corresponding scores) from two files named as 'a' and 'b'.
2. Stored the file 'a' contents in array a[].
3. Stored the file 'b' contents in array b[].
4. compare both files like
if(a.equals(b[j])
Writing the common idea and add the score from file 'a' and 'b'.
else
write the uncommon idea and its score..
For example :
Form Agents.txt
action,65
architecture,85
eco-,15
essay,30
form,85
form,85
link,40
tangent,25
Form Agents1.txt
Black holes,69
essay,78
Herewith i have above mentioned two files named as Form Agents and Form Agents1.
Form Agents has eight fields
Form Agents1 has two fields
--> 'essay' is common in two files, so store the idea 'essay' and add the score from Form Agents score is '30' and Form Agents1 has 78 (essay 108).
Finally it stores idea in another file with uncommon fields also.
Please help us.We have tried with following code.
But we cant add the scores.
For Example:
Form Agents.txt --> has "essay,30"
Form Agents1.txt --> has "essay,78"
Result is: essay,108
Finally it stores idea in another file with uncommon fields also.
So Any one pls correct the following code.
try
DataOutputStream o1=new DataOutputStream(new
FileOutputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\CandidateResponses\\Form
Agents.txt"));
//Reading the contents of the files
BufferedReader br= new BufferedReader(new InputStreamReader(new
FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\Ideological\\Form
Agents.txt")));
BufferedReader br1= new BufferedReader(new InputStreamReader(new
FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\Related\\Form
Agents.txt")));
while((s=br.readLine())!=null)
s1+=s+"\n";
while((s2=br1.readLine())!=null)
s3+=s2+"\n";
int numTokens = 0;
StringTokenizer st = new StringTokenizer(s1);
String[] a = new String[10000];
String[] br_n=new String[10000];
int i=0;
while (st.hasMoreTokens())
s2 = st.nextToken();
a=s2.substring(0,s2.length()-3);
s6=s2.substring(s2.length()-2);
br_n[i]=s6;
i++;
numTokens++;
int numTokens1 = 0;
StringTokenizer st1 = new StringTokenizer (s3);
String[] b = new String[10000];
String[] br1_n=new String[1000];
int j=0;
while (st1.hasMoreTokens())
s4 = st1.nextToken();
b[j]=s4.substring(0,s4.length()-3);
s7=s4.substring(s4.length()-2);
br1_n[j]=s7;
j++;
numTokens1++;
int x=0;
for(int m=0;m<a.length;m++)
for(int n=0;n<b.length;n++)
if(a[m].equalsIgnoreCase(b[n])){
int sc=Integer.parseInt(br_n[m]);
int sc1=Integer.parseInt(br1_n[n]);
int score=sc+sc1;
o.writeBytes(a[m]+","+score+"\n");
break;
else
o.writeBytes(a[m]+","+br_n[m]+"\n");
break;
}catch(Exception e){} -
Provide the java code for the following scenario.
Hi Experts,
I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
so that it becomes easy........
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Kindly provide the java code.
Thanq very much in advance..what i have understood from ur example is that u want to generate an idoc for unique combination of Order-no and Mat_No
if yes then chk the below mapping..
change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
1)
Order-no
----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
Mat_No
2)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
Mat_No
3)
Order-no
-----------concat[;]---sortbykey----------------------- \
Mat_No / \
Date--------------- / \
----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
Order-no /
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
4)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
Mat_No
5)
Order-no
-----------concat[;]---sortbykey
Mat_No /
Quantity --------------- /
----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
Order-no
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
UDF1:
String [] temp= a.split(";");
return temp[0];
UDF2:
String [] temp= a.split(";");
return temp[1]; -
Is there example code for using Ni488 and PCI-GPIB card in non controller mode?
Is there example code for using Ni488 and PCI-GPIB card in non controller mode?
cymrieg,
Your code looks good to me. What is the problem? What happens when it fails? What is the IBSTA value on the controller, and at what point in the code does it stop? What is the IBSTA value on the slave, and at what point does it stop?
One thing is that you might not want to call IBCLR() in a loop on the device. At the beginning of the program is fine...This will send a clear command to the device and will clear out any LACS and TACS bits that might be set. Also your IBDEV call shouldn't be in a loop.
Hope this helps, but let me know if you need more information.
Scott B.
GPIB Software
National Instruments -
I need java code for chating application
i need java code for chating application. plz help me
GANGINENI wrote:
i need java code for chating application. plz help meGIYF.
[http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html|http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html]
File under: lern2Google -
java code for intrusion detection system
hi
how can i write a java code for intrusion detection system wireless network (steps)
help please whith any documentation , exemples , name of packages thank youhi
anyone have code source java projet of an IDS intrusion detection system for VANET and thank you
Maybe you are looking for
-
New iPod Touch internet slow/not working
I've recently had my iPod Touch second generation replaced by a refurbished second generation iPod at an Apple Store. my old one used to connect to the internet fine and have decent speed. The new one will connect to the wifi and barely load a page o
-
Hyperion Reporting Studio - data not shown in "Complete book to PDF"
Hello All, We are using Version 11.1.2 with Planning and Essbase. We have created a book with 2 reports in it. When I run a report in the book to HTML I see data displayed in my statistical accounts but when I run the complete book to PDF the stat ac
-
How to convince my parents to get me an iPhone?
Here are my circumstances: I am a responsible child I get incredibly good grades I babysit (reinforcing my responsibility) I have a very good relationship with my mother and father I bought and paid for my own iPad Air last year which neither of my p
-
hai to all..... when we make the entries in sales order field va01....we get a item box beside the material box.... were the item comes from....and how to customize it .... plz help me with the steps to over come with this proble.....
-
I HAVE FORGOTTEN THE ANSWERS TO THE SECURITY QUESTIONS AND I DONT REMEMBER MY SECURITY EMAIL I ENTERED WHEN I MADE MY APPLE ID. PLEASE HELP ME WHAT I CAN DO?