Create Standalone JAVA ClASS

HI All,
Can anyone help me out to create a stand-alone java classs??
(It will call EJB Method).
more Insight:
We have developed one service. It is working fine in RAD 7.0. No issues in that. But as per requirements, We have to check that application as stand-alone class. we are trying to call stand alone Java class using command prompt and see if EJB gets invoked which is running on the WAS server?
Is there any way ?

Can anybody relook on my issue?
HI All,
Can anyone help me out to create a stand-alone java classs??
(It will call EJB Method).
more Insight:
We have developed one service. It is working fine in RAD 7.0. No issues in that. But as per requirements, We have to check that application as stand-alone class. we are trying to call stand alone Java class using command prompt and see if EJB gets invoked which is running on the WAS server?
Is there any way ?

Similar Messages

  • To create a java class in Web dynpro

    Hi,
    I want to create a java class which can be used in multiple views. Where will i create it and how will i access it?
    Can i create the class in Comp controller's imeplementation between "begin others"----
    "end"?
    Any help?
    regards,
    Sujesh

    Hi,
      If you create the class within the begin others"----
    "end" section, this class will not be accessible by any other class.
      You can create a class in
    Project/src/packages/<namespace>/<your component>/<create a new subdirectory>/Test.java.
    This will be accessible to all other classes. Just make sure the first line of your java file is the proper package declaration. So in this case the 1st line dhould be:
    package <namespace>.<your component>.<subdirectory name>;
    Regards,
    Satyajit.

  • Problems Creating a Java Class using a webservice with certificate

    hi,
    i'm developing a java class that call's a webservice that needs a certificate, i'm not used to work with java, last time was 10 years ago, so i'm having some troubles because of the certificate.
    I already add the certificate using java control panel > Security > Certificates. When testing i get the following error: IOException (java.io.IOException: subject key, Unknown key spec)
    I think I need to define the certificate in my class, but i'm having a lots of trouble with the samples that i found over the internet, nothing works and i'm running out of time.
    This is my Class
    create or replace and compile java source named "FishInfoAt" as
    import java.net.*;
    import java.io.*;
    import java.security.*;
    public class FishInfoAt
         public FishInfoAt()
         public static String send(String urlfishinfoat, String mensagem, String mensagem1, String mensagem2, String mensagem3)
              // Init
              String response = "";
              String msgtotal = mensagem+mensagem1+mensagem2+mensagem3;
              String a = "";
              HttpURLConnection conn = null;
              try{
                   URL url = new URL(urlfishinfoat);
                   conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestMethod("POST");
                   conn.setRequestProperty("Content-type", "text/xml; charset=utf-8");
                   conn.setRequestProperty("SOAPAction", "https://servicos.portaldasfinancas.gov.pt:401/sgdtws/documentosTransporte/");
                   conn.setRequestProperty("Content-Length","" + msgtotal.length());
                   conn.setDoOutput(true);
                   conn.setDoInput(true);
                   conn.connect();
                   OutputStream out = conn.getOutputStream();
                   out.write(msgtotal.getBytes());
                   out.flush();
                   InputStream in = conn.getInputStream();
                   int value;
                   while( (value = in.read()) != -1)
                        response+=(char)value;
              catch(Exception e)
    response = ("*** ERROR - IOException (" + e.getMessage() + a + ")");
    return response;
    /

    Hi Deepak,
    Could you please let us know upto which line your code is going safe. Try printing the value in the structure before you send that to the method GetUGEntity().
    I am not too sure that would be a problem. But I have faced a problem like this, wherein I tried to access a structure for which I have not allocated memory and hence got exception because of that.
    Since your JNI code seems to be error free, I got doubt on your C part. Sorry.
    Dhamo.

  • How to create custom java class in Content Server

    Hi All,
    I want to develop a custom java class (.class) file and upload in the UCM(Stellent Content Server). The problem is that I have to use some objects like DataResultSet, SharedObjects etc in my java class file. Since these class files resides in the Content Server I am not able to create a custom java class with these objects.
    Can any one help me to solve the above issue
    With thanks and regards
    Mohan

    Hey there,
    All of the core content server class files are included in a single jar file. This jar is in one of 2 places in the 10gr3 version of UCM:
    1. If you have an unpatched content server include $IntradocDir/shared/classes/server.zip in your classpath
    2. If you have a patched content server include $IntradocDir/custom/CS10gR35CoreUpdate/classes.jar in your classpath.
    In UCM 11g the jar file is located in %MIDDLEWARE_HOME%/Oracle_ECM1/ucm/idc/jlib/idcserver.jar
    P.S. Venkat is correct, post UCM specific questions in the ECM forum.
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw_OTN_WCS >

  • Is there a way to create a Java class based on what's defined in a schema?

    I have a set of schemas that define what messages I will get as an XML stream (sent as UDP packets). Is there a way to parse the schemas into a set of java classes that match the fields in the schema? If so, next think would be to feed a string or byte array to instances of these objects and have a method that parses it and fills all the fields. But is the first part possible? Somebody linked http://www.cafeconleche.org/books/xmljava/chapters/ in another thread, but that seems to be for regular XML, not schema, unless I'm confused which is entirely possible, I'm new to XML and using it in Java in this way.

    For future reference, [Java API for XML Binding|http://www.dummies.com/WileyCDA/DummiesArticle/Building-Custom-Code-with-Java-API-for-XML-Binding-JAXB-.id-1489,subcat-BUILDING.html] (JAXB) allows for [generation of Java classes|http://www.oracle.com/technology/pub/articles/marx-jse6.html] from XML Schema (or even DTD) using its xjc compiler.

  • How to get user information in a standalone java class

    Is there a way to retrieve it in a stand alone java class (with no access to request object)? If so how do I get it?
    Thanks,
    Deepak

    Hi
    use this
    IWDClientUser currentUsers[]=WDClientUser.getClientUsers();
              //Displaying the count of logged on users
              wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal - "+(currentUsers.length-1));
              for(int i=0;i<currentUsers.length;i++){
                 if(currentUsers<i>!=null){
                     // Displaying the logged on users;
                     if(!currentUsers<i>.getLastName().equals("Guest")){
                          String first= currentUsers<i>.getFirstName();
                          wdComponentAPI.getMessageManager().reportSuccess("User - "currentUsers<i>.getFirstName()" "+currentUsers<i>.getLastName());
        //@@end

  • Help in creating a Java class to convert Html source to XML

    He Everyone!
    I am using selenium as my automation tool
    I got the htmlsource of the page using selenium.
    Now i have to write a Java class which will convert the data (html source)
    (and output a data structure in standard XML format
    Can anyone give me an example codejava class) in how to acheive this please?
    Please mail to
    [email protected]
    Many thanks

    getafix14 wrote:
    Can anyone give me an example codejava class) in how to acheive this please?
    Please mail to
    [email protected]
    Sorry Charlie, but this isn't a "mail me the codez" forum. Either use Google, or try to share your problem and their solutions in the forum. Besides, a little Googling will find you a solution.

  • How to pass an argument to a standalone java class in JDeveloper

    To the experienced:
    In JDeveloper when you write a java class with a main() method that takes no argument, you just right click the java file and select Run to run the program. But suppose the main() method takes arguments, how do you pass your arguments to the program? This is especially a problem as I use the studio version of JDeveloper (Versions 10.1.3.4 and 11.1.1.3) that each uses the version of JDK bundled with it, rather than the JDK (which is yet another different version) installed at the OS level of the PC.
    Many thanks for your help!
    Newman

    Hi, Puthanampatti,
    Suppose a java class has a main() method:
    <pre>
    public class FormatTerm {
    public static void main(String[] args) {
    String year = args[0];
    String semester = args[1];
    </pre>
    What I want to know is how to pass the arguments when invoking FormatTerm within JDeveloper (i.e., without going out of JDeveloper to invoke FormatTerm on a command line in DOS). I would appreciate it very much if you know how to do that in JDeveloper 11g (I use Version 11.1.1.3) and could help me out.
    Thank you very much for your help!
    Newman

  • Standalone java class

    hi, i have written a java file that works fine when i run it with a jsp file in weblogic. now i need to extract the class file as a standalone to run in a batch file. i got the following error:
    Exception in thread "main" javax.naming.NoInitialContextException: Need to spec
    fy class name in environment or system property, or as an applet parameter, or
    n an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at myw_batch.Schedule.<init>(Schedule.java:72)
    at test.main(test.java:11)
    my database connection is as follow in my code:
    ctx = new InitialContext();
    ds = (DataSource)ctx.lookup("mydatasource");
    con = ds.getConnection();
    since my db data source is configured at the weblogic end, so will my standalone be able to reuse the data source? thks in advance.

    Like it says, you
    "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"
    You can find out about it here: http://java.sun.com/products/jndi/tutorial/beyond/env/source.html
    These are the default settings for weblogic.
    You probably need these in a jndi.properties file
    java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://127.0.0.1:7001alternative is to try something like this:
    Map env= new HashMap();
    params.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
    params.put("java.naming.provider.url", "t3://127.0.0.1:7001");
    ctx = new InitialContext(env);
    ...

  • Not able to create a java class included in custom jar from script

    Hi,
    We need to call a third-party web service from within SAP Sourcing and so we have created and deployed a custom JAR. However I am not able to create any of the custom classes included in this object. I have created a simple JAR file having just a "Hello World" message and got our BASIS team to deploy this (they deployed using the steps mentioned in Installation Guide Section 4.2.4 - we are using Sourcing Wave 9). I have added the required import statement in my test script and included this line:
    HelloWorld test = new HelloWorld();
    When this script executes, it gives the error:
    Class:HelloWorld not found in namespace.
    Can you please give your suggestions on how to fix this error?
    Thanks,
    Gayathri

    The issue was fixed after including the custom jar in esourcing90/lib folder and redeploying

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Help on creating Java Classes from WSDL in JDev 10.1.3

    Hi all,
    I am creating Java Web Service Class in JDev 10.1.3 based on my WSDL file, but I am getting a JAVA class for each Element in my WSDL, and each class has its own methods. But what I need is to have Only ONE Class with the Elements wrapped as methods in this class (this is the result I had when I was using JDev 9.0.2 but I had Datatype conversion issue, so now I am trying to do the same with JDev 10.1.3)
    My WSDL file is as follows:
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
    - <s:element name="Connect">
    <s:complexType />
    </s:element>
    - <s:element name="ConnectResponse">
    <s:complexType />
    </s:element>
    - <s:element name="Disconnect">
    <s:complexType />
    </s:element>
    - <s:element name="DisconnectResponse">
    <s:complexType />
    </s:element>
    - <s:element name="GetPIValue">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="piTAG" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="piTS" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetPIValueResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="GetPIValueResult" type="s:double" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="double" type="s:double" />
    </s:schema>
    When creating the JAVA Classes in JDev, I am getting the following:
    Connect.java
    ConnectResponse.java
    Disconnect.java
    DisconnectResponse.java
    GetPIValue.java
    GetPIValueResponse.java
    But what I actually need is to have a Method GetPiValue that should take in 2 paramters as strings and return a Double Value. Now the GetPIValue looks like this:
    package ConnecttoPI;
    public class GetPIValue implements java.io.Serializable {
    protected java.lang.String piTAG;
    protected java.lang.String piTS;
    public GetPIValue() {
    public java.lang.String getPiTAG() {
    return piTAG;
    public void setPiTAG(java.lang.String piTAG) {
    this.piTAG = piTAG;
    public java.lang.String getPiTS() {
    return piTS;
    public void setPiTS(java.lang.String piTS) {
    this.piTS = piTS;
    With this class Generated, how can I call the Class Methods and get the response?
    Do I have to change the way/settings when I am creating the Java Classes using the Wizard? Why is the Wrapper wrapping the WSDL in multiple classes?
    Thanks to anyone's help in advance.
    Regards,
    Baz

    An update to my previous Post:
    After creating the Web Service proxy based on my WSDL file, I tested the Web Service Call from the Java Class (Service1SoapClient) and it is properly Calling the Web Service passing in String Paramters (2 Strings) and returning a Double Datatype. The Class is as below:
    package project1.proxy;
    import oracle.webservices.transport.ClientTransport;
    import oracle.webservices.OracleStub;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Stub;
    public class Service1SoapClient {
    private project1.proxy.Service1Soap _port;
    public Service1SoapClient() throws Exception {
    ServiceFactory factory = ServiceFactory.newInstance();
    _port = ((project1.proxy.Service1)factory.loadService(project1.proxy.Service1.class)).getService1Soap();
    * @param args
    public static void main(String[] args) {
    try {
    project1.proxy.Service1SoapClient myPort = new project1.proxy.Service1SoapClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    double testResponse = myPort.getPIValue("A3LI004.pv", "9/9/2007 9:20 am");
    System.out.println("response from PI " + testResponse);
    } catch (Exception ex) {
    ex.printStackTrace();
    * delegate all operations to the underlying implementation class.
    Connect to PI Server
    public void connect() throws java.rmi.RemoteException {
    _port.connect();
    Disconnect from PI Server
    public void disconnect() throws java.rmi.RemoteException {
    _port.disconnect();
    Retrieve PI Values
    public double getPIValue(String piTAG, String piTS) throws java.rmi.RemoteException {
    return _port.getPIValue(piTAG, piTS);
    Now I am trying to IMPORT this class into Oracle Forms, but I am getting the following Error:
    Importing Class project1.proxy.Service1SoapClient...
    Exception occurred: java.lang.NoClassDefFoundError: oracle/webservices/transport/ClientTransport
    First, is this the Correct Class that should be Imported into Oracle Forms in order to Trigger the Java Class to Call the Web Service? Why am I getting this Error? I have read that this could be because of my CLASSPATH environment variable or the J2SE version compiling the java class???
    Can someone help me to IMPORT this Java Class properly into Oracle Forms and Call the Web Service?
    Many thanks for your help,
    Baz

  • Create java class/resource from binary blob in SQL statement

    Is there a way of creating a java class or resource from a binary blob in the CREATE JAVA CLASS statement? Something like:
    CREATE OR REPLACE JAVA CLASS
    USING BLOB 'CAFEBABE0000003100120A0004000D08000E07000F0700100100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000372756E01001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501001152657475726E537472696E672E6A6176610C0005000601001F546869732069732061206E657720737472696E67207269676874206865726501000C52657475726E537472696E670100106A6176612F6C616E672F4F626A65637401000F6175726F72615F6F70745F696E666F002100030004000000000002000100050006000100070000001D00010001000000052AB70001B10000000100080000000600010000000100090009000A000100070000001B00010000000000031202B0000000010008000000060001000000030002000B00000002000C00110000004C00000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009705070397050703';
    I've tried various combinations of casting & convert functions, all of them give an ORA-29506 error 'Invalid query derived from USING clause', and nothing useful is gained from google about this. Is there a way of specifying the class binary in this way?

    You can load Java classes into the database, then create a PL/SQL procedure or function in the database that calls that Java class.
    This leaves you with a standard PL/SQL procedure/function which you can call from Oracle Forms.
    Have a look at the database documentation on how to load a Java class: http://download.oracle.com/docs/cd/A91202_01/901_doc/java.901/a90210/toc.htm

  • How to use the java class created by  "CONTIVO" as web sevrvice?

    Hi All,
    We are creating the java class by the Contivo mapping tool, how to use that class as a web serivce?
    Very thankful if anyone gives some light on this.
    Thanks in advance.....
    rgds,
    Rajeev Pariyadathu

    com.contivo.runtime.dom.Transform
    Transform.transform(     "Transform_HotelAvailRQ_",file1, file2);, like this we can use the contivo generated class

  • Create data control from java class, not see "ADF Parameter Forms" option

    Hi,
    I have created a Fusion Web Application (ADF) in jdev 11g. In the application model project, I created a java class. Inside the java class, I have a public method as below
    public Asset [] searchAsset3(SearchTerm s) // SearchTerm is a java bean. It implements java.io.Serializable.
    I created data control from my java class. After that, I see an xml file generated under the same folder of my java class. Here is the xml content.
    <?xml version="1.0" encoding="UTF-8" ?>
    <JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.53.62"
    id="AIAAsset" Package="oracle.apps.aia.oer.model"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset" isJavaBased="true">
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.AssetSummary"
    BeanClass="com.flashline.registry.openapi.entity.AssetSummary"
    id="searchAssetSummary" ReturnNodeName="AssetSummary"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    <ParameterInfo id="type" Type="java.lang.String" isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset3" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="s" Type="com.flashline.registry.openapi.query.SearchTerm"
    isStructured="true"/>
    </MethodAccessor>
    <ConstructorMethod IsCollection="true"
    Type="oracle.apps.aia.oer.model.AIAAsset"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset"
    id="AIAAsset"/>
    </JavaBean>
    Then, in application user interface project, I created a JSPX page. From the data controls palette, I want to drag and drop the searchAsset3 onto my page. However, I don't see an option for me to choose "Create -> Parameters -> ADF Parameter Form". I only see "Create -> Methods". Unlike other public methods (e.g.searchAssetSummary and searchAsset) which have simple data type as input, I can see the "Create -> Parameters -> ADF Parameter Form" option when I drag and drop to my jspx page. Is that something I missed while creating data controls?
    Thanks.
    Arnold.

    Then, my other question is how do you do the bindings? I drag and drop the attributes from SearchTerm bean. Now the pagedef file has the AttributeValues added but my method is actually expecting one input parameter of type SearchTerm. How do you bind the attributes to the input of the method? Thanks.
    See below of my pagedef xml file.
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.53.62" id="SearchAssetBySearchTerm1PageDef"
    Package="oracle.apps.aia.oer.view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <methodIterator Binds="SearchTerm.result" DataControl="AIAAsset"
    RangeSize="25"
    BeanClass="com.flashline.registry.openapi.query.SearchTerm"
    id="SearchTermIterator"/>
    </executables>
    <bindings>
    <methodAction id="SearchTerm" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="SearchTerm"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    ClassName="com.flashline.registry.openapi.query.SearchTerm"
    ReturnName="AIAAsset.methodResults.SearchTerm_AIAAsset_SearchTerm_result"/>
    <attributeValues IterBinding="SearchTermIterator" id="key">
    <AttrNames>
    <Item Value="key"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="operator">
    <AttrNames>
    <Item Value="operator"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="value">
    <AttrNames>
    <Item Value="value"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="searchAsset3" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="searchAsset3"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    InstanceName="AIAAsset.dataProvider"
    ReturnName="AIAAsset.methodResults.searchAsset3_AIAAsset_dataProvider_searchAsset3_result">
    *<NamedData NDName="s"*
    NDType="com.flashline.registry.openapi.query.SearchTerm"/>+
    </methodAction>
    </bindings>
    </pageDefinition>

Maybe you are looking for

  • Filter a tableview based on a column value-Navigation Issues.

    Hi, I have a table view with total 99 values. The values are displayed in 10 tabs of the table view with 9 values in each tab.I go to the third tab and select a column value, which triggers an event and filters the result list from 99 to 12. I am sim

  • HP7520 printing with photoblack cartridge instead of the regular large black cartridge.

    Is there a way to select  which black cartridge the HP7520 should use? I am printing text documents but the printer repeatedly uses the photoblack cartridge. I have replaced the setup cartridges and have authentic HP cartridges but have still found t

  • Session Problems in Servlets

    Hi i had one doubt in session (servlet) I had deploy two application in tomcat with two different war files e.g., A.war and B.war., At one situation i am forward my application from A to B at the time i had store some values in session in A and Pass

  • Pls tell me about AUC

    hi i need a concept about auc. I know the configuration of asset management. is there need any extra knowledge to configure auc? please tell me.

  • Applying oracle patchset in oracle-dataguard environment

    Hello There, I wish to apply oracle patchset in oracle dataguard environment. can you please let me know the steps that has to be taken on Primary & standby database? is there any specific document for this? DB - oracle 10.2.0.4 OS - Linxu x86_64 Bes