EJB vs web services - architecture question

I am about to be involved in architecting a new system that will have a very large amount of business rules. The application will be 3-tiered with the client application being a swing based java desktop application making requests of objects (ejb or other) to a j2ee application server.
Im rather new to ejb development, having only built sample apps in the past. What im wondering is if there is a way to get around the RMI dependency for communitation between the client app and the server components. this is one reason im considering at least partial use of web services. ive become pretty good with apache soap, xml and seb services todate. however, i also need transaction support and im not sure if web services will do this yet. ive read about some work in this area.
does anyone know of an (hopefully opensource) implentation of a SOAP-EJB and/or EJB-SOAP implementation layer ?
The crux of the problem is that i need things like transactions and session management but i would like to communicate via soap and/or xml.

Ive also seen a few examples of using a servlet as a request dispatcher to service the SOAP requests to EJB's. im just wondering if there was something available that will do this without having to roll my own so to speak. I want to be able to communicate with my ejb's over port 80, but in a secure way.
Im also anxiously waiting for Apache Geronimo.

Similar Messages

  • Web Service Architecture Question

    I am a J2EE newbie. I am a certified J2SE developer, but still learing J2EE. I currently have a web-application that monitors a database. The Web application consists of a group of JSPs that create JDBC connections to a database and retrieve information via sql queries.
    I would like to make the application more generic so that I use connection pooling and do not have to hide the user name and passwords in the JSPs. I would like to use Enterprise beans to poll the database and the JSPs would simply request the information from the beans to display a table in the webpage.
    But like I said I am still pretty new to J2EE and do now know the best way to do this, or if this is even the best way. What technologies should I be using on my simple web application?
    Please Help

    Since it is a monitoring application that may depend peformance I prefer to avoid Enterprise Java Beans(EJBS) and use a connection pooling freely available from the book "Java Servelts from Marty Hall" and configure your database login info in java property files. Or you can use your application server's connection pooling feature by configuring the jndi data sources and other connection pooling info in the interface provided by your application server.
    for more clarity contact me at [email protected],
    Ravi.

  • Error during EAR deployment with EJB and web service

    I created a simple stateless EJB with one method called echo that returns a string.  I created a web service using the wizard, did a build and deployed.  The deployment did not report an error, but the logs in the visual administrator showed the follwoing message, and the web service did NOT deploy.
    Am I missing something related to EJB and web service security?
    PLEASE HELP ME.
    >>> Warning: delete security configuration [apps/com.areva/ear/ejb/security/com.areva~ejb.jar]
    [EXCEPTION]
    java.lang.Exception
         at com.sap.engine.services.security.server.PolicyConfigurations.unregisterPolicyConfiguration(PolicyConfigurations.java:153)
         at com.sap.engine.services.ejb.EJBAdmin.remove(EJBAdmin.java:2538)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.removeApplication(RemoveTransaction.java:294)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.prepare(RemoveTransaction.java:178)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:321)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3028)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:820)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.remove(DeployRuntimeControlImpl.java:271)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:400)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:157)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:220)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:803)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         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:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

    I have the same message. I am running sp11.
    Does anyone have an answer for this?????
    >>> Warning: delete security configuration [apps/avalero.com/rtfa-ear/contextRoot]
    [EXCEPTION]
    java.lang.Exception
         at com.sap.engine.services.security.server.PolicyConfigurations.unregisterPolicyConfiguration(PolicyConfigurations.java:153)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainerHelper.removeSecurityResources(WebContainerHelper.java:905)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainerHelper.remove(WebContainerHelper.java:447)
         at com.sap.engine.services.servlets_jsp.server.container.RemoveAction.remove(RemoveAction.java:50)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainer.remove(WebContainer.java:150)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.removeApplication(RemoveTransaction.java:294)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.prepare(RemoveTransaction.java:178)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:821)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.remove(DeployRuntimeControlImpl.java:271)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:400)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:255)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:157)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:220)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:803)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         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:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

  • Injecting both SessionContext & WebServiceContext in an EJB 3 Web Service

    Hi,
    Is it valid/legal to inject both of WebServiceContext and SessionContext in an EJB 3 Web Service, e.g.:
    @WebService
    @Stateless
    public class MyService
    @Resource private SessionContext sessionContext;
    @Resource private WebServiceContext webServiceContext;
    }Thanks in advance.

    Hello Bhupesh,
    A Classpath has to be defined for a server process to avoid the exception "NoClassDefFoundError"
    Refer to the below url for more clarity
    http://help.sap.com/saphelp_erp2005/helpdata/en/06/24d17099f2f245822fce0ba1ab4065/frameset.htm
    Thanks,
    Preethika

  • Web services deployment question

    My employer has a deployment environment typically requiring an application
    to be deployed in a multi-tier architecture (i.e. JSP/Servlets in one
    cluster, EJBs in a second cluster). They do however have this one
    application that requires a combined tier architecture and it is currently
    deployed this way. This application will shortly have a small web services
    layer added to it to support another application that needs information from
    this application.
    The IT staff that manage this environment wants to now create two clusters
    for this application on the same hardware, cluster A would contain the
    original application and be responsible for presentation and cluster two
    would contain the second app plus the web services layer and be responsible
    solely for handling web services. Their reasoning for doing so is that the
    web services are not considered presentation and thus this should be
    logically seperated. This seems strange to me, now your maintaining two
    clusters with identical code bases, doing identical work with the only
    difference being the entry point. There is no scalability advantage to two
    clusters that I can see, just a lot of extra work to create a logical
    seperation that isn't even real.
    Before I go back to them I just want to be sure I'm not missing some obvious
    reason why this would be a good idea.
    Thanks,
    George

    Tim
    You can change this behavior by passing notestconsole to the
    startweblogic.cmd or by setting the testConsoleFlag variable to false in
    the startweblogic.cmd script. Also testconsole is turned off by default for
    all EAR files.
    Please refer to the following document for more information on this
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/reference/commands/cmdStartWebLogicCommand.html
    Regards,
    Raj Alagumalai
    Backline Workshop Support
    "Tim " <[email protected]> wrote in message
    news:3f8af6cc$[email protected]..
    >
    How do you configure Workshop 8.1 to hide the Web Services test page fordeployment.
    This question has been posted and answered, but the answer had to do withediting
    the
    web-service.xml file. Workshop does not deploy a web-service.xml file.

  • Best SOAP Web Services Architecture for E-Commerce

    Hi there,
    I have developed an E-Commerce system following the normal way of
    developing Java web applications (all classes and JSP files in one Eclipse web project).
    I want to modularize the application, I want to split the application into
    two applications:
    1. The core app, with SOAP web services methods
    2. The client (front-end JSP files and some servlets to request/receive responses from the SOAP web services core app)
    Basically, I want the servlets in the client app to call the core SOAP web services app for data such as
    get product by ID, get customer by ID, etc...
    The core SOAP web services app would then return a response in an XML format, which I then
    would map to Java objects at the client application.
    My questions are:
    1. Is this the right way to go?
    2. Where should the session management be? At the client app?
    Hope you can help?
    I have been thinking about a proper architecture for 2 years and honestly it's been giving me sleeping problems.
    Thanks!

    It works. Thanks,
    Ioana
    "Neal Yin" <[email protected]> wrote:
    The error means your EJB is not deployed.
    Adding a EJB module to your application.xml file of the ear should fixe
    it.
    <application>
    <display-name />
    <module>
    <web>
    <web-uri>dox_sdi.war</web-uri>
    </web>
    </module>
    <module>
    <ejb>DocumentService.jar</ejb>
    </module>
    </application>
    "Ioana Meissner" <[email protected]> wrote in message
    news:3cf640cc$[email protected]..
    I have used the following example for my own web service with EJBcomponent and SOAP
    Message Handler Chain:
    http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
    I have a deployment error:
    javax.naming.NameNotFoundException: Unable to resolve'app/ejb/DocumentService.j
    ar#DocumentService/home' Resolved: 'app/ejb'Unresolved:'DocumentService.jar#Doc
    umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
    In attachement is the ear file.
    Is there a problem in web-services.xml?
    Thanks

  • Web Services General Question

    Hi All,
    Does web services in Java mean to simply provide a SOAP container that wraps around an EJB (or even a web container)?
    If this is true, all of the work that's been done with the development of EJBs can be preserved, and other system will make calls to the SOAP container in order to get access to the web services provided.
    I'm trying to understand the big picture and slowly get into Web Services in Java.
    Thanks

    I don�t know if this answers your question, but I think that SOAP indeed can be used to expose existing EJB�s to non-Java-Systems.

  • NoClassdefFound Problem using EJB as web service client

    Hello there, I am trying to use a MDB as a web service client. The architecture,
    briefly is in the form of a java program communicating with a MDB via JMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilder to generate
    the client side classes choosing the Axis framework. When my MDB is trying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient. java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalone java
    program(no weblogic ). I tried putting the Axis.jar file as well as the relevant
    files from this jar file(JBuilder's feature) in the EJB module that is deployed,
    of no avail. Following is the classloader printed from the EJB's onMessage method
    if needed for better understanding
    weblogic.utils.classloaders.GenericClassLoader@afdd3a finder: weblogic.utils.cla
    ssloaders.MultiClassFinder@20d7479 annotation: SecurityEJBModule@
    Any help will be appreciated

    Slava, I did exactly that and it worked! I wish I had seen your reply before.
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    >
    "Santosh" <[email protected]> wrote in message news:405074c7$[email protected]..
    Hello there, I am trying to use a MDB as a web service client. Thearchitecture,
    briefly is in the form of a java program communicating with a MDB viaJMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilderto generate
    the client side classes choosing the Axis framework. When my MDB istrying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient.java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalonejava
    program(no weblogic ). I tried putting the Axis.jar file as well asthe relevant
    files from this jar file(JBuilder's feature) in the EJB module thatis deployed,
    of no avail. Following is the classloader printed from the EJB's onMessagemethod
    if needed for better understandingYou need to package all Axis jars and dependancoes into the EAR and
    refer tham
    in your ejb-jar MANIFEST.MF. If you are running weblogic 8.1, you may
    just put them
    into APP-INF/lib. Than you won't need to modify manifest.
    Hope this helps.
    Regards,
    Slava Imeshev

  • EJB vs Web Services

    I understand that when components are distributed and when they need to talk to each other, EJB is employed (Considering a web scenario). Do web services act as an alternative to EJB ? Any input on this is appreciated.
    Thanx

    Web services are not an alternative to EJB. More, they are often used together.
    Web Services is a way to access remote objects that is standard, using XML to describe contracts and language-independent. Based on web standards, they can make requests through firewalls as well.
    Web services is a good solution when you have two distant systems that want to "talk" with each other.
    In a pure web scenario, you'd rather use a servlet or EJB (using session-facade) architecture.
    /Stephane

  • Calling EJB from Web Service

    Hi Everyone.
    I have a question on calling an EJB from a Web Service.
    Is this the correct way of calling a EJB out of a web service?
    We have another implementation with the same flow, and it's not calling some of the methods, unless we add @TransactionAttribute on the mehod.
    I've read some of the articles for adding a transaction attribute, but what I do not understand is that sometimes it work without the attribute and sometimes we need to add the attribute.
    Our entry point is the web service and from there we call the local ejb methods.
    Here is the example:
    1. The Web Service
    @WebService()
    @Stateless()
    public class HouseWS {
        @EJB
        private PeopleLocal people;
         * Web service operation
        @WebMethod(operationName = "sayHallo")
        public void sayHallo() {
            //TODO write your implementation code here:
            people.doPeople();
    }2. The Local EJB
    @Local
    public interface PeopleLocal {
        public void doPeople();
    }3. The Bean
    @Stateless
    public class People implements PeopleLocal {
        public void doPeople() {
            System.out.println("do the people local bean");
        // Add business logic below. (Right-click in editor and choose
        // "Insert Code > Add Business Method")
    }

    Here is the scenario that we are struggling with.
    We go into the @WebMethod(operationName = "stepOneReconciliation") method.
    We also added @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) to the web service method. Is this necessary?
    From the web service method we call the public String stepOneReconciliation(String requestXML) in the bean.
    Web service
    @WebService()
    @Stateless()
    public class AeReconciliationWebService {
        @EJB
        private ReconciliationsLocal reconciliationsLocal;
        @WebMethod(operationName = "stepOneReconciliation")
        @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
        public String stepOneReconciliation(@WebParam(name = "requestXML")
        String requestXML) {
            return reconciliationsLocal.stepOneReconciliation(requestXML);
        @WebMethod(operationName = "stepTwoReconciliation")
        @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
        public String stepTwoReconciliation(@WebParam(name = "requestXML")
        String requestXML) {
            return reconciliationsLocal.stepTwoReconciliation(requestXML);
    The bean.
    All the facade lookups work in the first if(request.getReconType().equals(REVENUE_RECON_TYPE)) statement even though we do not add the TransactionAttributeType.NEVER, but if we go into the else if(request.getReconType().equals(REVENUE_RECON_TYPE)) the lookups doesn't work.
    We have added TransactionAttributeType.NEVER to the method and then the else if ejb lookups work.
    Why do we need to add the attributeType for the else if lookups to work?
        @EJB
        GeneralLedgerFacadeLocal generalLedgerFacadeLocal;
        @TransactionAttribute(TransactionAttributeType.NEVER)
        public String stepOneReconciliation(String requestXML) {
            String requestName = "stepOneReconciliation";
            String moduleName = "Reconciliation";
            AeReconciliationRequest request = null;
            //read in xml
            if(request.getReconType().equals(SERVICE_RECON_TYPE)) {
                ServiceRecon serviceRecon = serviceReconFacadeLocal.findGreaterThanDateTo(request.getToDate(), request.getServiceCode());
                if(serviceRecon != null) {
                    LogUtil.error("AEException", "Recon already occured for a greater date", "" + newRequestId);
                    return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_INFORMATION, null, null, null, stanley);
                } else {
                    //Find all values smaller than toDate
                    double reconAmount = 0;
                    Date toDateUtil = DateUtils.getDateFromString(request.getToDate());
                    Date fromDate = null;
                    List <ServiceRecon> serviceReconList = serviceReconFacadeLocal.findByServiceCode(request.getServiceCode());
                    if(serviceReconList != null && serviceReconList.size() > 0) {
                        fromDate = ((ServiceRecon) serviceReconList.get(0)).getReconToTs();
                        Calendar tempCal = Calendar.getInstance();
                        tempCal.setTimeInMillis(fromDate.getTime());
                        tempCal.add(Calendar.MILLISECOND, 1);
                        fromDate = tempCal.getTime();
                    List<GeneralLedger> generalLedgerList = generalLedgerFacadeLocal.findByBetweenToAndFromDateForServiceCode(request.getServiceCode(), fromDate, toDateUtil);
                    for (Iterator<GeneralLedger> it = generalLedgerList.iterator(); it.hasNext();) {
                        GeneralLedger generalLedger = it.next();
                        if (generalLedger.getAccountDebitId() != null && generalLedger.getAccountDebitId().getAccountTypeId().getCode().equals(AccountTypeStatic.TRADING.getCode()) && generalLedger.getAmount() != null) {
                            reconAmount -= generalLedger.getAmount().longValue();
                        if (generalLedger.getAccountCreditId() != null && generalLedger.getAccountCreditId().getAccountTypeId().getCode().equals(AccountTypeStatic.TRADING.getCode()) && generalLedger.getAmount() != null) {
                            reconAmount += generalLedger.getAmount().longValue();
                    return AeSystemUtils.returnReconciliation(SystemCodeUtils.SUCCESS, moduleName, new Double(reconAmount).longValue() + "", null, stanley);
            } else if(request.getReconType().equals(REVENUE_RECON_TYPE)) {
                RevenueRecon revenueRecon = revenueReconFacadeLocal.findGreaterThanDateToAndSplitRevenue(request.getToDate(), false);
                if(revenueRecon != null) {
                    LogUtil.error("AEException", "Recon already occured for a greater date", "" + newRequestId);
                    return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_INFORMATION, null, null, null, stanley);
                } else {
                    //Find all values smaller than toDate
                    double reconFeeAmount = 0;
                    double reconCommissionAmount = 0;
                    Date toDateUtil = DateUtils.getDateFromString(request.getToDate());
                    Date fromDate = null;
                    List <RevenueRecon> revenueReconList = revenueReconFacadeLocal.findBySplitFee(false);
                    if(revenueReconList != null && revenueReconList.size() > 0) {
                        fromDate = ((RevenueRecon) revenueReconList.get(0)).getReconToTs();
                        Calendar tempCal = Calendar.getInstance();
                        tempCal.setTimeInMillis(fromDate.getTime());
                        tempCal.add(Calendar.MILLISECOND, 1);
                        fromDate = tempCal.getTime();
                    Long debitFeeAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForDebitFeeAccount(fromDate, toDateUtil);
                    Long creditFeeAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForCreditFeeAccount(fromDate, toDateUtil);
                    reconFeeAmount = (creditFeeAmount-debitFeeAmount);
                    Long debitCommissionAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForDebitCommissionAccount(fromDate, toDateUtil);
                    Long creditCommissionAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForCreditCommissionAccount(fromDate, toDateUtil);
                    reconCommissionAmount = (creditCommissionAmount-debitCommissionAmount);
                    reconFeeAmount = reconFeeAmount - reconCommissionAmount;
                    return AeSystemUtils.returnReconciliation(SystemCodeUtils.SUCCESS, moduleName, new Double(reconFeeAmount).longValue() + "", null, stanley);
            } else if(request.getReconType().equals(SPLIT_REVENUE_RECON_TYPE)) {
            return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_XML_REQUEST, null, null, null, stanley);
        }

  • Web Service Security Question

    I have created a web service in the NetWeaver portal using a Portal Service.  I have marked the service as requiring basic http authentication.  However, when I call the web service from the Enterprise Portal Web Services Checker in NWDS it just let's me supply the params of the web service and no authentication.  Any ideas?
    I also noticed that my web service does not appear under the Web Services Container or Web Services Security section in Visual Administrator.  Anybody have any idea why this is?
    Thanks in advance.
    Curtis

    Hi Curtis,
    My guess is that since you are logged into the Portal while calling this web service, it will use the current session cookie to authenticate automatically. I'm not sure on the second question, tried a restart?
    Regards,
    Raj

  • Securing Web Service--Beginner question

    Hi--
    I am trying to follow the document "Securing WelbLogic Web Service 10g Release 3" and can't get past the initial steps to verify that my service has been deployed with the Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml policy
    I have a basic question.
    I add the aforementioned policy to my web service using :
    *@WebService*
    *@Policy(uri = "policy:Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml",attachToWsdl=true)*
    and then rebuild and redeploy.
    If I then access the URL for the web service with "?wsdl" apppended, shouldn't the WSDL returned now include policy information?
    Karl

    Thanks, that's what I've come to understand. Is this restiction due to the fact the the @Policy annotations are not standard or is this a limitation on the Weblogic eclipse plugin
    What I've had to due is generate the JWS from the WSDL and then go back to the bottom up approach with the generated JWS source files. A bit of a pain but what can you do.
    I tried adding the security policies as suggested by Bethune but they don't seem to "stick" after a restart of weblogic server. This may be due to running weblogic server under Eclipse. I havent had time to investigate this further
    Once again thanks all for the help
    Karl

  • Web Service/ JDBC question

    Hi,
    I have to design an automatic -and periodic- process that performs next tasks:
    1) Read Oracle table to build a XML file
    2) Connect with a Web Service and send the XML. (In the specification says that SOAP with attachments is not supported , so we have to use a "proxy J2EE client" to interact with this web service)
    3) Also this web service uses security sign with a X.509 v3 certificate in BASE64, which must be passed as a 'string' parameter when is invoked.
    I'm new in these subjects, and I need some help, my questions:
    1) Is it possible to define an automatic process with JDEVELOPER that connects to the DB, build the XML file and invoke the Web service?
    2) How could I make this proccess automatic and periodic, for example every friday.
    3) What are the tools I have to use:
    3.1.- To Connect with DB -> JDBC?
    3.2.- To Build XML, programmatically? or is there any tool?
    3.3.- To define it as a periodic proccess??
    4) Others alternatives? Is it possible to develope this directly in PL/SQL as a job in ORACLE?
    thanks in advance...

    This is what we call "Database Web Services" covered in chapter 15 of my book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html
    See also
    a) Oracle Application Server Web Services Developer’s Guide 10g Release 3 (10.1.3.x) for a complete coverage of Oracle AS Web Services Security.
    b) Calling External Web services from stored procedure (it contains an example of batch scheduling for call-out but you are looking for call-in): http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    Kuassi

  • Web service simple question

    I am using a Web Service to publish some data, and this question is, I'm sure, stemming from my limited knowledge and use of web servers.
    I am able to set up an "add" method, pass 2 numbers to the web server, and have the web server return a value. Simple. But, I am not sure what to do when I want to get the current value of something that is being updated in a loop.
    For example, let's say I have a VI like the one below, and the user wants to display the current loop iteration in their browser, not continuously, but only when they ask for it. I don't want to use this VI as the method to call. Instead, I'd rather this VI pass the current value to a VI designated only to return the numeric control value to the webserver. But, I have no idea how (or if) I can pass the iteration value to a method to be called. Does this make sense?
    I have thought about using session variables, but this requires continually writing to the session variable in my code, which probably isn't a big deal, but it would be nice if it only queried the current iteration when the user asked for it (much like 2 numbers are only added when the user asks for it in the NI example). I'm looking for a way to just return the current value, only when the user asks for it. 
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    loop.png ‏14 KB

    You'll probably want to go through more LabVIEW basics before trying this, or consider another means of communication between your VIs such as shared variables.
    A functional global variable is a VI that stores data in an uninitialized shift register.  The simplest implementation has a boolean input indicating whether to read or write, an input for data (when writing), and an output for data (when reading).  Search this forum for more information.  You will also see the term "Action Engine" which is a more sophisticated version of a functional global that implements additional actions that manipulate the data.
    The LabVIEW web server runs in its own application instance - almost a separate program.  That means it cannot directly share data with the application that hosts the web server.  VI Server is a mechanism to allow one LabVIEW instance to access VIs in another instance.  In your main program, you would store the data in a functional global variable.  In the web server, use VI Server to get access to the same functional global.  You can then run that VI remotely, within the web server instance, and read data from it.  See the help and examples for VI Server.

  • Web service basic question

    Well I am new to web services. I have a small doubt. We are trying to develop a tool which uses web service that standards the communication between my tool and different surveillance
    systems.
    What my tools should do is, it needs to get data from different surveillance
    system using common API.
    My first question is
    1) Should I implement a web service or a client. I guess the answer should be, implement a client. if so, should I make my WSDL public and tell them and if you want to provide me the data you have implement a web service definition corresponding to my client. I am a bit confused here. So pleeeeeeeease help. I need to submit my design to my professor by the end of the week.

    If your tool needs to be called from the surveillance systems, you could publish a web service and give the wsdl to the various surveilance systems. Then when they need to contact you they can invoke your web service.

Maybe you are looking for