Calling SOAP From JavaFX

Hi to all,
Is there any way to Calling SOAP From JavaFX? How?
Thanks in advance.

I am not sure about SOAP, but you can use REST-based web services with Javafx.

Similar Messages

  • Calling applications from javafx

    hi,
    how to call other application such as winamp, firefox, etc from javafx.

    Have a look at the documentation of java.lang.ProcessBuilder [http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html]
    General pointer for processes in Java:
    - you DO need to consume the content of the standard output and error output (if any) in order for your app to execute correctly.
    - "consuming" means empting their content (getting rid of it, saving it to a log, exporting it to the GUI, whatever). Can be done in separate Thread or task (see FX pointers below).
    - standard ouput stream is returned by getInputStream() in the Process class (I know the name is misleading but from Java's point of view, the process' output is an input stream).
    - error ouput stream is returned by getErrorStream() in the Process class (same)
    Pointers for processes in JavaFX:
    - use javafx.async.JavaTaskBase and javafx.async.RunnableFuture to create an async FX task to start & launch the process and to consume its streams.

  • Calling javascript from JavaFX

    This is well documented, yet I am having trouble communicating with JavaScript from JavaFX. The relevant snippet is:
    WebView wv = new WebView();
    WebEngine we = wv.getEngine();
    String content = FileUtils.readFileToString(new File("test.html"));
    we.loadContent(content);
    we.executeScript("changeBackground();");Which reads the following content:
    test.html:
    <html>
    <body>
    <script type="text/javascript">
    document.bgColor = "#cccccc";
    function changeBackground()
      document.bgColor = "#ff0000";
    </script>
    </body>
    </html>giving error:
    netscape.javascript.JSException: ReferenceError: Can't find variable: changeBackground
         at com.sun.webpane.platform.WebPage.twkExecuteScript(Native Method)
         at com.sun.webpane.platform.WebPage.executeScript(WebPage.java:1438)
         at javafx.scene.web.WebEngine.executeScript(WebEngine.java:811)
         at com.javainc.tmi.WebTest.init(WebTest.java:30)
         at com.javainc.tmi.WebTest.start(WebTest.java:44)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
         at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
         at java.lang.Thread.run(Unknown Source)I've tried it without the semi colons at the end as well as every permutation I can think of.
    When I remove the executeScript code, the webview displays and turns the screen grey as it should.
    Is this a bug or am I missing something obvious?
    I am using 64 bit jdk1.7.0_09 on Windows 7.
    - Pat

    The document loads into the WebEngine asynchronously.
    You have to wait for it to finish loading before you try to run a script on it.
    For example, you can listen to the document property:
    we.documentProperty().addListener(new ChangeListener<Document>() {
      @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
        if (newDoc != null) {
          we.documentProperty().removeListener(this);
          we.executeScript("changeBackground();");
    });Or you could grab the WebEngine's LoadWorker and listen for it's state change.
    Some shorthand where you provide the load or loadContent method with a CallBack to be executed in the event of a successful page load might be convenient, so you could file a request in jira if you'd like that, but the listener methods work ok too.
    Full executable example (using your test.html):
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.web.WebEngine;
    import javafx.scene.web.WebView;
    import javafx.stage.Stage;
    import org.w3c.dom.Document;
    import java.io.*;
    public class ScriptExecutive extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(final Stage stage) {
        final WebView wv = new WebView();
        final WebEngine we = wv.getEngine();
        we.documentProperty().addListener(new ChangeListener<Document>() {
          @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
            if (newDoc != null) {
              we.documentProperty().removeListener(this);
              we.executeScript("changeBackground();");
        String content = FileUtils.readFileToString(new File("test.html"));
        we.loadContent(content);
        stage.setScene(new Scene(wv));
        stage.show();
      static class FileUtils {
        public static String readFileToString(File file) {
          try {
            StringBuilder builder = new StringBuilder();
            String line;
            BufferedReader reader = new BufferedReader(new FileReader(file));
            while ((line = reader.readLine()) != null) builder.append(line);
            return builder.toString();
          } catch (FileNotFoundException e) {
            System.out.println("Cannot find: " + file);
            return "";
          } catch (IOException e) {
            System.out.println("Oh snap, it broke: " + e);
            return "";
    }

  • Calling javahelp from javafx

    I have JavaHelp accessed from a Java application. I am moving the application to JavaFX. I have tried rewriting the code I have but cannot make it work.
    Does anyone have a working example?

    The following code compiles but gives a runtime error on the HelpSet line. It doesn't like the null which appears to ask to system to find the default classloader.
    public class myHelp {
    static public HelpBroker startJavaHelp()
    HelpBroker hb = null ;
         URL url = null;
    try
         {   url = new URL("file://help/help.hs");
    HelpSet hs = new HelpSet(null,url);
    hb = hs.createHelpBroker();
    System.out.println("created help broker");
         catch(Exception e)
         {   e.printStackTrace();
    System.out.println("Url error here " + url);
         return hb ;
    I can use ClassLoader instead but cannot determine what to load.
    static public HelpBroker startJavaHelp()
    HelpBroker hb = null ;
         URL url = null;
    String helpHS = "help/help.hs";
    ClassLoader cl = ecowand.Main.class.getClassLoader();
    try
         {   url = HelpSet.findHelpSet(cl, helpHS);
    HelpSet hs = new HelpSet(null,url);
    hb = hs.createHelpBroker();
         catch(Exception e)
         {   e.printStackTrace();
    System.out.println("Url error here " + url);
         return hb;
    The line
    ClassLoader cl = ecowand.Main.class.getClassLoader();
    flags an error in netbeans. It appears to only want .java file here, not .fx
    In my fx program, I call startJavaHelp() on startup, the idea being that this would give me the required HelpBroker that I could use, somehow, in the action when the Help button is pressed.
    bye

  • How to call PERL Scripts from JavaFX?

    Hi to all,
    Does any one knows how to call a perl script with or without parameters from JavaFX?
    Thanks in advance.
    Kind Regards.

    If I need to pass some parameters to the perl script, how I do so?
    java.lang.Runtime.getRuntime().exec(['cmd', '/c', 'start',  "c:\\helloperl.pl"]);
    What's   'cmd', '/c', 'start'
    The cmd stands for command prompt from xp and prior and /c is stands for the command to be passed to command promt.
    I don't have good experience of perl but if it's like java then you can pass the parameter like this
    java.lang.Runtime.getRuntime().exec(['cmd', '/c', 'start',  "c:\\helloperl.pl param1 param2"]); Thanks,
    narayan

  • Web Service (SOAP) From Oracle Forms

    From the exaples of calling web services (soap) from pl/sql, it seems very poor and troublesome. I've seen a few articles with good points about why not to do this from pl/sql. So, I was hoping someone in the forums could share their opinions and approaches to using web services from forms based applications. I would ideally like to hear reasons people chose not to use pl/sql.

    There are some examples of calling web services from forms on the Forms OTN page - works fine although I would encourage the use of the new JVM pooling features as this will aid scalability and performance.
    Regards
    Grant Ronald
    Forms Product Management

  • Error when calling SOAP Runtime functions

    Hi Guys,
    I have a requirement in which i have to consume a webservice and get a response from it but when i consumed the web service and tried to test it i got the below error please let me know solution for this as it is very urgent and also i am very new to web services stuff
    Error when calling SOAP Runtime functions: SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response: ICM_HTTP_CONNECTION_FAILED")
    Thanks
    shivraj

    Hi,
    Have a look at this blog from Michal Krawczyk to find a solution:
    The specified item was not found.
    Hope this helps,
    Grzegorz

  • Call OSB from java client

    Hi',
    I am trying to call OSB from java client,
    The OSB proxy Service type is "WSDL Web Service", I am able to get response from SOAP UI with below request, Please help me with Java code,
    I have been Googling a lot for this however didnt got enough.
    Thanks
    Yatan
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://core.xxx.com/schema/ServiceHeader/V1.0" xmlns:v11="http://core.xxx.com/schema/Customer/V1.0" xmlns:v12="http://core.xxx.com/schema/Customer/V1.0">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>weblogic</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome1</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    <v1:GMWSHeader>
    <v1:SourceId>String</v1:SourceId>
    <v1:TransactionId>String</v1:TransactionId>
    <v1:TransactionTimeStamp>1967-08-13</v1:TransactionTimeStamp>
    <v1:ServiceVersion>LATEST</v1:ServiceVersion>
    </v1:GMWSHeader>
    </soapenv:Header>
    <soapenv:Body>
    <v11:GetDetailsRequest>
    <v11:Condition>
    <v12:SellingSource>?</v12:SellingSource>
    <v12:FulfillingFCNNbr>?</v12:FulfillingFCNNbr>
    </v11:Condition>
    </v11:GetDetailsRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    Thanks Guys, I tried the ways you mentioned I am getting below error, this error is coming in both weblogic clientgen and webservice proxy from jdeveloper,
    I understand that this error has something to do with my process however not sure why is it coming, I will really appreciate if you can provide me some pointers.
    error:
    Buildfile: C:\JDeveloper\OSBClient\TestOSBClient\build.xml
    javaFromWSDL:
    [clientgen]
    *********** jax-ws clientgen attribute settings ***************
    wsdlURI: http://localhost:8001/xx/som/contracts/CustomerContract?wsdl
    packageName : com.osb.client
    destDir : C:\OSB
    *********** jax-ws clientgen attribute settings end ***************
    [clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
    [clientgen] parsing WSDL...
    [clientgen]
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.SOMMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "SOMMessage" is generated from here.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "TaskCompletionMessage" is generated from here.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    BUILD FAILED
    weblogic.wsee.tools.WsBuildException: Error running JAX-WS clientgen: null
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:175)
         at weblogic.wsee.tools.anttasks.ClientGenFacadeTask.execute(ClientGenFacadeTask.java:244)
         at weblogic.wsee.tools.anttasks.ClientGenTask.execute(ClientGenTask.java:365)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatinxxethodAccessorImpl.invoke(DelegatinxxethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.Main.start(Main.java:179)
         at org.apache.tools.ant.Main.main(Main.java:268)
    Caused by: Error starting wsimport:
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:757)
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:169)
         ... 19 more
    Caused by: com.sun.tools.ws.wscompile.AbortException
         at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:136)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2255)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:194)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:140)
         at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:261)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:203)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:188)
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:738)
         ... 20 more
    Total time: 3 seconds

  • AppleScript Call Soap Data types

    I am using AppleScript to issue SOAP requests via built-in the 'call soap' function. The server to which I am connecting uses both simple and complex data types. It's pretty straight forward issuing the basic parameters for simple data types, but if the remote method requires a complex data type, such as a double set of parameters, I can't see how to get it done.
    Anyone have any experience sending SOAP requests with AppleScript that involved complex data types, which include multiple parameters, rather than just simple flat parameter lists?

    Hi,
    not exactly sure what you mean by placeholder data types?
    Surely it would be better to evaluate off a sample employee/departments or predefined database schema if you want to see what the UI / design process is like?
    The design process is very smooth and elegant in JDev 11g if you use the business components from tables wizard in the model and then design pages.
    Brenden

  • Error when calling SOAP Runtime functions - Please help!

    Hi,
    Very new to SAP. I just installed SAPNW7.0ABAPTrialSP12 (sandbox server, with default options) and setup the
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/db/7c623cf568896be10000000a11405a/content.htm">Flight Data</a>.
    I wanted to invoke some of the Flight Data functions through SOAP. So I invoked the following URL:
    http://localhost:8000/sap/bc/srt/rfc/sap/BAPI_FLIGHT_GETDETAIL?sap-client=000&wsdl=1.1
    I get the following error:
      The following error text was processed in the system NSP : Error when calling SOAP Runtime functions
    The error occurred on the application server hs_NSP_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
          Method: HANDLE_REQUEST of program CL_SOAP_TRANSPORT_EXTENSN_ROOTCP
          Method: HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
          Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
          Module: %_HTTP_START of program SAPMHTTP
    FROM Runtime Error Log:
    Runtime Errors                     UNCAUGHT_EXCEPTION                                                          
    Exception                          CX_SOAP_CORE
           Termination occurred in the ABAP program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCP" -                
               in "HANDLE_REQUEST".                                                                               
    The main program was "SAPMHTTP ".                                                                               
    In the source code you have the termination point in line 37                                 
              of the (Include) program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCM004".
    Does anyone have any ideas on what is going on? Thanks in advance.

    Hi,
    Have a look at this blog from Michal Krawczyk to find a solution:
    The specified item was not found.
    Hope this helps,
    Grzegorz

  • Calling Webservice from Adobe form - Webservice URL  Issue

    Dear Friends,
      I have developed a webservice and calling it from an Adobe form. I have downloaded the WSDL file from tcode SOAMANAGER. When I create a data connection from the Adobe form  I use this WSDL file and the form elements gets created automatically and I drag and drop them into the form. The issue is when I click on the Submit(Execute) button the Webservice URL is always pointed to the client from where the file was downloaded and its hard-coded ( for example if i download the wsdl file from client 300 then the URL would be http://<location>/sap/bc/srt/rfc/sap/z_web_getmat/300/z_web_getmat/z_web_getmat). So if i execute the form from client 200 its not working. How to make this URL dynamic so that the webservice gets executed from the client from where this form is called. Please advice.
    Regards
    Sapient

    Hi,
    You have to handle it in your form on submit button calling the web service:
    Write below java script code at submit event to change the URL at run time:
    var tempsoapAddress = xfa.connectionSet.DataConnection.getElement("soapAddress").value;
    var tempwsdladdress = xfa.connectionSet.DataConnection.getElement("wsdlAddress").value;
    var ServerPath = body.systemConfig.system.rawValue;
    var client = <Get Client from a data attribute>
    var Soap_PreServerPort =  "http://";
    var Soap_PostServerPort =  "/sap/bc/soap/rfc?sap-client=";
    var SoapAddress = Soap_PreServerPort + ServerPath + Soap_PostServerPort + client ;
    var Wsdl_PreServerPort =  "http://";
    var Wsdl_PostServerPort1 =  "/sap/bc/soap/wsdl11?services=ZBAPI_PO_CREATE2&amp;sap-client=";
    var wsdlAddress =  Wsdl_PreServerPort + ServerPath + Wsdl_PostServerPort1 + client ;
    xfa.connectionSet.DataConnection.getElement("soapAddress").value = SoapAddress;
    xfa.connectionSet.DataConnection.getElement("wsdlAddress").value = wsdlAddress;
    xfa.connectionSet.DataConnection.execute(0);
    xfa.connectionSet.DataConnection.getElement("soapAddress").value = tempsoapAddress;
    xfa.connectionSet.DataConnection.getElement("wsdlAddress").value = tempwsdladdress;
    xfa.connectionSet.DataConnection = null;
    Change the variable wsdlAddress as per your requirement. The above code is just a sample.
    For getting the client pass it in a datasource variable attribute at time of downloading the form. At time of submit get the value of that variable and use it to form the url.
    Regards,
    Vaibhav

  • Calling BDC from Java using JCO

    Hello Everyone,
    Is it possible to call a BDC from Java program using JCO ?

    Are you serious with that question? Did you try to build the web service client before? Because this is exactly the same. Try to find "building web service clients" instead "Calling BPEL from java". By default (probably) every BPEL process has both WSIF and SOAP end points, just use correct WSDL address.

  • How do I run a JCA adapter when I am calling it from an EJB?

    How do I run a JCA adapter when I am calling it from an EJB? Do I need to create an EJB client and place it in a Client container? If my EJB and JCA adapter are deployed is there a way to call my EJB from the command line?
    Mike

    Hi. When you look at the code I provided for you in other thread you will see that connecting to adapter is done through JNDI lookup. The creation of the adapter is done in your J2EE server. Here is some code for you where you can find mapping from code to ejb-jar and orion-ejb-jar.
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
    version="2.1">
    <!--
    This file declares the interface (needs/promises) of the message-driven bean.
    The MDB requires:
    - a JMS queue (to receive messages from the client),
    - a JMS exception queue (to send undeliverable messages back to the source), and
    - a connection factory (to communicate with a JMS resource provider).
    Note that communication with the resource provider may be (and for this
    application is) via a JMS Connector rather than direct.
    -->
    <display-name>JMS Consume MDB - opp-ifs</display-name>
    <enterprise-beans>
    <entity>
    <description>Entity Bean ( BMP )</description>
    <display-name>EBEjbMecomsIFS</display-name>
    <ejb-name>EBEjbMecomsIFS</ejb-name>
    <local-home>EBEjbMecomsIFSLocalHome</local-home>
    <local>EBEjbMecomsIFSLocal</local>
    <ejb-class>EBEjbMecomsIFSBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>false</reentrant>
    <service-ref>
    <service-ref-name>service/interceptor</service-ref-name>
    <service-interface>javax.xml.rpc.Service</service-interface>
    <wsdl-file>META-INF/wsdl/MHS5_Jms_In_RS.wsdl</wsdl-file>
    <service-qname xmlns:ns="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5">ns:ESB_MHS5_Jms_In_RS_Service</service-qname>
    </service-ref>
    </entity>
    <message-driven>
    <display-name>JMS Consume MDB - MDB</display-name>
    <ejb-name>MDBEjbMecomsIFS</ejb-name>
    <!-- name of bean in deployment descriptor (including orion-ejb-jar.xml file) -->
    <ejb-class>MDBEjbMecomsIFSBean</ejb-class>
    <!-- bean's fully qualified Java class name -->
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    <!-- allow incoming messages to be included in transactions -->
    <!-- The ejb requires a connection factory to access an external resource (JMS). -->
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/EBEjbopp_ifs</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>EBEjbMecomsIFSLocalHome</local-home>
    <local>EBEjbMecomsIFSLocal</local>
    <ejb-link>EBEjbMecomsIFS</ejb-link>
    </ejb-local-ref>
    <resource-ref>
    <!-- The resource's connection factory must be accessible at jndi location "java:comp/env/jms/QueueConnectionFactory". -->
    <res-ref-name>jms/QueueConnectionFactory</res-ref-name>
    <!-- The resource's connection factory must implement the "javax.jms.ConnectionFactory" interface. -->
    <res-type>javax.jms.ConnectionFactory</res-type>
    <!-- container managed authorization -->
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <!--
    Declare that a global transaction is required when the onMessage method of the ejb named
    "MDBEjbName" is called. This will cause the app server to automatically initiate a
    global (XA) transaction before calling onMessage (actually, before even receiving the JMS
    message that triggers onMessage) and end the transaction after onMessage returns. The
    JMS Connector will automatically rollback the transaction if onMessage throws an
    exception. onMessage may also set the transaction to be "rollback only".
    Participating in global transactions requires that the connection factory provided in the
    activation spec (see the ConnectionFactoryJndiName property earlier in this file) must be
    XA-capable (it must implement the javax.jms.XAConnectionFactory interface).
    If this declaration is ommitted, then onMethod will not be part of any global
    transaction. In that case the connection factory provided in the activation spec must
    implement the javax.jms.ConnectionFactory interface.
    -->
    <container-transaction>
    <method>
    <ejb-name>MDBEjbMecomsIFS</ejb-name>
    <method-name>onMessage</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>EBEjbMecomsIFS</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    orion-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNameSpaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/orion-ejb-jar-10_0.xsd">
    <enterprise-beans>
    <entity-deployment name="EBEjbMecomsIFS">
    <service-ref-mapping name="service/interceptor">
    <wsdl-location>http://on-poc62.ontw.alfa.local:7777/event/PilotOWSM/MustHavesScenario5/MHS5_Jms_In_RS?wsdl</wsdl-location>
    <service-qname localpart="ESB_MHS5_Jms_In_RS_Service" namespaceURI="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5"/>
    <port-info>
    <wsdl-port namespaceURI="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5"
    localpart="__soap_MHS5_Jms_In_RS_execute_ppt"/>
    <service-endpoint-interface>javax.xml.rpc.Service</service-endpoint-interface>
    <call-property>
    <name>javax.xml.rpc.service.endpoint.address</name>
    <value>http://on-poc62.ontw.alfa.local:7777/event/PilotOWSM/MustHavesScenario5/MHS5_Jms_In_RS</value>
    </call-property>
    <call-property>
    <name>javax.xml.rpc.soap.http.soapaction.uri</name>
    <value>execute</value>
    </call-property>
    <call-property>
    <name>javax.xml.rpc.soap.http.soapaction.use</name>
    <value>true</value>
    </call-property>
    <call-property>
    <name>javax.xml.rpc.soap.operation.style</name>
    <value>document</value>
    </call-property>
    <runtime enabled="owsm">
    <owsm init-home="/oracle/product/SoaAs/10.1.3/owsm/config/interceptors/C0003002"
    init-file="confluent.properties"/>
    </runtime>
    </port-info>
    </service-ref-mapping>
    </entity-deployment>
    <message-driven-deployment name="MDBEjbMecomsIFS"
    resource-adapter="OEMSJMSDRAopp-ifs"
    enabled="true" max-instances="10">
    <!--
    The ejb requires a connection factory implementing the "javax.jms.XAConnectionFactory"
    interface to be accessible at jndi location "java:comp/env/jms/QueueConnectionFactory". (see ejb-jar.xml and ....)
    A suitable connection factory is already accessible at jndi location "OEMSJMSDRASubcontext/MyXACF" (see oc4j-ra.xml)
    -->
    <resource-ref-mapping location="OEMSJMSDRASubopp-ifs/MyXACF"
    name="jms/QueueConnectionFactory"/>
    <!-- don't misspell this or you'll get an RP CF which doesn't work -->
    <!-- Required activation-spec properties. -->
    <!--
    ConnectionFactoryJndiName (string, no default)
    This should be the JNDI location of an RA connection factory.
    The JMS Connector will use this connection factory to create the JMS
    connection it uses to receive messages for this MDB's onMessage. If the
    exception queue is enabled (see UseExceptionQueue), the JMS Connector will
    also use a connection created from this connection factory for the production
    of messages to the exception queue.
    This connection factory must be compatible with the message domain(s). (For
    example, if the MDB is receiving messages from a queue, the connection
    factory should implement javax.jms.[XA]QueueConnectionFactory or
    javx.jms.[XA]ConnectionFactory.)
    For XA/non-XA considerations, see the <container-transaction> comments later
    in this file.
    -->
    <config-property>
    <config-property-name>ConnectionFactoryJndiName</config-property-name>
    <config-property-value>OEMSJMSDRASubopp-ifs/MyXAQCF</config-property-value>
    </config-property>
    <!--
    DestinationName (string, no default)
    This is JNDI location of the queue or topic from which messages to be
    delivered to the MDB's onMessage method should be received.
    The JNDI locations for RA destinations are defined in the
    oc4j-connectors.xml file.
    -->
    <config-property>
    <config-property-name>DestinationName</config-property-name>
    <config-property-value>OEMSJMSDRASubopp-ifs/MyQ</config-property-value>
    </config-property>
    <!--
    DestinationType (string, no default)
    This must be set to the type of the destination named by the above
    "DestinationName" property.
    The EJB 2.1 spec states that this must be set to either javax.jms.Queue or
    javax.jms.Topic. OracleGJRA also allows it to be set to
    javax.jms.Destination (which works for both queues and topics).
    -->
    <config-property>
    <config-property-name>DestinationType</config-property-name>
    <config-property-value>javax.jms.Queue</config-property-value>
    </config-property>
    <!--
    Other activation-spec properties.
    The following activation-spec properties supported by OracleGJRA are optional
    except where otherwise noted:
    -->
    <!--
    ListenerThreadMaxPollInterval (milliseconds, 5000)
    Listener threads "poll" to see if there is a message waiting to be processed.
    The more frequently this polling is performed, the faster (on average) a given
    listener thread can respond to a new message. The price for frequent polling is
    overhead - the resource provider must process a receive request each time it is
    polled.
    Oracle's JMS Connector implementation applies an adaptive algorithm which
    uses shorter polling intervals (high polling rates) during periods of activity
    (once activity is noticed) and longer polling intervals (lower polling rates)
    during periods of inactivity. The ListenerThreadMaxPollInterval property places
    an upper limit on the polling interval used by this adaptive algorithm.
    -->
    <config-property>
    <config-property-name>ListenerThreadMaxPollInterval</config-property-name>
    <config-property-value>5000</config-property-value>
    </config-property>
    <!--
    AcknowledgeMode (string, default = Auto-acknowledge)
    This should be set to Auto-acknowledge or Dups-ok-acknowledge. This
    controls the quality-of-service provided by listener threads which
    consume messages and call the MDB's onMessage method.
    MessageSelector (string, default = no message filtering)
    This is the selector expression used to filter messages sent to the
    MDB's onMessage method. (I.e., this is used as the messageSelector for
    the JMS sessions created for the listener threads.)
    SubscriptionDurability (string, default = NonDurable)
    For topics this should be set to Durable or NonDurable. (This should
    not be set for queues.) This controls the durability of the topic
    consumer used by the listener thread. When SubscriptionDurability is
    set to Durable (and DestinationType is javax.jms.Topic or
    javax.jms.Destination), the SubscriptionName property is required.
    SubscriptionName (string, no default)
    This property is required when SubscriptionDurability is Durable (and
    DestinationType is javax.jms.Topic or javax.jms.Destination). (In all
    other cases it is ignored.) This is the name used when creating the
    durable subscriber used by the listener thread. For a given JMS server,
    a given subscription name should be assigned to at most one MDB (which
    must have most one listener thread).
    ClientId (string, no default)
    If set, connection(s) used by the listener threads will be set to use
    this client ID.
    TransactionTimeout (milliseconds, default = 300,000)
    This limits the amount of time that the JMS Connector will wait for a
    message to arrive before exiting the current transaction. The
    transaction manager limits the amount of time a transaction can last
    (see transaction-timeout in transaction-manager.xml).
    TransactionTimeout should be set such that the transaction manager will
    not timeout the transaction during the onMessage routine unless
    something is wrong. For example, If the transaction mananager timeout
    is set to 30 seconds, and the onMessage routine will never take more
    than 10 seconds unless something is wrong, then this property could be
    set to 20 seconds (20000 milliseconds).
    EndpointFailureRetryInterval (milliseconds, default = 60,000)
    If an endpoint can not be processed (due to the app server WorkManager
    not accepting new work), it will be scheduled to be retried this many
    milliseconds later.
    ReceiverThreads (integer, default = 1)
    This sets the maximum number of listener threads to create for this
    endpoint. For queues, using more than one thread may be useful in
    increasing the rate at which messages can be consumed. For topics this
    value should always be 1. (Each listener thread gets its own session
    and TopicSubscriber. For durable subscribers it would be an error to
    have more than one subscriber with the same subscription name. For
    nondurable subscribers having more than one thread will not help because
    more threads translates into more subscribers which translates into more
    copies of each message.) See also: ListenerThreadMinBusyDuration
    UseExceptionQueue (boolean, default = false)
    When "UseExceptionQueue" is true:
    - Messages that would otherwise be discarded are sent to the
    exception queue. (Currently the only case where this happens is
    when the max delivery count is exceeded. See MaxDeliveryCnt
    property.) Rather than sending the original message directly to
    the exception queue, the following procedure is used:
    o Create a new message of the same type.
    o Copy the properties and body from the original message to the
    new message.
    o If the headers were copied, sending the message to the
    exception queue would cause most of them to be lost
    (over-written by the resource-provider). So instead,
    translate headers in the original to properties in the copy,
    assigning each header obtained via "getJMS{Header}" to
    property "GJRA_CopyOfJMS{Header}". Since
    javax.jms.Destination is not a valid property type, translate
    destination headers into descriptive messages.
    (Currently this same service is not provided for JMSX*
    properties, most notably the JMSXDeliveryCount property.)
    o If some part of the copy process (above) or augmentation
    process (below) fails, do not abort. Attempt to complete the
    rest of the procedure. (For Bytes/Map/Stream message types,
    this can mean that part of the body is copied and the rest is
    not.)
    o If the copy process is 100% successful, add a boolean property
    called "GJRA_CopySuccessful" with the value "true".
    o Add a string property called "GJRA_DeliveryFailureReason" which
    indicates why the message was not delivered.
    o If the MDB onMessage method generated an exception immediately
    prior to the delivery failure, add a string property called
    "GJRA_onMessageExceptions" which contains exception information.
    o Send the resulting message to the exception queue.
    Note that only one attempt is made to send the message to the
    exception queue. Should this attempt fail, the message will
    be discarded without being placed in the exception queue.
    See IncludeBodiesInExceptionQueue property for potential variations
    of the above procedure.
    - The ExceptionQueueName property is required.
    - In addition to being used for the primary destination, the
    connection factory specified by the ConnectionFactoryJndiName
    property will also be used for the exception queue. If the primary
    destination (specified by the DestinationName property) is a topic,
    then the connection factory must support both queues and topics.
    (I.e., the <connectionfactory-interface> [see oc4j-ra.xml] for the
    given connection factory must be either javax.jms.ConnectionFactory
    or javax.jms.XAConnectionFactory.)
    ExceptionQueueName (string, no default)
    This is the JNDI location of the javax.jms.Queue object to use as the
    exception queue. (See UseExceptionQueue property for information about
    the use of the exception queue.) This property is required when
    UseExceptionQueue is true, and ignored when UseExceptionQueue is false.
    IncludeBodiesInExceptionQueue (boolean, default = true)
    This controls whether or not messages sent to the exception queue will
    include a message body. (See UseExceptionQueue property for information
    about the use of the exception queue.) If many messages are sent to the
    exception queue during normal operation and the message body is of no
    use in the exception queue, then this property may be set false to
    improve performance. This property is ignored when UseExceptionQueue is
    false. There are two cases where this property does not apply:
    - If the original message did not have a message body, then the
    message sent to the exception queue will not have one either.
    - If a copy of the original message can not be created for any
    reason, then the original may be sent to the exception queue
    instead. This may result in a message body being sent to the
    exception queue.
    MaxDeliveryCnt (integer, default = 5)
    If a message has the "JMSXDeliveryCount" property and the value of that
    property is greater than MaxDeliveryCnt, then the message will be
    discarded (and not sent to onMessage). If the exception queue is
    enabled (see UseExceptionQueue), a copy of the message will be sent to
    the exception queue. If MaxDeliveryCnt is set to 0, no messages will be
    discarded. (Note that when an MDB responds to a message by throwing an
    exception, the message is not considered delivered and it may be
    redelivered. If the MDB might always respond to a given message by
    throwing an exception, and MaxDeliveryCnt is set to 0 to prevent the
    message from ever being discarded, the result may be an MDB stuck in an
    "infinite loop" - failing to process the same message over and over
    again.)
    -->
    <config-property>
    <config-property-name>MaxDeliveryCnt</config-property-name>
    <config-property-value>0</config-property-value>
    </config-property>
    <!--
    LogLevel (string, no default)
    This controls the level of detail of messages logged by the JMS
    Connector. These messages are primarily intended for debugging the
    JMS Connector itself, but may also be useful when debugging issues
    related to the use of the JMS Connector. This property should not be
    set in production code. (It should only be set temporarily for
    debugging purposes - specific log messages and log levels may be and
    will be added/removed/modified in future versions of the JMS
    Connector.) Currently the allowed values are:
    ConnectionPool
    ConnectionOps
    TransactionalOps
    ListenerThreads
    INFO
    CONFIG
    FINE
    FINER
    FINEST
    SEVERE
    WARNING
    OFF
    ListenerThreadMaxIdleDuration (milliseconds, default = 300,000)
    This is how long a listener thread which is not receiving any messages
    will be kept around. (At least one listener thread will remain as long
    as the endpoint is active.)
    ListenerThreadMinBusyDuration (milliseconds, default = 10,000)
    If a listener thread has just received a message, has not been idle (had to
    wait for a new message to arrive) at any point during the past
    ListenerThreadMinBusyDuration milliseconds, and the current number of
    listener threads for this endpoint is less than ReceiverThreads, then
    (application server willing) an additional listener thread will be created.
    ResUser (string, default = null)
    ResPassword (string, default = null)
    These properties allow a user/password to be passed to the resource
    provider. When neither of these properties are set, connections used for
    this MDB's inbound message handling (as well as for exception queue
    handling, if enabled) are created using the no-argument version of the
    create*Connection method. When one or both of these properties are set,
    they are passed to the create*Connection method as the user/password
    arguments. (If only one property is not set, then 'null' is used for that
    particular create*Connection argument.) The ResPassword property supports
    the standard password indirection options (e.g., using "->joeuser" to
    represent the password of "joeuser").
    Note that the commas used in many of the above default values and examples are
    included here for readability but can not be used in the actual activation spec.
    (I.e., integer/milliseconds values in the activation spec must not include
    embedded commas.)
    -->
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role>"
    impliesAll="true"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>

  • Calling package from java using JNDI properties

    Hi there,
    I have created an interface to transfer data from oracle to JMS XML Queue. It is inside a package and have generated a scenario.
    The scenario works well when executed from the ODI designer. When I execute it from java it throws an error. The error is
    java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot create the initial JNDI context
    Is there any ways to set the JNDI properties, (any set methods for ODIConnection object)
    Cheers

    Are you serious with that question? Did you try to build the web service client before? Because this is exactly the same. Try to find "building web service clients" instead "Calling BPEL from java". By default (probably) every BPEL process has both WSIF and SOAP end points, just use correct WSDL address.

  • Calling BRM from UDF using JNDI lookup with @EJB annotation

    Hi Experts
    I am trying to implement a UDF to invoke my BRM Rules set via JNDI Lookup instead of a SOAP Channel lookup.
    I have had a look at the following links/docs:
    Calling BRM from UDF using Public API
    http://www.gleanster.com/system/resources/W1siZiIsIjIwMTIvMDgvMDcvMjAvNDcvNTAvNDMvVGhpbmdzX1lvdV9TaG91bGRfS25vd19hYm91dF9TQVBfTmV0V2VhdmVyX0JSTS5wZGYiXV0/Things%20You%20Should%20Know%20about%20SAP%20NetWeaver%20BRM.pdf
    For item 1 above, the example looks really good, but it doesnt explain how I get access to the following required imports from my UDF:
    import com.sap.brms.qrules.ejb.*;
    import com.sap.brms.qrules.engine.AbstractProject;
    import com.sap.brms.qrules.engine.RuleEngine;
    import com.sap.brms.qrules.engine.RulesetContext;
    import javax.ejb.EJB;
    The second document is really good as well, but I could not figure out how to get it to work from my UDF.
    So, can anyone help me to understand specifically what is required to get this to work?
    Is is possible to invoke the rule set from my UDF?
    How do I give my UDF access to all the required jars/imports?
    I have manage to create a new DC (Development Component) with a public part and this enables me to get my code to compile on my local PC but I am not able to activate it due to the server not having access to the same java packages as my local copy.
    Any help would be greatly appreciated.

    You resolve the dependency by importing the required jars with using the dependency tab for the mapping program.
    As stipulated before, I have managed to resolve the dependency issue but I have now getting the same error as in the forum: Calling BRM from UDF using Public API
    The specific error is:
    com.sap.engine.services.cross.PortableRemoteObjectContainer.narrow(PortableRemoteObjectContainer.java:238)
    Has anyome manage to get invoke a BRM Ruleset using JNDI?

Maybe you are looking for