Web Service & JNI

Hi,
I've just popped the Web Services Developer Pack onto my dev. box, worked through the samples and decided to try and connect the JAX-RPC Hello example to a C program we have here.
Set-up a standalone Jave program to get the JNI interface working and it does. Then tried to integrate with the JAX-RPC Hello example but get the following error when running the client.... O/S is Win2k, CLASSPATH looks o.k., the native DLL is on classpath, the web service can see it as it reports a different error if I remove it. Any ideas??
run:
[echo] Running the hello.HelloClient program....
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:370)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:231)
[java] at hello.HelloIF_Stub.sayHello(HelloIF_Stub.java:62)
[java] at hello.HelloClient.main(Unknown Source)
In the launcher.server.log get the following error:
java.lang.NoClassDefFoundError
     at hello.HelloImpl.sayHello(Unknown Source)
     at hello.HelloIF_Tie.invoke_sayHello(HelloIF_Tie.java:46)
     at hello.HelloIF_Tie.processingHook(HelloIF_Tie.java:107)
     at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230)
     at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:281)
     at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:376)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:518)
     at java.lang.Thread.run(Thread.java:536)
[ERROR] http - -caught throwable <java.lang.NoClassDefFoundError>

i have the same problem with jwsdp 1.1 but have no such problem with jwsdp 1.0. I tried to report it as a bug but could not get the system to accept my bug report.

