Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Schedule Web services client

CglrSep 17 2013 — edited Sep 18 2013

Hi,

i want to schedule client web services for every day running on 23:00.

Code is running on Intellij editor. Client web services sends  our inventory codes.

i have linux server and i can use cron tab. but i don't know, how can run class files as scheduled. 

Parameter: KalemKart

Main class: start.ServiceClientStock

other classes:src.dao

                     src.divaStock

Code in ServiceClientStock:

public class ServiceClientStock {

  private static final String KALEM_KARTI = "KalemKart";

public static void main(String args[]) throws Exception {

        DaoOracle db = new DaoOracle();

        if(args.length==0){

            System.out.println("Enter Services Type:!");

        }else {

            if(KALEM_KARTI.equals(args[0])){

                StockObj[] stockObjs = {};

                StockObj stockObj = new StockObj();

                try {                

                    stockObjs = db.getKalemKartiObj_v2();

                } catch (Exception e) {

                    e.printStackTrace();

                }

                StockLocator divaStockLocator = new StockLocator();

                StockSoap_PortType divaStockLocatorImportSoap12 = divaStockLocator.getStockSoap12();

                StockSoap12Stub is12s = (StockSoap12Stub)divaStockLocatorImportSoap12;

                String sessionCookie = getSessionCookie();

                for(int i = 0; i < stockObjs.length; i++){

                    try {

                        is12s._setProperty("javax.xml.rpc.session.maintain",Boolean.TRUE);

                        is12s._setProperty(HTTPConstants.HEADER_COOKIE, sessionCookie);

                        System.out.println( "stockObj.getStokNo()="+stockObjs[i].getStokNo() );

                        if(stockObjs[i].getStokNo().isEmpty() ){

                            System.out.println( "No Data Found !!" );

                        } else{                        

                            String webServiceResult = is12s.addStocks(stockObjs[i]) ;

                            Integer resultStatus = db.insertLog("AddStocks",stockObjs[i].getStokNo(), webServiceResult);

                        }

                    } catch (RemoteException e) {

                        e.printStackTrace();

                    }         

                }

            }else{

                System.out.println("Wrong Services!");

            }

        }

        System.exit(0);

    }

Comments

jariola

What is you APEX version? Are APEX version same in both instances? What is that compomponent? I don't recall that in latest APEX there is that kind popup windows.
But it seems your other instance is missing some styles.

David of Earth

Versions are the same in all instances 5.1.4.00.08. This is a Popup LOV on a column in an interactive grid. I agree that it may be missing styles but how can I check that? Keep in mind the TEST instance is run time only.

InoL

... but how can I check that?
First, try another browse, not IE
Open your browser developer toolbar and reload the page. Are there any errors on missing css (or Javascript) files?

Sylvain Martel

Hello David,
Indeed, having a TEST instance read-only will be hard to figure it out. You can install the builder if you need to to temporarily debug this issue. If you want to have read-only APEX, I would recommend to do it in UAT and PROD but leave TEST with an opportunity to troubleshoot if something like this happen.
Also, while in the good news department, you might want to advise your organization to move away from Internet Explorer 11 very very soon. Microsoft is not supporting this product anymore and an APEX upgrade to 20.2 or later will not make you happy if you still use Internet Explorer...
Good luck!

fac586

I have a popup lov that works fine in our development instance but once I migrate to our test instance the popup is missing formatting and looks bad. Also, you can't tell when it's searching so it looks like it's not working. Does anyone know why this would happen. It looks fine in the development instance.
This was reported a number of times before. It is caused by the Popup LOV template not switching Internet Explorer to standards mode rendering. What would seem to have to happen here is for your Internet Explorer configuration to have enabled Compatibility View for one instance but not the other. Is that possible? Does enabling or disabling it for both resolve the problem?
There are other potential fixes but I think we need to fully understand why one environment is working and the other isn't first.
It is also worth noting the following:
As stated above Internet Explorer is completely obsolete
Support for APEX 5.1 ends this year
Popup LOVs were redesigned from the ground up in APEX 19.2
The Popup LOV template was therefore deprecated in 19.2
This system is therefore overdue for some upgrading...

David of Earth

The compatibility setting Fac586 mentioned was the issue. After removing our company url from this the popup works correctly. I am aware that IE is no longer supported but unfortunately it is still being used at our company. We use APEX in conjunction with EBS and I was told by the DBAs that EBS still needs to use IE. If this is true then Oracle should work to resolve this conflict in there applications.

Sylvain Martel

Hello David,
I think your DBA is not telling you the whole story. EBS has been compatible with other browsers for years. What the DBA need to do is convert how Forms are "displayed" on the screen, from a Java Applet to Java Web Start. Java Applets are bringing security issues that Java Web Start reduces. That way you could use Firefox or Chrome instead of IE11.
I have done it on our EBS Vision instance (R12.2.6) and it works really well. I also use a Mac so that's like a double trick!
So please challenge your DBA on this and let me know if you need support to get away from Java Applets.
Good luck!

David of Earth

What about Microsoft Edge?

Sylvain Martel

Hello David,
Yes, Microsoft Edge is supported since it is based on Chromium. Please refer to this MOS document for all the details (R12: Recommended Browsers for Oracle E-Business Suite (Doc ID 389422.1))
Section 5: Edge for Windows Users

5.1. Edge: Certification Matrixes

Oracle E-Business Suite Releases 12.2 and 12.1 have two interfaces: a web-based (OA Framework/HTML) model for modules such as iProcurement and iStore, and Oracle Forms/Java based model for modules such as Oracle Financials.

Summary
Edge is certified for Oracle E-Business Suite customers running web-based (HTML / OA Framework) screens.
Edge is certified for running Java content using Java Web Start (JWS). Refer to My Oracle Support Knowledge Document 2188898.1, Using Java Web Start with Oracle E-Business Suite.
Edge does not support NPAPI, so is not certified for running Java content using the JRE Plug-in.
Hope this helps!

1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 16 2013
Added on Sep 17 2013
1 comment
243 views