Java BPEL invocation API - NormalizedMessage.getPayloadString issue

Hello,
I'm trying to invoke a two-way (synchronous) BPEL process from with a J2EE application like so:
        NormalizedMessage requestMessage = new NormalizedMessage();
        requestMessage.addPart("payload", requestXml);
        Locator lctr = new Locator(domainId, password);
        IDeliveryService dService = (IDeliveryService) lctr.lookupService(IDeliveryService.SERVICE_NAME);
        NormalizedMessage responseMessage = dService.request(bpelId, operationId, requestMessage);I would like to receive the response as unparsed XML. I thought that would be possible using the following:
        String responsePayload = responseMessage.getPayloadString();but that returns null. responseMessage.getPayload() returns a Map from which I can successfully obtain the payload XMLElement, so the BPEL process is definitely working.
Any ideas why getPayloadString is not working as I expect it to? Thanks.

Perhaps try the BPEL forum here on OTN?
-steve-

Similar Messages

  • Issues in invoking a web service from a JAVA/BPEL client...

    We are trying to invoke a web service from a JAVA/BPEL client using org.apache.soap classes. But everytime we are running into issues of IllegalAccessError or InvalidClassError or IncompatibleClassError based on different jars we are trying to include in our project. Attached is a simple BPEL project which tries to invoke a web service through JAVA embedding (no supporting jars need to be included explicitly). It erros with following trace:
    Class org/apache/soap/Envelope violates loader constraints
         Invalid class: org.apache.soap.Envelope
         Loader: soap:10.1.3
         Code-Source: /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/webservices/lib/soap.jar
         Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/oc4j.jar
         Dependent class: org.apache.soap.rpc.RPCMessage
         Loader: soap:10.1.3
         Code-Source: /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/webservices/lib/soap.jar
         Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/oc4j.jar
    Could you please help us out or provide any pointers. Any help would be highly appreciated

    Because you weren't told what to get, perhaps you already have it eh?
    What you want to read up about is JAX-WS, which is the webservice API bundled by default with your JDK (Java 6 and up). You'll find the wsimport tool in the bin directory of your JDK. I recommend you explore that directory and read up about all the executables you can find there, to be more prepared in the future. Know the tools you work with and all that. Most tools have a manual on this website:
    http://www.oracle.com/technetwork/java/javase/tech/index.html
    (under tools and utilities). Not wsimport, that is part of the jax-ws documentation. Better you look for jax-ws tutorials using Google, it will be quicker.

  • Invocation API or Java Client Libraries

    Hi All,
    I want to invoke my short/long lived processes through my java code.
    Now, There are two ways to achieve this as i know .
    1. Invocation API (which I am using currently now)
    2. java client libraries
    Now my question is whether one can use java client libraries to invoke workbench processes through java code?
    If yes, is it better than Invocation API ?
    Thanks
    Abhiram

    Abhiram,
    You can invoke any service defined to LC (there are several exceptions for good reasons) whether they are out-of-the-box services or applications you have built yourself.
    In my opinion, your preference for invocation should be based upon the best fit for your existing Java classes. That's the beauty of the LC APIs. They give you some flexibility. The invocation APIs are nice for dealing with documents (PDF and native file formats). However, if your Java class(es) use Web Services then use the SOAP endpoint to call the LC process, for example. If performance is an issue and the Java class(es) run on the same host as LC, then use EJB.
    Steve

  • Issue with "firstRecord" Business Component method of JAVA Data bean API.

    Hi,
    Following is my use-case scenario:
    I have to add or associate child MVG business component (CUT_Address)
    with the parent business component (Account) using JAVA Data bean API.
    My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
    otherwise create new CUT_address and associate it with account.
    Code (using JAVA Data bean APIs) Goes as follows:
    SiebelBusObject sBusObj = connBean.getBusObject("Account");
    parentBusComp = sBusObj.getBusComp("Account");
    SiebelBusComp parentBusComp;
    SiebelBusComp childBusComp;
    // retrieve required account.. Please assume Account1 exists
    parentBusComp.activateField("Name");
    parentBusComp.clearToQuery();
    parentBusComp.setSearchSpec("Name", "Account1");
    sBusComp.executeQuery2(true, true);
    sBusComp.firstRecord();
    Counter = 0;
    while (counter < Number_Of_Child_Records_To_Insert)
    childBusComp = parentBusComp.getMVGBusComp("City");
    associatedChildBusComp = childBusComp.getAssocBusComp();
    childBusComp.activateField("City");
    childBusComp.clearToQuery();
    childBusComp.setSearchSpec("City", Vector_of_city[counter]);
    sBusComp.executeQuery2(true, true);
    if( sBusComp.firstRecord() )
    // Child already exist and do processing accordingly
    else
    // Child does not exist and do processing accordingly
    childBusComp.release();
    childBusComp = null;
    associatedChildBusComp.release();
    associatedChildBusComp=null;
    Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
    Any input towards the issue is highly appreciable.
    Thanks,
    Rohit.

    Setting the view mode to "AllView" helped.
    Thanks for the lead!
    In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script.

  • Setting 'ReplytoAddress' in NormalizedMessage using BPEL client API-failing

    Hi all,
    I tried specifying 'Reply to Address' property in Normalized Message using BPEL Client API to receive response from Asynchronous BPEL process but it's not working.
    I am facing the following situations:-
    1.Just setting 'Reply To address'-raises
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message transmission failure, response code: 500
    2.Specifying both 'Reply to address' and 'Reply To PortType' is sending the entire process to an infinite wait state in receiving response from the worklist task service.
    My BPEL process has a human worklist and this workflow on completion can't callback my BPEL process for carrying out Step -2 mentioned above.
    Reply to Address = webservice SOAP endpoint URI
    Reply to Porttype= the porttype name in the WSDL file.
    Please any help will be appreciated.I have a project delivery.
    Thanks

    Hi all,
    I tried specifying 'Reply to Address' property in Normalized Message using BPEL Client API to receive response from Asynchronous BPEL process but it's not working.
    I am facing the following situations:-
    1.Just setting 'Reply To address'-raises
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message transmission failure, response code: 500
    2.Specifying both 'Reply to address' and 'Reply To PortType' is sending the entire process to an infinite wait state in receiving response from the worklist task service.
    My BPEL process has a human worklist and this workflow on completion can't callback my BPEL process for carrying out Step -2 mentioned above.
    Reply to Address = webservice SOAP endpoint URI
    Reply to Porttype= the porttype name in the WSDL file.
    Please any help will be appreciated.I have a project delivery.
    Thanks

  • BPEL invocation securely from client using JAZN security not working.

    HI,
    We are trying to invoke the BPEL process securely from the client application using JAZN security settings, this is not working, with any credentilas or with out providing the security credentilas BPEL invocation is happening. Need the solution for this security credentials while invoking the BPEL process.
    Please provide the update at the earliest. Thanks in advance. Your quick update is greatly appreciated.

    Hi James,
    Thanks for the update.
    Please find the attached docs.
    Bpel.xml:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BPELSuitcase>
    <BPELProcess id="HelloWorld" src="HelloWorld.bpel">
    <partnerLinkBindings>
    <partnerLinkBinding name="client">
    <property name="wsdlLocation">HelloWorld.wsdl</property>
    </partnerLinkBinding>
    </partnerLinkBindings>
    <configurations>
    <property name="role">oc4j-administrators</property>
    </configurations>
    </BPELProcess>
    </BPELSuitcase>
    orion-application.xml: folder location: C:\product1\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel\META-INF\orion-application.xml
    <?xml version="1.0"?>
    <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd"
    schema-major-version="10"
    schema-minor-version="0" component-classification="internal-BPEL">
    <connectors path="./oc4j-connectors.xml"/>
         <ejb-module remote="false" path="ejb_ob_engine.jar" />
         <ejb-module remote="false" path="ejb_services.jar" />
         <web-module id="httpbinding" path="httpbinding.war" />
         <web-module id="admin_war" path="admin_war" />
         <web-module id="startup_war" path="startup_war" />
         <web-module id="console_war" path="console_war" />
         <persistence path="persistence" />
         <principals path="principals.xml" />
         <jazn provider="XML" location="../../config/system-jazn-data.xml" jaas-mode="doAsPrivileged">
         <!-- <jazn-web-app auth-method="CUSTOM_AUTH"/> -->
    </jazn>
    <imported-shared-libraries>
         <inherited-shared-libraries/>
         <import-shared-library name="oracle.bpel.common" parent="api" />
         <import-shared-library name="oracle.ws.client" parent="oracle.ws.jaxrpc" version="10.1.3" />
         <import-shared-library name="oracle.ws.jaxrpc" />
         <import-shared-library name="oracle.toplink" />
         <import-shared-library name="oracle.ws.testpage" />
         </imported-shared-libraries>
         <log>
              <file path="application.log" />
         </log>
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="oc4j-administrators">
                             <group name="oc4j-administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="oc4j-administrators">
                             <group name="oc4j-administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
         <security-role-mapping name="PUBLIC">
              <group name="{{PUBLIC}}" />
         </security-role-mapping>
    </orion-application>
    web.xml file: C:\product1\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel\startup\WEB-INF\web.xml
    <?xml version="1.0" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="StartupWebApp_Id">
    <!--servlet id="BPEL_Axis_Servlet_Id">
    <servlet-name>BPEL_Axis_Servlet</servlet-name>
    <display-name>BPEL Axis Servlet</display-name>
    <servlet-class>com.collaxa.cube.ws.soap.axis.BPELAxisServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet-->
    <servlet id="BPEL_OC4J_Servlet_Id">
    <servlet-name>BPEL_OC4J_Servlet</servlet-name>
    <display-name>BPEL OC4J JAX/RPC Servlet</display-name>
    <description>BPEL endpoint Provider Port via oc4j jax/rpc</description>
    <servlet-class>com.collaxa.cube.ws.soap.oc4j.BPELOC4JServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet id="LoaderServlet_Id">
    <servlet-name>cxloader</servlet-name>
    <servlet-class>com.collaxa.cube.admin.CXLoaderServlet</servlet-class>
    <load-on-startup>3</load-on-startup>
    </servlet>
         <!--servlet-mapping id="BPEL_Axis_Servlet_Mapping_id">
    <servlet-name>BPEL_Axis_Servlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping-->
    <servlet-mapping id="BPEL_OC4J_Servlet_Mapping_Id">
    <servlet-name>BPEL_OC4J_Servlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>Default Domain Pages</web-resource-name>
              <description>These pages are only accessible by authenticated users.</description>
              <url-pattern>*orabpel/default/HelloWorld/v2010_05_02__62961</url-pattern>
         </web-resource-collection>
         <auth-constraint>
         <role-name>oc4j-administrators</role-name>
         </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>jazn.com</realm-name>
    </login-config>
    <security-role>
    <description>BPEL Admins</description>
    <role-name>oc4j-administrators</role-name>
    </security-role>
    <distributable/>
    <resource-ref id="ResRef_BPELContainerDataSource_Id">
    <res-ref-name>jdbc/BPELServerDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <!--ejb-local-ref id="EjbRef_AdaptorManager_Id">
    <ejb-ref-name>ejb/local/AdaptorManagerLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.collaxa.cube.engine.ejb.interfaces.IAdaptorManagerLocalBeanHome</local-home>
    <local>com.collaxa.cube.engine.ejb.interfaces.IAdaptorManagerLocalBean</local>
    <ejb-link>AdaptorManagerBean</ejb-link>
    </ejb-local-ref>
    -->
    <ejb-ref id="EjbRef_CubeFinder_Id">
    <ejb-ref-name>ejb/collaxa/system/CubeFinderBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.collaxa.cube.engine.ejb.interfaces.ICubeFinderBeanHome</home>
    <remote>com.collaxa.cube.engine.ejb.interfaces.ICubeFinderBean</remote>
    </ejb-ref>
    <ejb-ref id="EjbRef_Dispatcher_Id">
    <ejb-ref-name>ejb/collaxa/system/DispatcherBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.collaxa.cube.engine.ejb.interfaces.IDispatcherBeanHome</home>
    <remote>com.collaxa.cube.engine.ejb.interfaces.IDispatcherBean</remote>
    </ejb-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/CubeEngineLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.collaxa.cube.engine.ejb.interfaces.ICubeEngineLocalBeanHome</local-home>
    <local>com.collaxa.cube.engine.ejb.interfaces.ICubeEngineLocalBean</local>
    <ejb-link>CubeEngineBean</ejb-link>
    </ejb-local-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/ProcessManagerLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.oracle.bpel.client.ejb.interfaces.IBPELProcessManagerLocalBeanHome</local-home>
    <local>com.oracle.bpel.client.ejb.interfaces.IBPELProcessManagerLocalBean</local>
    <ejb-link>ProcessManagerBean</ejb-link>
    </ejb-local-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/CubeDeliveryLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.collaxa.cube.engine.ejb.interfaces.ICubeDeliveryLocalBeanHome</local-home>
    <local>com.collaxa.cube.engine.ejb.interfaces.ICubeDeliveryLocalBean</local>
    <ejb-link>CubeDeliveryBean</ejb-link>
    </ejb-local-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/KeyGeneratorLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.collaxa.cube.engine.ejb.interfaces.IKeyGeneratorLocalBeanHome</local-home>
    <local>com.collaxa.cube.engine.ejb.interfaces.IKeyGeneratorLocalBean</local>
    <ejb-link>KeyGeneratorBean</ejb-link>
    </ejb-local-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/MessageLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.collaxa.cube.engine.ejb.interfaces.IMessageLocalBeanHome</local-home>
    <local>com.collaxa.cube.engine.ejb.interfaces.IMessageLocalBean</local>
    <ejb-link>MessageBean</ejb-link>
    </ejb-local-ref>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/ServerLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
         <local-home>com.oracle.bpel.client.ejb.interfaces.IServerLocalBeanHome</local-home>
    <local>com.oracle.bpel.client.ejb.interfaces.IServerLocalBean</local>
    <ejb-link>ServerBean</ejb-link>
    </ejb-local-ref>
    </web-app>
    jazn.xml : C:\product1\10.1.3.1\OracleAS_1\j2ee\home\config
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <jazn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-10_0.xsd" schema-major-version="10" schema-minor-version="0" provider="XML" location="./system-jazn-data.xml" default-realm="jazn.com" persistence="ALL">
         <property name="custom.sso.url.login" value="/jsso/SSOLogin"/>
         <property name="custom.sso.key.alias" value="{AES-128}dpvTz49oIQWnM1gZfdpZ1w=="/>
         <property name="idm.token.asserter.class" value="oracle.security.jazn.sso.SSOCookieTokenAsserter"/>
         <property name="idm.token.collector.class" value="oracle.security.jazn.sso.SSOCookieTokenCollector"/>
         <property name="idm.token.type" value="HTTP_COOKIE"/>
         <property name="idm.token.collector.cookie.1" value="ORA_OC4J_SSO"/>
         <property name="custom.sso.url.logout" value="/jsso/SSOLogout"/>
         <property name="idm.authentication.name" value="JavaSSO"/>
    </jazn>
    system-jazn-data.xml
    <?xml version="1.0" encoding="UTF-8" standalone='yes'?>
    <jazn-data
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-data-10_0.xsd"
    schema-major-version="10"
    schema-minor-version="0"
    >
    <!-- JAZN Realm Data -->
    <jazn-realm>
         <realm>
              <name>jazn.com</name>
              <users>
                   <user>
                        <name>Bharani</name>
                        <guid>99116C7155E211DFBFB59D7811B59628</guid>
                        <credentials>{903}26NFSvxAeBAo3nBkbvJ/e2BCD+actZzi</credentials>
                   </user>
              </users>
                   <role>
                        <name>oc4j-administrators</name>
                        <display-name>OC4J Admin Role</display-name>
                        <description>Administrative role for OC4J</description>
                        <guid>8A00C8701A0511DFBF99734349FF0592</guid>
                        <members>
                             <member>
                                  <type>user</type>
                                  <name>oc4jadmin</name>
                             </member>
                        </members>
                   </role>
              </roles>
         </realm>
    </jazn-realm>
    <!-- JACC Repository Data -->
    <jacc-repository>
    </jacc-repository>
    <jazn-policy>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/oc4j-administrators</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$createrole</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$modifyrealmmetadata</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.policy.RoleAdminPermission$jazn.com/*$</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$createrealm</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$droprealm</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$droprole</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.RoleAdminPermission</class>
                        <name>jazn.com/*</name>
                   </permission>
                   <permission>
                        <class>com.evermind.server.AdministrationPermission</class>
                        <name>administration</name>
                        <actions>administration</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>modifyrealmmetadata</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>createrealm</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>dropuser</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>droprealm</actions>
                   </permission>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>subject.propagation</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/ascontrol_admin</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$createrole</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$modifyrealmmetadata</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.policy.RoleAdminPermission$jazn.com/*$</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$createrealm</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$droprealm</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.AdminPermission</class>
                        <name>oracle.security.jazn.realm.RealmPermission$jazn.com$droprole</name>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.policy.RoleAdminPermission</class>
                        <name>jazn.com/*</name>
                   </permission>
                   <permission>
                        <class>com.evermind.server.AdministrationPermission</class>
                        <name>administration</name>
                        <actions>administration</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>modifyrealmmetadata</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>createrealm</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>dropuser</actions>
                   </permission>
                   <permission>
                        <class>oracle.security.jazn.realm.RealmPermission</class>
                        <name>jazn.com</name>
                        <actions>droprealm</actions>
                   </permission>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>subject.propagation</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/oc4j-app-administrators</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/users</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>user</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmUser</class>
                             <name>jazn.com/anonymous</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/BPMSystemAdmin</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.collaxa.security.ServerPermission</class>
                        <name>server</name>
                        <actions>all</actions>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>jazn.com/BPMDefaultDomainAdmin</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.collaxa.security.DomainPermission</class>
                        <name>default</name>
                        <actions>all</actions>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>oracle.security.jazn.spi.xml.XMLRealmRole</class>
                             <name>bpel_users</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.AdministrationPermission</class>
                        <name>administration</name>
                        <actions>administration</actions>
                   </permission>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <class>sun.security.acl.PrincipalImpl</class>
                             <name>oc4j-administrators</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>java.lang.RuntimePermission</class>
                        <name>setContextClassLoader</name>
                   </permission>
              </permissions>
         </grant>
    </jazn-policy>
    <!-- Login Module Data -->
    <jazn-loginconfig>
         <application>
              <name>oracle.security.jazn.oc4j.CertificateAuthenticator</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.X509LoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.jazn.tools.Admintool</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.RealmLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.jazn.oc4j.WebCoreIDSSOAuthenticator</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.coreid.CoreIDLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>coreid.name.attribute</name>
                                  <value>your credential mapping variable name</value>
                             </option>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                             <option>
                                  <name>coreid.resource.operation</name>
                                  <value>your oreid resource operation</value>
                             </option>
                             <option>
                                  <name>coreid.resource.type</name>
                                  <value>your coreid resource type</value>
                             </option>
                             <option>
                                  <name>coreid.name.header</name>
                                  <value>your http header name variable</value>
                             </option>
                             <option>
                                  <name>coreid.resource.name</name>
                                  <value>your coreid resource name</value>
                             </option>
                             <option>
                                  <name>coreid.password.attribute</name>
                                  <value>your password authentication variable</value>
                             </option>
                             <option>
                                  <name>coreid.password.header</name>
                                  <value>your http header password variable</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.wss.jaas.SAMLAuthManager</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.saml.SAMLLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>issuer.name.1</name>
                                  <value>www.oracle.com</value>
                             </option>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.jazn.oc4j.DigestAuthenticator</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.digest.DigestLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.jazn.oc4j.JAZNUserManager</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.RealmLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
         <application>
              <name>oracle.security.wss.jaas.JAASAuthManager</name>
              <login-modules>
                   <login-module>
                        <class>oracle.security.jazn.login.module.WSSLoginModule</class>
                        <control-flag>required</control-flag>
                        <options>
                             <option>
                                  <name>addAllRoles</name>
                                  <value>true</value>
                             </option>
                        </options>
                   </login-module>
              </login-modules>
         </application>
    </jazn-loginconfig>
    <jazn-permission-classes>
    </jazn-permission-classes>
    </jazn-data>
    It is huge to check all these files, but for reference providing all the files for checking the security details.
    Thanks for your help...

  • Oracle BPEL PM API : Failed to create "ejb/collaxa/system/ServerBean"

    I am getting the following error when I try to use the Oracle BPEL PM API :
    java.lang.Exception: Failed to create "ejb/collaxa/system/ServerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property,
    or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupServerBean(BeanRegistry.java:95)
         at com.oracle.bpel.client.auth.ServerAuthFactory.authenticate(ServerAuthFactory.java:73)
         at example2.Application1.run(Application1.java:50)
         at example2.Application1.main(Application1.java:67)
    It looks like a JNDI/RMI JNDI issue, but it could be another problem. If it is my java.naming.provider.url value.
    The values are found by the following methods:
    <opmn-request-port> : 6003 - Found in opmn.xml, OPMN request port
    <oc4j-instance-name> : oc4j_soa - Found in enterprise manager
    <oc4j-application-name> : orabpel
    The code is
    import com.oracle.bpel.client.BPELDomainStatus;
    import com.oracle.bpel.client.Server;
    import com.oracle.bpel.client.auth.ServerAuth;
    import com.oracle.bpel.client.auth.ServerAuthFactory;
    import com.oracle.bpel.client.ServerException;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.dispatch.IDeliveryService;
    Properties props = new java.util.Properties();
    props.put("orabpel.platform", "ias_10g" );
    props.put("java.naming.factory.initial",
    "oracle.j2ee.rmi.RMIInitialContextFactory" );
    props.put("java.naming.provider.url",
    "opmn:ormi://rrsl00024:6003:oc4j_bpel/orabpel" );
    props.put ("dedicated.rmicontext", "true");
    props.put("java.naming.security.principal", "oc4jadmin" );
    props.put("java.naming.security.credentials", "oracle1" );
    securityCredentials = "oracle1";
    auth = ServerAuthFactory.authenticate(securityCredentials, null, props);
    Server srv = new Server(auth);
    BPELDomainStatus domainList[] = srv.getAllDomainStatus();
    for (int i=0; i<domainList.length; i++ ) {
    System.out.println( "Domain ID="+domainList.getDomainId() );
    Environment:
    BPEL Designer     10.1.3.3.0 (Build 070615.0525)
    Java(TM) Platform     1.5.0_06
    Oracle IDE     10.1.3.41.57

    I am getting the following error when I try to use the Oracle BPEL PM API :
    java.lang.Exception: Failed to create "ejb/collaxa/system/ServerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property,
    or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupServerBean(BeanRegistry.java:95)
         at com.oracle.bpel.client.auth.ServerAuthFactory.authenticate(ServerAuthFactory.java:73)
         at example2.Application1.run(Application1.java:50)
         at example2.Application1.main(Application1.java:67)
    It looks like a JNDI/RMI JNDI issue, but it could be another problem. If it is my java.naming.provider.url value.
    The values are found by the following methods:
    <opmn-request-port> : 6003 - Found in opmn.xml, OPMN request port
    <oc4j-instance-name> : oc4j_soa - Found in enterprise manager
    <oc4j-application-name> : orabpel
    The code is
    import com.oracle.bpel.client.BPELDomainStatus;
    import com.oracle.bpel.client.Server;
    import com.oracle.bpel.client.auth.ServerAuth;
    import com.oracle.bpel.client.auth.ServerAuthFactory;
    import com.oracle.bpel.client.ServerException;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.dispatch.IDeliveryService;
    Properties props = new java.util.Properties();
    props.put("orabpel.platform", "ias_10g" );
    props.put("java.naming.factory.initial",
    "oracle.j2ee.rmi.RMIInitialContextFactory" );
    props.put("java.naming.provider.url",
    "opmn:ormi://rrsl00024:6003:oc4j_bpel/orabpel" );
    props.put ("dedicated.rmicontext", "true");
    props.put("java.naming.security.principal", "oc4jadmin" );
    props.put("java.naming.security.credentials", "oracle1" );
    securityCredentials = "oracle1";
    auth = ServerAuthFactory.authenticate(securityCredentials, null, props);
    Server srv = new Server(auth);
    BPELDomainStatus domainList[] = srv.getAllDomainStatus();
    for (int i=0; i<domainList.length; i++ ) {
    System.out.println( "Domain ID="+domainList.getDomainId() );
    Environment:
    BPEL Designer     10.1.3.3.0 (Build 070615.0525)
    Java(TM) Platform     1.5.0_06
    Oracle IDE     10.1.3.41.57

  • Java Collaboration Suite API - Common Problems......and Solutions!

    , Hi all,
    I'd just like to share some of the issues I've come across in my first try at using the Java Collaboration Suite API (including the Accelerator Kit).
    In short,
    The Good: I've succeeded in getting a working application, and the code doesn't look half bad.
    The Bad: Man was it a pain to get to this point.
    Here are a few notes about what I've found, what can be improved by oracle, and hopefully it will help others.
    1. The initial setup went smoothly. I included the Jar's from the web kit, and was able to successfully connect using OCDConnectionFactory.CreateConnection. This first attempt didn't use the Accelerator Kit, as at the time I didn't even know it existed. As soon as I started to try any examples from Oracle, code snippets wouldn't even compile (usually due to FDKUtils and FDKSession) and I couldn't find out why. After exhaustive research, I found that the Accelerator Kit here (http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html), but it is not a library in the lib. After even further research, I found a very interesting thing. If you click on the link I've shown, you will see 2 versions of the Accelerator Kit: The recent link just includes the kit as a bunch of classes. I found it kind of ugly to include those in my project. However, if you click on the older link you will find a jar called "content-ws-helper.jar". This is actually the Accelerator Kit in a JAR (yet without any documentation anywhere on this).
    2. When using the accelerator toolkit, the connection string you use to connect changes. It no longer should have "ws" at the end. Don't believe this is documented anywhere! So if your connection string is http://server:8888/content/ws it should be changed to http://server:8888/content/
    <strong>
    </strong>3. Most of the examples given are appreciated, but they are also impossible to read. Methods should not be hundreds of lines of code long! Here is a handy method that I seem to be using quite often (at least in my use cases).
    private Item getFolder(String path) throws OCSServiceException {
    try {
    FileManager fm = Managers.getFileManager(fdkSession);
    Item workspace = fm.resolvePath(path, null);
    CommonManager commonM = Managers.getCommonManager(fdkSession);
    workspace = commonM.getItem(workspace.getId(), attributeRequest);
    return workspace;
    } catch (Exception e) {
    LOGGER.error(e.getMessage(), e);
    throw new OCSServiceException("Exception getting folder");
    The key is the attributeRequest class variable. This is the object that changes depending on what properties I want to retreive regarding that folder. A commonly used one for getting categories is:
    attributeRequest = FdkUtils.newAttributeRequestArray(Attributes.CATEGORY_CONFIGURATION,
    FdkUtils.newAttributeRequestArray(Attributes.ATTRIBUTE_OVERRIDES,
    new AttributeRequest[]{
    FdkUtils.newAttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_ATTRIBUTE),
    FdkUtils.newAttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_DEFAULT),
    FdkUtils.newAttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_CATEGORY_CLASS)
    By seperating this out, It gets rid of a ton of the speghetti like code that you see in most of the examples and on the forums.
    For example, this thread helped me in category updates for folders http://kr.forums.oracle.com/forums/thread.jspa?threadID=495959
    , but as the post at the bottom states, this should not be the difficult. My method, which performs a similar method, is as follows:
    public void updateFolderCategory(String path, String categoryName, String categoryAttributeName, Object value ) throws OCSServiceException {
    try {
    CategoryService cs = new CategoryServiceImpl();
    long categoryId = cs.getCustomCategory(categoryName).getId();
    long attributeId = cs.getCustomAttribute(categoryName, categoryAttributeName).getId();
    NamedValue[] attOverride = new NamedValue[]{
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_ATTRIBUTE, new Long(attributeId)),
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_CATEGORY_CLASS, new Long(categoryId)),
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_DEFAULT, value),
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_REQUIRED, DEFAULT_REQUIRED),
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_SETTABLE, DEFAULT_SETTABLE),
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE_PROMPT, DEFAULT_PROMPT),
    NamedValue[] categoryConfigurationAttributes = new NamedValue[]{
    new NamedValue(Attributes.ATTRIBUTE_OVERRIDE, attOverride)
    connect();
    Item folder = getFolder(path);
    Managers.getCategoryManager(fdkSession).setCategoryConfiguration(folder.getId(), categoryConfigurationAttributes);
    LOGGER.info("Updated folder category definition");
    } catch (Exception e) {
    LOGGER.error(e.getMessage(), e);
    throw new OCSServiceException("Exception updating category");
    } finally {
    disconnect();
    I hope this information helps someone, and I'd appreciate if anyone can also add input or critique my approach. I also hope that there is someone else out there who is still using the API and hasn't given up yet!

    I was also looking for something like this..I did not get any response.
    Did you tried to add bpel:exec ? you can call OCS api in the java blockc within BPEL. I am using this and creating folder from BPEL.

  • JNI, invocation API

    Hi,
    I would like to start with JNI.
    I read the JNI-Tutorial and
    didn't find the file: jni.h.
    Where can I get it?
    I would like to write an invocation API.
    A VC-program should call a java-function.
    Does anybody know,
    where to find the demo-code (c and java)
    of a 'hello world'-program?
    Thanks
    Ully

    Thanks bschauwe,
    I tested so many things,
    that I installed somethings else,
    but not the sdk!

  • JNI FindClass Error: Using the Invocation API  from visual C++

    I am using JNI invocation api in microsoft visual c++ to invoke java. When I use the FindClass method, I get a return value of 0. I have verified that the class "a" exists and believe have set the java class path appropriately. A valid jvm and jenv are created. The program fails at the FindClass call and returns 0.
    std::string classPath = "c:\\work\\java;C:\\j2sdk1.4.2_08;C:\\j2sdk1.4.2_08\\bin;C:\\j2sdk1.4.2_08\\lib";
         vmArgs.classpath = classpath;
         jint res = JNI_CreateJavaVM(&jvm, (void**)(&jenv), &vmArgs);
         if (res < 0)
              cout << "Error!! Cannot create jvm" << endl;
    jclass jFixEngineClass1 = jenv->FindClass("a");
         if (jFixEngineClass1 == 0)
              cout << "Error could not find a class" << endl;
         else
              cout << "a class found" << endl;
    thanks in advance,
    hcg

    Jschell,
    Thanks for your help.
    I found the error. I was using JDK1_1InitArgs for my vm_args. Since, I am using JDK 1.4, the classpath I was setting was not getting picked up. I changed the vm_args type as in the code below and it worked.
    JavaVMInitArgs vmArgs;
         JavaVMOption options[1];
         char classPathDef[1024];classPathDef[0] = '\0';
         sprintf(classPathDef, "%s", "-Djava.class.path=");
         sprintf(classpath, "%s%s", classPathDef, NYSE_FIX::userClassPath.c_str());
         options[0].optionString = classpath;
         cout << "Option string is:" << options[0].optionString << endl;
    vmArgs.version = 0x00010004;
    vmArgs.options = options;
    vmArgs.nOptions = 1;
    vmArgs.ignoreUnrecognized = JNI_TRUE;
         jint ret = JNI_GetDefaultJavaVMInitArgs(&vmArgs);

  • About Java(tm) Communications API

    Hi all,
    I am customizing some project, using Java(tm) Communications API.
    I've find it is not include of J2SE core module, and had some incompatibility issue.
    I am wondering if there are other package I could use in replace of this particular API?
    Thx,
    James

    Hi all,
    I am customizing some project, using Java(tm) Communications API.
    I've find it is not include of J2SE core module, and had some incompatibility issue.
    I am wondering if there are other package I could use in replace of this particular API?
    Thx,
    James

  • Invocation API to launch an application

    Hi!
    Is it really possible to "start " a java VM from an application written in java?
    The page: http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html describes some c++ code that shall do the job I guess....?....but I can't say that I understand everything of it....
    There isn't a simple step by step tutorial out there which describes how it shall be done?
    And what is the "Java application launcher" which the writers of JRE Install Notes 1.4.2 (http://java.sun.com/j2se/1.4.2/jre/install-windows.html) refer to at the bottom of the text?
    Final question: which jre shall I download and install - Windows Offline Installation, Multi-language?.....
    the tutorial http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html talks about different JVM - jdk 1.1, Netscape ......
    Could someone please enlight me in this topic?
    Thanks

    First of all, I think the "launcher" mentioned in JRE doc is just a terminology and not a concrete entity. I suppose when you change the setting in Netscape or IE so that it can invokes the Java VM automatically each time there's Java code, that's the equivalent of a "launcher". That's why they say if you want to bypass this "launching" mechanism, you can use Invocation API to do it yourself (or invoke it from something other than Netscape or IE, say, your own self-written software).
    Normally when you're running a Java program, you're inside a JVM, and there's no need to "start" another VM, right? But, just for discussion purpose, if you really want to start another JVM in another "working" space, then yes, I think you can use the Invocation API to do just that. It's a bit awkward, since you'll have to use JNI to call out from Java to C++, then inside the C++ code, invoke JNI_CreateJavaVM() to create a new JVM and work in there. Then call jvm->DestroyJavaVM when you're done. Note that all JVM run from jvm.dll, so they may decide to recycle the very JVM that you were starting from (thus defeating our purpose). But in my opinion it most likely will not (be recycled) and will be a brandnew JVM.
    If you're not sure then try to use the JNI tutorial first. The invocation API is just a part of JNI. Once you're comfortable with calling Java -> C++, then things'll become much clearer.

  • Navigation Panel using Java Bean Base API

    Hi,
    I would like to know how do I add the standar navigation panel to my map using the oracle.lbs.mapclient.MapViewer object. I have try different forms which include adding a tile theme layer but its not working. I'm not using the JS API since I want to have an applet.
    Thanks in advance.
    Susana

    Hi,
    in MapViewer's web page there is a link to some demos. There you can find a few examples of how to use the Java bean with jsp pages.
    If you want to implement a simple java (desktop) application, the following code contains the basic information that you need to start the MapViewer object, set the display parameters, and then add some information to generate a map image. In this example, a base map is used to generate the map.
        String url = "http://localhost:7001/mapviewer/omserver";
        try
          MapViewer mapViewer = new MapViewer(url);     // creates MapViewer object
          mapViewer.setDataSourceName("mvdemo");       // sets the data source (must exist in Mapviewer server)
          mapViewer.setMapTitle("MVDEMO base map");           
          mapViewer.setAntiAliasing(true);    
          mapViewer.setImageFormat(MapViewer.FORMAT_RAW_COMPRESSED);
          mapViewer.setDeviceSize(new Dimension(600,475));
          mapViewer.setCenterAndSize(-116.65,38.92,19.2);         // sets the map area
          mapViewer.setBaseMapName("DEMO_MAP");
          System.out.println(mapViewer.getMapRequestString());    // this prints the current map request to be issued
          boolean response = mapViewer.run();      // executes the request
          if (response)
              Image img = mapViewer.getGeneratedMapImage();
             // do something with the image in your Java application
        }catch(Exception ex)
           ex.printStackTrace(System.err);
        }The API java doc (see APIs link in MapViewer's web page) contains a more detailed description of the methods that can be used with the Java bean API.

  • Invocation API

    I am working with the invocation api from the tutorial. I do not want to set the path to the jvm.dll before running the exe. How can I dynamically load the dll. When I start the exe, immediately it popsup a message box saying that jvm.dll not found. Can anyone please help me out as to how to load the dll dynamically. All help is appreciated.
    Razi

    Try this:
    // runjava.cpp
    #include <windows.h>
    #include <jni.h>
    #define DOTRELEASE  "1.4" /* Same for 1.3.1, 1.3.2 etc. */
    #define JRE_KEY         "Software\\JavaSoft\\Java Runtime Environment"
    // typedefs for calls to jvm.dll
    typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
    typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
    // globals
    JavaVMInitArgs vmArgs;
    JavaVM* jvm;
    JNIEnv* env;
    bool running=false;
    void LogError(const char * format,...)
        char    message[256];
        va_list args;
        va_start(args, format);
        vsprintf(message, format, args);
        va_end(args);
         printf("%s\n",message);          
    void LogWin32Error(const char * pTitle)
        PCHAR pBuffer;
        LONG  lError = GetLastError ( );
        FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                        NULL,
                        lError,
                        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                        (char *)&pBuffer,
                        0,
                        NULL );
         LogError ("Win32 error: %s %s\n",pBuffer,pTitle);
        LocalFree ( pBuffer );
    bool GetStringFromRegistry(HKEY key, const char *name, unsigned char *buf, int bufsize)
        DWORD type, size;
        if (RegQueryValueEx(key, name, 0, &type, 0, &size) == 0
         && type == REG_SZ
         && (size < (unsigned int)bufsize))
              if (RegQueryValueEx(key, name, 0, 0, buf, &size) == 0)
                   return true;
        return false;
    bool GetPublicJREHome(char *buf, int bufsize)
        HKEY key, subkey;
        char version[MAX_PATH];
        /* Find the current version of the JRE */
        if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, JRE_KEY,0,KEY_READ,&key)!=0)
              LogError("Error opening registry key '" JRE_KEY "'\n");
              return false;
        if(!GetStringFromRegistry(key,"CurrentVersion",(unsigned char *)version, sizeof(version)))
              LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\CurrentVersion\n");
              RegCloseKey(key);
              return false;
        if(strcmp(version, DOTRELEASE)!= 0)
              LogError("Registry key '" JRE_KEY "\\CurrentVersion'\nhas value '%s', but '" DOTRELEASE "' is required.\n", version);
              RegCloseKey(key);
              return false;
        /* Find directory where the current version is installed. */
        if(RegOpenKeyEx(key,version,0,KEY_READ, &subkey)!= 0)
              LogError("Error opening registry key '"JRE_KEY "\\%s'\n", version);
              RegCloseKey(key);
              return false;
        if(!GetStringFromRegistry(subkey, "JavaHome", (unsigned char *)buf, bufsize))
              LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\%s\\JavaHome\n", version);
              RegCloseKey(key);
              RegCloseKey(subkey);
              return false;
        RegCloseKey(key);
        RegCloseKey(subkey);
        return true;
    jint JNICALL _vfprintf_(FILE *fp, const char *format, va_list args)
         LogError(format,args);
         return 0;
    void JNICALL _exit_(jint code)
         LogError("VM exited");
         exit(code);
    void JNICALL _abort_(void)
         LogError("VM aborted");
         abort();
    void LoadJVM(char * dir)
         HINSTANCE handle;
         JavaVMOption options[5];
         char JREHome[MAX_PATH];
         char JVMPath[MAX_PATH];                                        
         char classpathOption[MAX_PATH];
         char librarypathOption[MAX_PATH];
         if(!GetPublicJREHome(JREHome, MAX_PATH))
              LogError("Could not locate JRE");
              abort();
         strcpy(JVMPath,JREHome);
         strcat(JVMPath,"\\bin\\client\\jvm.dll");
        if ((handle=LoadLibrary(JVMPath))==0)
              LogError("Error loading: %s", JVMPath);
              abort();
        CreateJavaVM_t pfnCreateJavaVM=(CreateJavaVM_t)GetProcAddress(handle,"JNI_CreateJavaVM");
        if (pfnCreateJavaVM==0)
              LogError("Error: can't find JNI interfaces in: %s",JVMPath);
              abort();
         strcpy(classpathOption,"-Djava.class.path=");
         strcat(classpathOption,dir);
         strcat(classpathOption,";");
         strcat(classpathOption,JREHome);
         strcat(classpathOption,"\\lib");
         strcat(classpathOption,";");
         strcat(classpathOption,JREHome);
         strcat(classpathOption,"\\lib\\comm.jar");
         strcpy(librarypathOption,"-Djava.library.path=");
         strcat(librarypathOption,JREHome);
         strcat(librarypathOption,"\\lib");
         OutputDebugString("classpath option=");
         OutputDebugString(classpathOption);
         OutputDebugString("\n");
         OutputDebugString("librarypath option=");
         OutputDebugString(librarypathOption);
         OutputDebugString("\n");
         options[0].optionString=classpathOption;     
         options[1].optionString=librarypathOption;     
         options[2].optionString="vfprintf";
         options[2].extraInfo=_vfprintf_;
         options[3].optionString="exit";
         options[3].extraInfo=_exit_;
         options[4].optionString="abort";
         options[4].extraInfo=_abort_;
        vmArgs.version  = JNI_VERSION_1_2;
        vmArgs.nOptions = 5;
        vmArgs.options  = options;
        vmArgs.ignoreUnrecognized = false;
         //if(JNI_CreateJavaVM(&jvm, (void**)&env, &vmArgs)<0)
        if(pfnCreateJavaVM(&jvm,(void**)&env, &vmArgs)!=0)
              LogError("Could not create VM");
              abort();
    void main(int argc, char *argv[])
        char path[MAX_PATH];
        char drive[MAX_PATH];
        char file[MAX_PATH];
        char dir[MAX_PATH];
        char ext[MAX_PATH];
         jclass  cls;
         jmethodID mid;
         jobjectArray args;
         if(argc>=2)
              _splitpath(path,drive,dir,file,ext);
              LoadJVM(dir);
              if(env==NULL)
                   LogError("Could not load VM");
                   abort();
              if(GetModuleFileName(NULL,path,MAX_PATH)==0)
                   LogWin32Error("Getting module filename");
                   abort();
              cls=env->FindClass(argv[1]);
              if(cls==NULL)
                   LogError("Could not find class %s (or its superclass)",argv[1]);
                   exit(-1);
              mid=env->GetStaticMethodID(cls,"main","([Ljava/lang/String;)V");
              if(mid==NULL)
                   LogError("Could not find method 'main'");
                   exit(-1);
              args=env->NewObjectArray(argc-2,env->FindClass("java/lang/String"),NULL);
              if(args==NULL)
                   LogError("Could not create args array");
              for(int arg=0;arg<argc-2;arg++)
                   env->SetObjectArrayElement(args,arg,env->NewStringUTF(argv[arg+2]));
              env->CallStaticVoidMethod(cls,mid,args);
              jvm->DestroyJavaVM();
         else
              printf("Usage: runjava classname\n");
              exit(-1);
    //*****************************************************************************

  • How to use Thread.sleep() with Java Berkeley Base API?

    Hi,
    I have explained the weird problem about the server was too busy to response to SSH but it continued to finish to run (Server not response when inserting millions of records using Java Base API
    Even I tried to increase CachSize and renice Java program, but it did not work. So, I am thinking to set sleeping time for threads in Java Berkeley Base API (using “ps” command, there were 18 light weight processes created). My program did not implement transaction or concurrency because it simply creates (millions) databases records only. Is it possible and correct to do like this in the code:
    try{
    //do create a db record
    Thread.currentThread().sleep(1000);//sleep for 1000 ms
    catch(ItrerruptedException ie){
    Thank you for your kindly suggestion.
    Nattiya

    where can I get the help doc about use AT commands in java.
    Can you give me some code example about this. It is
    difficulty to me to write it myself.You simply have to send the characters and receive the characters via the comm extension. Here is the ITU standard command set - http://ridge.trideja.com/wireless/atcommands/v250.pdf. Various modems and other devices extend this in a number of ways, you may need to find documentation specific to your device as well. But start with the standard.

Maybe you are looking for

  • Download tv Series to IPad

    Hi everyone, I downloaded a few TV Series to my iPad but can't find them there. The invoice however I received. A restart did not help. I can't synchronize for the Moment as i'm travelling at the moment. Does anyone have An idea what To do? Thanks in

  • Air for Android Extremely Slow...

    Hey everybody, Hopefully some of you have been trying the prerelease of Air for Android like myself. Its all great and easy peasy to export the apps to my phone but it seems to be ridiculously slow even for seemingly simple scripts. This is what i'm

  • Classic DMVPN over IPSec. Force UDP/4500 instead ESP?

    Hi, we've got classic DMVPN scheme with central router and spokes, all IOS routers. One of remote sites has bad ISP, which filters GRE and ESP (i beleive they filter all except tcp, udp and icmp). Is there any way to force spoke using udp/4500 instea

  • ECourse radio buttons dont work when published as a HTML file

    Hi Guys We are creating some eCourse's in Captivate 7 but when they are published in to HTML format the radio buttons don't work - they wont let you click them. (Have tried IE, Chrome and Firefox) However is you publish the course as swf it works fin

  • ReInstalling Mac OS X Issues

    I have been having a lot of issues with my mac mini recently. The problems started a while ago, when it would not mount .dmg files. Seeing as I never really install stuff, I just got on with it. And i've fixed that issue now anyway:). Since then, I h