Similar Messages

  • Error from JNI.ADD_OBJECT_ARG when trying to access web service

    Hi,
    I'm hoping someone can help me with this. I am very new to Java and my lack of experience is probably killing me...
    Trying to be very explicit probably caused me to create a very lengthy post..my apologies...
    My issue:
    I've created a post_database_commit trigger to access my web service (written in C# .NET). I used JDeveloper 10.3.3.1 to create the wrapper code using my WSDL file. I am receiving an error message "Unable to call out to Java, invalid object type for argument 1" when the code line 'rv := UIDItemSvcSoap12Client.addUidItem(my_object, a0);' is executed in the trigger. I do not see the reason for the error.
    Here are code excerpts:
    (Post_database_commit trigger)
    rv varchar2(1000);
    ex ora_java.jobject;
    a0 ora_java.jobject;
    my_object ORA_JAVA.jOBJECT;
    BEGIN
    my_object := UIDItemSvcSoap12Client.new() ;
    ---create args list (Varchar2 in, jobject out)
    a0 := Exception_.new(:uid_table.uid_no);
    UIDItemSvcSoap12Client.main(a0);
    rv := UIDItemSvcSoap12Client.addUidItem(my_object, a0);
    (Package spec)
    -- Method: addUidItem (Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;
    FUNCTION addUidItem(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN VARCHAR2;
    (Entire Package body created by Jdeveloper)
    PACKAGE BODY UIDItemSvcSoap12Client IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('uidwebsvcproject/proxy/UIDItemSvcSoap12Client', '()V', args));
    END;
    -- Method: main ([Ljava/lang/String;)V
    PROCEDURE main(
    a0 ORA_JAVA.JARRAY) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
    JNI.CALL_VOID_METHOD(TRUE, NULL, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: getPort ()Luidwebsvcproject/proxy/UIDItemSvcSoap;
      FUNCTION getPort(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getPort', '()Luidwebsvcproject/proxy/UIDItemSvcSoap;', args);
      END;
      -- Method: getClientTransport ()Loracle/webservices/transport/ClientTransport;
      FUNCTION getClientTransport(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getClientTransport', '()Loracle/webservices/transport/ClientTransport;', args);
      END;
      -- Method: addUidItem (Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;
      FUNCTION addUidItem(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'uidwebsvcproject/proxy/UIDItem');
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'addUidItem', '(Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;', args);
      END;
      -- Method: getEndpoint ()Ljava/lang/String;
      FUNCTION getEndpoint(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getEndpoint', '()Ljava/lang/String;', args);
      END;
      -- Method: getMaintainSession ()Z
      FUNCTION getMaintainSession(
        obj   ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getMaintainSession', '()Z', args);
      END;
      -- Method: setMaintainSession (Z)V
      PROCEDURE setMaintainSession(
        obj   ORA_JAVA.JOBJECT,
        a0    BOOLEAN) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_BOOLEAN_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setMaintainSession', '(Z)V', args);
      END;
      -- Method: setUsername (Ljava/lang/String;)V
      PROCEDURE setUsername(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setUsername', '(Ljava/lang/String;)V', args);
      END;
      -- Method: getUsername ()Ljava/lang/String;
      FUNCTION getUsername(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getUsername', '()Ljava/lang/String;', args);
      END;
      -- Method: setPassword (Ljava/lang/String;)V
      PROCEDURE setPassword(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setPassword', '(Ljava/lang/String;)V', args);
      END;
      -- Method: getPassword ()Ljava/lang/String;
      FUNCTION getPassword(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getPassword', '()Ljava/lang/String;', args);
      END;
      -- Method: setEndpoint (Ljava/lang/String;)V
      PROCEDURE setEndpoint(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setEndpoint', '(Ljava/lang/String;)V', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '(JI)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '(J)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'notifyAll', '()V', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'toString', '()Ljava/lang/String;', args);
      END;
    BEGIN
      NULL;
    END;
    (Code from JDeveloper)
        public String addUidItem(UIDItem UIDItem) throws java.rmi.RemoteException {
            return _port.addUidItem(UIDItem);
        }

    That's a network or server issue, not a problem with your Mac.

  • ORA-06502 JNI.CALL_STRING_METHOD Oracle Forms & Web Services

    Hello:
    A customer of us has been integrating Oracle Forms 10g and Web Services.
    There is a java class named WsGenQueryStub. That java class has been generated using Oracle JDeveloper.
    It implements the consume of a Web Service That class has a method named GetDat which receives 2 input parameters which are of VARCHAR2 type, containing XML text.
    This method returns an XML text string which may have more than 4000 characters .
    That class is incluedd at forms application by using the "Import Java Class" feature.
    Forms builds a package named WsGenQueryStub which includes the following funtion
    -- Method: GetData (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    FUNCTION GetData(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'Interfases/WsGenQueryStub', 'GetData', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', args);
    END;
    Forms Version is 9.0.4.0.19 , and PL/SQL version ( of forms ) is 9.0.1.5.1 , both support variables of type VARCHAR2 up to 32767 characters long
    However when the form is run the line
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'Interfases/WsGenQueryStub', 'GetData', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', args);
    gets the ORA-06502 error when the returned text is longer than 4000 characters
    I thank your answers.
    Fernando.

    Ferdo,
    could you split up the result string in chunks that don't exceed the max. length? A method exposed on the Java class to could do this and be called from Forms as long as there is data coming.
    Frank

  • How to instantiate a DOM Element in Forms to call Web Service?

    Hi All,
    I need to call a Java Class that has been converted into PL/SQL in order to run a Web Service.
    The PL/SQL function looks like this:
    -- Method: GetPIValue (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION GetPIValue(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('oracle/forms/demos/webservice/ConnectToPI');
    mid := JNI.GET_METHOD(FALSE, cls, 'GetPIValue', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    where "a0" is of org.w3c.dom.Element argument that is passed into the function as an obj_java.jobject.
    How can I create an ELEMENT object and call this function by passing this Element and its related Attributes. I have tried the following so far but I am getting this ERROR "Unable to call out to Java, Argument 1 can not be null.
    Element.setAttribute(param_1,
    'piTAG',
    'A3TI006.pv');
    It seems to be Complaining about "param_1" and it CANNOT BE NULL. How can I initialize or Create such an Object in Oracle Forms?
    Does any one have a Sample on how to Create an Element Object in PL/SQL?
    Your help is much appreciated.
    Regards,
    Baz

    Hello,
    I am sure that Jan is certainely THE expert. It would be so great if he would find time to blog a litttle bit on this topic, that generates, in fact, a lot of questions ;D
    Francois

  • Calling web service from forms..

    Forms Gurus,
    I am using this demo to call the webservice in Forms.
    http://www.oracle.com/technology/obe/obe_as_10g/deploy/callws_fromforms/forms_webservice.htm#r1
    I am using a simple button to call get the conversion rate from the web service.
    But my code is not doing anything. I used some insert statements to see where my code is failing and is as follows:
    DECLARE
    jo ora_java.jobject;
    rv ora_java.jobject;
    EX ora_java.jobject;
    v_num NUMBER;
    BEGIN
    INSERT INTO XXIPAY_WEB_TMP VALUES (111,'before',20);
    commit;
    jo:= CurrencyExchangeServiceStub.new;
    INSERT INTO XXIPAY_WEB_TMP VALUES (111,'between',20);
    commit;
    rv:= CurrencyExchangeServiceStub.getRate(jo,'USA','great britain');
    INSERT INTO XXIPAY_WEB_TMP VALUES (111,'after',20);
    commit;
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    fnd_message.set_string('Unable to call out to Java, '||ORA_JAVA.LAST_ERROR);
    fnd_message.show;
         INSERT INTO XXIPAY_WEB_TMP VALUES (111,'java_error',20);
         commit;
    WHEN ORA_JAVA.EXCEPTION_THROWN then
         EX:=ORA_JAVA.LAST_EXCEPTION;
         message(Exception_.toString(EX));
         INSERT INTO XXIPAY_WEB_TMP VALUES (111,'exception',20);
         commit;     
    END;
    After pushing the button I am getting the following values from the table:
    111 before 20
    111 java_error 20
    I am importing currencyexchangestub.class, java.lang.Float.class and java.lang.Exception.class.
    My code is failing before executing the new function.
    Where am I doing wrong? Any help is highly appreciated.
    Thanks in advance.
    Fubu

    Hey Francois,
    Everything went fine according to demo until I clicked on the button to get the conversion rate. The button is inserting the "java_error" row in the table and giving out this error:
    SoapException: faultCode=SOAP-ENV:Protocol;msg=Unsupported response content type &quot;text/html;, must be: &quot;text/xml&quot;. Response was: &lt;! DOCTYPE HTM
    I am attaching the PL/SQL package generated out of the java class. Hope this is correct:
    PACKAGE BODY CurrencyExchangeServiceStub IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    cls ORA_JAVA.JCLASS;
    fid ORA_JAVA.JFIELD;
    mid ORA_JAVA.JMETHOD;
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage1/CurrencyExchangeServiceStub');
    insert into xxipay_web_tmp values (222,'beforemethod',12);
    commit;
    mid := JNI.GET_METHOD(FALSE, cls, '<init>', '()V');
    insert into xxipay_web_tmp values (222,'aftermethod',12);
    commit;
    args := NULL;
    RETURN (JNI.NEW_OBJECT(cls, mid, args));
    END;
    PROCEDURE main(
    a0 ORA_JAVA.JARRAY) IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage1/CurrencyExchangeServiceStub');
    mid := JNI.GET_METHOD(TRUE, cls, 'main', '([Ljava/lang/String;)V');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('[Ljava/lang/String;'));
    JNI.CALL_VOID_METHOD(NULL, mid, args);
    END;
    FUNCTION getRate(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage1/CurrencyExchangeServiceStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'getRate', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Float;');
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    Please let me know where I am doing wrong.
    One more thing I would like to mention is that my form builder is on UNIX server and JDeveloper is on my local machine. So I am ftp'ing the java class and the deployed JAR file into my home directory on UNIX server in "binary" mode. And in the CLASSPATH I am mentioning my home directory,So that the java class gets picked up when I import the Java class.
    Thanks in advance,

  • Exception when calling web service from Oracle forms 10g

    Hi All,
    I am trying to integrate Oracle Forms 10g(V 10.1.2.0.2.) with Web Services.
    There is a java class named 'authenticate' which is generated using Oracle JDeveloper.
    This class is included in the forms application by using "Import Java Class" feature.
    Forms built the following funtion based on that class:
    -- Method: authenticate (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    FUNCTION authenticate(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    message('here1');
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'mypackage/AuthenticatorWebServiceServiceStub',
    'authenticate', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', args);
    message('here2');
    END;
    However when the above code is invoked it shows the message 'here1' on the form and then throws the following exception: java.lang.Exception: java.lang.ClassCastException
    Please suggest me what's wrong with the code. I appreciate your time and help.
    Thanks,
    Scott.

    My primary skill is PL/SQL but the only information I found on Oracle's site to call a web service from a 10g Form was creating a jar file and importing the java class. Since I don't want to ask our corporate IT to make changes on the UNIX box for the jar files I went a different route.
    I use UTL_HTTP.BEGIN_REQUEST to call a URL then load I load the data to a table as a CLOB since we have more than 4000 characters. Now I need to parse the XML and load it into a form. I have never done this so if there is a helpful site please let me know. I have looked at several sites but none do what I want.
    Thanks

  • Can not set up Web Service datastore using HTTPS WSDL DS 4.1

    I have been trying to configure a Web services data store to connect to an HTTPS Wsdl file
    Here is some background.
    DS Version: 14.1.1.210
    Job Server Windows 2008
    if i configure the datastore and leave the field for Keystore path empty, i get the following error:
    Error loading [https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CorporateRecruitmentSourceService&wsdl]:
    org.apache.xmlbeans.XmlException: java.io.IOException: Server returned HTTP response code: 401 for URL: https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CorporateRecruitmentSourceService&wsdl
    If i put the path C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\mds\DSJavaKeyStore.keystore for the keystone path,
    I get the following different error:
    An error ocurred while importing metadata: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CandidateService&wsdl':javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building faild: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (BODI-1111469) (BODI-1112446)
    I have recreated the DSJavaKeyStore.keystore and added in additional certificates but nothing seems to work.
    As a workaround i saved the wsdl file down to the local machine (I'm currently running designer on the job server machine)
    i can then save the web service datastore and import the wsdl function.  but at runtime I get the following error:
    There is no response for the web service <getMessageByIdentifier>. Ensure that the network, web server, and service are running
    properly. Also ensure that the service client call time out is set properly.
    I have edited the
    C:\Program Files (x86)\SAP BusinessObjects\Data Services\ext\webservice-c\axis2.xml file as follows for the sections that are listed in the documentation:
        <transportReceiver name="https" class="axis2_http_receiver">
            <parameter name="port" locked="false">6060</parameter>
            <parameter name="exposeHeaders" locked="true">false</parameter>
        </transportReceiver>
    <!-- Uncomment the following with appropriate parameters to enable the SSL transport sender.
             Also make sure that the appropriate transport receiver is enabled above.-->
        <transportSender name="https" class="axis2_http_sender">
            <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
            <parameter name="xml-declaration" insert="false"/>
        </transportSender>
        <parameter name="SERVER_CERT">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_cert.crt</parameter>
        <parameter name="KEY_FILE">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_privatekey.pem</parameter>
        <parameter name="SSL_PASSPHRASE">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_privatekey_password.txt</parameter>
    I'm not sure what i'm doing wrong.  Not much detail in the documentation on what to enter for the Keystore path in the Datastore config.
    also it is unclear if i don't have the correct certifications added to the keystore.
    Please help

    Hi Prashant,
    Please refer the below KBA related to BODI-1111469 issue in SAP Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284).
    ADAPT01664699
    An importing operation from a WSDL that has a recursive import of a schema would fail with the error:  "An error occurred while importing metadata: Unknown JNI error... (BODI-1111469)”. This issue has been fixed in this release.
    1804623 - Release Notes for SAP BusinessObjects Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284)
    https://service.sap.com/sap/support/notes/1804623
    Thanks,
    Daya

  • Base data block on a web service

    Hy,
    I need to integrate an oracle forms application with data provided from other applications (via web services), like countries, cities, users ecc.
    there is a way to base a data block (in forms web 6/10 with Java Importer) on a data returned from a web service?
    Can i base block on a PL/SQL variable, returned from java, that contains data from web service?
    Thanks at all.
    Davide

    here is a snippet:
    PROCEDURE BT_Poll IS
    || Name      : BT_Poll
    ||
    || Aufgabe   : Hier werden Bücher bestellt
    ||
    || Autor     : 05.03.2006, VOL
    || Updates   :
      R_App  SPU_Type.T_App := Init_App ('BT_Poll');
      v_list             ORA_JAVA.JARRAY;
      R_String           Const_lokal.T_CSV_Datensatz;
      E_kein_Webservice  EXCEPTION;
      PRAGMA EXCEPTION_INIT (E_kein_Webservice, -105100);
      v_Akt_Record       NUMBER;
    BEGIN
      Go_block ('Workitems');
      v_Akt_Record := Akt.Record;
      Clear_Block;
    -- user, pw, server
      v_list := BpelWorkflowClient.getAllWorkItems (
        a0    => Const_lokal.usr_Buchbesteller,
        a1    => Const_lokal.pwd_Buchbesteller,
        a2    => Const_lokal.srv_Default);
    --  v_list_laenge := ORA_JAVA.get_array_length (v_list);
      :PARAMETER.PA_ANZ_POLLS := ORA_JAVA.get_array_length (v_list);
      FOR i in 0 .. :PARAMETER.PA_ANZ_POLLS - 1
      LOOP
        :WORKITEMS.ALL := ORA_JAVA.get_String_array_element (v_list, i);
        Get_CSV_Daten (:WORKITEMS.ALL, ';', R_String);
        :WORKITEMS.Task_Titel     := R_String.Wert_01;
        :WORKITEMS.Task_ID        := R_String.Wert_02;
        :WORKITEMS.ISBN           := R_String.Wert_03;
        :WORKITEMS.Buch_Titel     := R_String.Wert_04;
        :WORKITEMS.Autoren        := R_String.Wert_05;
        :WORKITEMS.Preis          := R_String.Wert_06;
        :WORKITEMS.Bestellername  := R_String.Wert_07;
        create_record;
      END LOOP;
      Go_Record (v_Akt_Record);
      IF :PARAMETER.PA_ANZ_POLLS = 0 THEN
        go_block ('BUECHER');
      END IF;
    EXCEPTION
      WHEN E_kein_Webservice THEN
      WHEN OTHERS THEN
    END;
      FUNCTION getAllWorkItems(
        a0    VARCHAR2,
        a1    VARCHAR2,
        a2    VARCHAR2) RETURN ORA_JAVA.JARRAY IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(3);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.ADD_STRING_ARG(args, a1);
        JNI.ADD_STRING_ARG(args, a2);
        RETURN JNI.CALL_OBJECT_METHOD(TRUE, NULL, 'de/opitzconsulting/bpel/wf/client/BpelWorkflowClient', 'getAllWorkItems', '(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;', args);
      END;
    [/pre]
    the getAllWorkItems is a generated Package which wraps the workflow-webservice-method
    try it
    Gerd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do u convert any executable file to a web service

    Say i have an executable software...say something like an Optical character resolution software...or something like a dictionary software..which i normally run as an exe file..
    now how do i go about writing up java code, which allows me to convert this capability into a web service??
    Any opinion/guidance is most welcome.

    all right...we can use:
    Runtime r=System.getRuntime();
    Process p=r.exec("c:\\thatfile.exe something"); //to
    load that application...
    InuputStream in=new InputStream(p.getInputStream());
    i tried that with windows media player...replaced
    thatfile.exe withe full path of wmplayer.exe and
    something with an mpg file name...
    but all i could do was play that file..now what if i
    want to change the brightness??
    what i mean is..how do i get to know WHAT TO SEND IN
    A PROCESS'S INPUT/OUTPUT STREAM ???
    lets try a simple example..lets open up the
    notepad...and try to save a file as abc.txt with the
    content as xyz....how do we do it?With much difficulty.
    Which suggests notepad is an excellent example if you really want to do this.
    You might look at java.awt.Robot. Not sure it if will work but you can try.
    I know autoit (which you can search for on the internet) would work. You would write an autoit script and then use autoit to run the script. The script would take arguments, like "abc.txt" and "xyz.txt", and run notepad making notepad do whatever.
    A non-gui app, which notepad obviously isn't, could be controlled by streams (see java.lang.Process)
    For the right windows app using a COM interface might be better. At least in my experience figuring out how to get what you want from COM (one you didn't write) is a nightmare. But possible. A 'service' might actually need this because it might not be possible to pop a gui on some server set ups (not sure about this though.) Doing this either requires that you write JNI or find a third party tool that provides this functionality for you.
    In all of the above you need to figure out the functionality of the exe, and then write a layer that provides the specific functionality that you need to control.
    And of course none of the above has anything to do with web services but rather it is just how to control an executable.

  • Consuming Web Services in Forms9i

    Hello,
    We are currently evaluating an integration architecture that is based on consuming complex web services through Oracle Forms 9i.
    The current WS exposes up to 23 methods which would be required to be displayed on the form.
    I have read a number of articles related to the Java Importer that advises against consuming EJB's or PJC on the oracle form - written in 2001/2.
    The question then is, does the bottleneck in between Forms C code and the JNI bridge still hold true?

    perhaps you missed this step:
    --> Modify the code and add Credentials before calling the web method:
    Public
    SubMain()
    Dim
    ws As NewService1
    ws.Credentials =
    New System.Net.NetworkCredential("user name",
    "password",
    "domain name")
    MsgBox("Square
    of 2 = "& ws.Square(2))
    Dts.TaskResult = Dts.Results.Success
    End
    Sub
    Arthur
    MyBlog
    Twitter

  • Web services and forms

    I´m very new at this... I want to use a web service in an Oracle Forms9i application, I have created a stub in JDeveloper, added path to CLASSPATH and used the Java Importer in Forms to create a PL/SQL package. So far so good. Now to my problem, I dont understand how to use the PL/SQL package... The web service I want to use is http://webservices.scandinavian.net/flightstatus/FlightService.asmx?WSDL, it is a web service that returns information about flights.
    So is there anyone who knows how to use this web service?
    The PL/SQL code that was generated looks like this:
    PACKAGE FlightServiceStub /* SAS.FlightServiceStub */ IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT;
    -- Method: GetFlightStatus (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION GetFlightStatus(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT;
    END;
    PACKAGE BODY FlightServiceStub IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    cls ORA_JAVA.JCLASS;
    fid ORA_JAVA.JFIELD;
    mid ORA_JAVA.JMETHOD;
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('SAS/FlightServiceStub');
    mid := JNI.GET_METHOD(FALSE, cls, '<init>', '()V');
    args := NULL;
    RETURN (JNI.NEW_OBJECT(cls, mid, args));
    END;
    -- Method: GetFlightStatus (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION GetFlightStatus(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('SAS/FlightServiceStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'GetFlightStatus', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    BEGIN
    cls := JNI.GET_CLASS('SAS/FlightServiceStub');
    END;

    Hi Rajesh,
    The WSDL you have mentioned in your original email is not available; getting back some .NET error page:
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed
    If you can use our latest Developer Preview drop (DP4), take a look at the How-To documents [1] - How-To Develop a Web Service From a WSDL Document should help you.
    You can also take a look at the genProxy command, in chapter 16 of the User Guide [2]. Chapter 13 is also a good place to get started.
    Hope this helps,
    Eric
    [1] http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/index.html
    [2] http://download-west.oracle.com/otn_hosted_doc/ias/preview/web.1013/b14434.pdf
    Message was edited by:
    erajkovi

  • Deploying a VB dll using some web service and accessing it through java

    I'm new to Web Services Based Programming. I would like to know whether this is possible and if so has anyone tried it. I want to create a vb dll that contains the remote methods that the client will access from a java program. After going thru a lot of articles, I'm still unsure on how to do this. I found one method was to Create a VB program/dll, deploy it in a web service and create the java program that accesses by another web service.
    I'm doing this as part of my lab syllabus. The thing is My lab exercises do not state anything about the technologies that I can use to do this.
    This is all that is stated there:-
    Creation Of DLL Using VB And Deploy it in Java
    I just cant get any ideas other than deploying both the parts as web services. If anyone has Better ideas for this, I would really appreciate it.
    I dont know anything about CORBA for languages other than Java and I'm already using the servlets and EJB's in my normal life. I'm also learning the ORB based programming in java. Therefore your help will probably help me learn something new then what I know.

    Sorry I wasn't too specific in my last question.
    This is my java class calling the native method print
    //HeyWorld.java
    class HeyWorld {
    private native void print();
    public static void main(String[] args) {
    new HeyWorld().print();
    static {
    System.loadLibrary("HeyWorld");
    In this case, my C method for calling a C++ method: HelloWorld.cpp
    #include "jni.h"
    #include "stdio.h"
    #include "stdafx.h"
    #Include "HeyWorld.h" //this is where i get my function prototype
    #include "Test.h" //this is the C++ header where the print method and the Test class is
    JNIEXPORT void JNICALL
    Java_HeyWorld_print(JNIEnv *env, jobject obj)
    CTest a; //CTest is the print class I created
    a.print();
    //This is the header for Test.h
    class CTest: public CWinApp
    public:
         CTest(); //constructor
         void print(); //our method
    //And this is the implementation of the class Test.cpp
    void CTest::print()
         printf("Hey World!\n");
         return ;
    I could compile the Test.cpp, HeyWorld.cpp successfully. However when I tried to compile HeyWorld.cpp using
    cl -I<path of jdk include> -I<path of jdk include win32> -LD HeyWorld.cpp -FeHeyWorld.dll,
    the VC++ 6.0 compiler gave me this error:
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::CTest(void)"
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::print(void)"
    Thanks for the help.

  • Using SSL for Web Service Access

    Hi,
    I'm not sure if this the best forum, but this is technically a J2EE question.
    I'm using JDeveloper and OC4J. I have a java class that I'm publishing as a stateful webservice; however, the only clients will be other java routines. (I generated a WSDL file and then stubs.) This webservice has to run on a Windows 2000 box inside of OC4J. I have this done and can call it from across the network from a Linux box. This all works fine. However, I need to add security preferably by going to SSL. I can't find out how to do this. Does anyone know? Do I manually edit the generated stub files? Any chance there is some sample code somewhere?
    thanks,
    Joe Gamache

    Please look at Appendix A of the "Web Services Developer's Guide" from iAS v9.0.2 covers Oracle SOAP. The section, "Working With Oracle9 iAS SOAP
    Transport Security", covers using SSL.
    Here is a simple example with steps:
    Prerequisites
    1 . Suppose you have configured Apache to use SSL , that is
    -     Apache has a valid server certificate
    -     Apache requires the client certificate
    -     Apache has a bundle of root certificates of CA with wich it can trust client certificates
    -     Apache is in front of OC4J with mod_oc4j (9.0.2) or mod_proxy ( 1.0.2.2)
    For more information on this please refer to Oracle9i Application Server Security Guide
    2. Have a working knowledge of Oracle Wallet Manager
    Steps
    The following steps let you use an https web services client
    1.     First you need a certificate store in order to store the private key , the client X509 certificate and some trusted authorities. This store in our case is a wallet exported by Oracle Wallet Manager.
    2.     In order to generate a correct wallet you need :
    a.     Start the Oracle Wallet Manager ( OWM )
    b.     Create a new empty wallet
    c.     Generate a Certificate Signing Request (CSR )
    d.     Import the X509 certificate that the CA generated from the CSR
    e.     Import the root certificate of the CA that trusts the server certificate you would like to connect to ( that of Apache )
    f.     Export the wallet
    3.     Let's call exported_wallet the wallet that we exported from OWM , and lets put it under c:\temp . Suppose that the wallet password is camarda.
    4.     The JDK you plan to use for your client , in the extension directory ( that is $JDK_HOME/jre/lib/ext ) , must contains the following library
    a.     jcert.jar
    b.     jsse.jar
    c.     jssl-1_1.jar
    5.     Oracle SSL library use JNI in order to implement some low level encryption API , so you need a shared library usually located in $ORACLE_HOME/bin . For NT platform this library is njssl9.dll . Be sure to have this library in your path
    6.     Now given a WDSL , use the Jdeveloper wizard to generate a proxy
    7.     Modify the URL end-point from http to https
    8.     Add to the proxy the following lines of code
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\temp\\exported_wallet");
    System.setProperty("oracle.wallet.password","camarda");
    Example
    In red : modified
    In blue : added
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import org.w3c.dom.Element;
    import java.util.Vector;
    import java.util.Properties;
    import oracle.xml.parser.v2.*;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Mon May 20 14:24:48 CEST 2002
    * WSDL URL: http://26.2.197.119:8888/InterOp/Services.wsdl
    public class AnagInquireServicesEJBStub {
    public String endpoint = "https://26.2.197.119/InterOp/AnagInquireServices";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    public AnagInquireServicesEJBStub() {
    m_httpConnection = new OracleSOAPHTTPConnection();
    public Element ricercaPF(String istat1, String istat2, String codiceFiscale) throws Exception {
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\temp\\exported_wallet");
    System.setProperty("oracle.wallet.password","camarda");
    Element returnVal = null;
    URL endpointURL = new URL(endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("AnagInquireServices");
    call.setMethodName("ricercaPF");
    call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
    Vector params = new Vector();
    params.addElement(new Parameter("istat1", String.class, istat1, Constants.NS_URI_SOAP_ENC));
    params.addElement(new Parameter("istat2", String.class, istat2, Constants.NS_URI_SOAP_ENC));
    params.addElement(new Parameter("codiceFiscale", String.class, codiceFiscale, Constants.NS_URI_SOAP_ENC));
    call.setParams(params);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault()) {
    Parameter result = response.getReturnValue();
    returnVal = (Element)result.getValue();
    else {
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;
    public void setMaintainSession(boolean maintainSession) {
    m_httpConnection.setMaintainSession(maintainSession);
    public boolean getMaintainSession() {
    return m_httpConnection.getMaintainSession();
    public void setTransportProperties(Properties props) {
    m_httpConnection.setProperties(props);
    public Properties getTransportProperties() {
    return m_httpConnection.getProperties();
    public static void main( String args[] ) {
    AnagInquireServicesEJBStub a = new AnagInquireServicesEJBStub();
    try {
    XMLElement e = (XMLElement) a.ricercaPF("102030","102030","CMRGPP69M29D761K");
    e.print(System.out);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {

  • Forms 9i and Web Services.

    Hello,
    We are currently evaluating an integration architecture that is based on consuming complex web services through Oracle Forms 9i (9.0.2) / 9iAS (9.0.2) / RDBMS 9i (9.0.2....)
    The current group of WS exposes up to 23 methods which would be required to be displayed on the form. Call-outs to the Web Service have been minimised through navigation to a single form making the call and then storing the information locally.
    I have read a number of articles related to the Java Importer that advises against consuming EJB's or PJC on the oracle form - written in 2001/2.
    The question then is, does the bottleneck in between Forms C code and the JNI bridge still hold true - or have Oracle improved the issue since early 2002?
    The alternative is to create Java Stored Procedures to call-out to the Web Service, or again alternatively to use the native UTL_HTTP in the database to make the calls (but this last option seems messy - even with prior understanding of the java client).
    Does anybody have any experience with evaluating these two methods for integration or experiences that indicate one method over the other.
    The early phase will only have a usage of 15 - 20 clients, but near term is 500.

    Hi,
    the current impact that runtime processes have when calling out to the Java importer is that you implicitly launch one VM per user on the server which has a price in terms of memory required.
    This gets addressed ion the first patch set of the upcoming OracleAS Forms Services 10g release where different Forms runtime processes can be configured to share the same VM thus reducing the memory requirement.
    I suggest to use the Java Importer and then later move to OracleAS Forms Services when it gets available. All you need to do then, beside of configuring the shared VMs, is to reimport the Java classes used in the form.
    check
    http://otn.oracle.com/products/forms/pdf/formsj2ee_business.pdf
    The Forms9i demos contain a Webservices example using teh Java Importer
    http://download.oracle.com/otn/other/general/forms9iDemos9_0_0_1.zip
    Fran

  • DII client for accessing a document style web service

    Hi All,
    I try to access a document style web service using DII JAX-RPC client and used the wscompile tool to produce wrapper classes .
    The following code I used for my work:
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import java.net.URL;
    import nutrient.*;
    public class NuDII{
    private static String endpoint =
    "http://www.strikeiron.com/webservices/usdadata.asmx?wsdl";
    private static String qnameService = "USDAData";
    private static String qnamePort = "USDADataSoap";
    private static String BODY_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static String ENCODING_STYLE_PROPERTY =
    "javax.xml.rpc.encodingstyle.namespace.uri";
    private static String NS_XSD =
    "http://www.w3.org/2001/XMLSchema";
    private static String URI_ENCODING =
    "http://schemas.xmlsoap.org/soap/encoding/";
    private static String TYPE_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static QName returnType = new QName(NS_XSD, "string");
    public static void main(String[] args) {
    try {
    ServiceFactory factory = ServiceFactory.newInstance();
    Service service = factory.createService(new QName(BODY_NAMESPACE_VALUE,qnameService));
    QName port = new QName(BODY_NAMESPACE_VALUE,qnamePort);
    QName operation = new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription");
    Call call = service.createCall(port,operation);
    call.setTargetEndpointAddress(endpoint);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://www.strikeiron.com/SearchFoodByDescription");
    call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
    QName REQUEST_QNAME = new QName(TYPE_NAMESPACE_VALUE,"SearchFoodByDescription");
    QName RESPONSE_QNAME = new QName(TYPE_NAMESPACE_VALUE, "SearchFoodByDescriptionResponse");
    call.setReturnType(RESPONSE_QNAME, nutrient.SearchFoodByDescriptionResponse.class);
    //call.setReturnType(stringArray);
    call.setOperationName(new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription"));
    call.addParameter("FoodKeywords", REQUEST_QNAME,nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    call.addParameter("FoodGroupCode", REQUEST_QNAME, nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    SearchFoodByDescription sfd = new SearchFoodByDescription("BabyFoods","1900");
    //Object[] params = new Object[2];
    //params[0]= new String("BabyFoods");
    //params[1]= new String("1900");try
    Object[] params = {sfd};
    Object result = call.invoke(params);
    System.out.println(result);
    } catch (Exception ex) {
    ex.printStackTrace();
    when I start to execute the client I got the following error:
    java.rmi.RemoteException: Server was unable to process request. --> Object refer
    ence not set to an instance of an object.
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:462)
    at NuDII.main(NuDII.java:68)
    Shall any body assist me to solve problem.

    you may have a little better luck in the JNI forum.

Maybe you are looking for