Accessing Java Classes from Webservice Stubs

So far I have been able to call a web service and copy the appropriate directories and files to the designated class path.  I can also successfully access a class file like this:
MyObject = CreateObject("java", "ca.x.y.z.TestCollection.TestItem");
However, whenever I try to do something with that variable, I get a white screen.  Any text that should have appeared before the command, will appear, but nothing appears afterwards, not even debugging info.  Here are a couple of commands that will cause this to happen.
<cfdump var = "#MyObject#">
MyObject = CreateObject("java", "ca.x.y.z.TestCollection.TestItem").init();
x = MyObject.init();
Anybody have any ideas?

Ah, nothing like a fresh set of eyes to remind of the fundamentals.  Thank you for that.
I actually could create a normal error by calling a method incorrectly.  I would see the grey box and my debgging info would appear.  However, if I did something I expected to succeed, it would seem to stop.  Any text above that command would appear.  No error message, no de-bugging.
But I didn't think to look in our error log.  I see things like:
Could not initialize class com.microsoft.schemas._2003._10.Serialization.Arrays.ArrayOfstring
or
org.apache.axis.description.TypeDesc.(Ljava/lang/Class;Z)V
At least it's not a mystery anymore.  Thanks again for suggesting the error log.

Similar Messages

  • Accessing Java Classes from Forms

    Is is possible to access a Java class from Forms? I have been
    creating an Active X control that returns a Java object, and from
    that I can call methods on that object, but I would really like
    to do that without having and Active X control in the mix. Any
    suggestions?
    null

    Oracle Developer Team wrote:
    : Robert Nocera (guest) wrote:
    : : Oracle Developer Team wrote:
    : : : hey robert -
    : : : Developer 6.0 provides this ability for web deployment.
    You
    : : can
    : : : insert your own custom Java components into your
    application
    : : and
    : : : they will appear in the application when it is run via the
    : web.
    : : : If you look at the documentation for 6.0, there are a few
    : : : section son Pluggable Java Components and JavaBeans that
    : : : describes what is provided and how you use the interfaces
    : and
    : : : classes we provide.
    : : : A whitepaper on this topic will be posted to the OTN
    : shortly,
    : : as
    : : : well as some samples that illustrate how to go about doing
    : it.
    : : : cheers!
    : : : -Oracle Developer Team-
    : : Thanks for the quick response. Is there any way to access
    : those
    : : classes without being in a web deployment. That's probably
    : not
    : : totally out of the question, but what we had in mind was
    : adding
    : : some Java Functionality (actually connectictivity to some
    EJBs
    : : that we have) to existing forms. Currently there forms are
    : not
    : : deployed in a "web" environment and are just run from the
    : forms
    : : runtime engine.
    : : -Rob
    : hey again robert -
    : there's no easy way (yet!) to call out from forms runtime
    : process to a Java application.
    : We've played around some with creating an ORA_FFI interface to
    : JNI and then wrappering this with PL/SQL code. We've been able
    : to make calling into an EJB running in 8i from a forms runtime
    : work using this approach.
    : Let me know if this is of interest to you and I can post the
    : stuff we've currently got. It's no more than a simple demo and
    : is not complete. It requires quite a bit of manual coding on
    : the PL/SQL side since the interface emulates JNI (FindClass,
    : GetMethodID, CallMethodID, etc.).
    : cheers!
    : -the Oracle Developer Team-
    I'd be interested in this ORA_FFI doc you've been playing with.
    Would you please email it to me or post it.
    null

  • Accessing java classes from javascript

    Hi,
    I have the following javascript function
    function testjava {   
        var myString = new java.lang.String("Hello world"); // line 1
        alert("len:"+myString.length()); // line 2
    }It gives me a error at line 1 saying "'java' is undefined" in IE browser 5.5 sp2. But, both the lines execute correctly in netscape 6.
    Can someone please help..
    Thanks,
    Vijay.

    It seems that IE 5.5 doesn't support accessing java classes in JavaScript, so try to install IE 6 to see if it works or maybe, you doesn't have installed propertly support for JVM in IE.

  • Accessing a Java class from C when class is in a package

    I'm accessign a java class from C using JNI: The JVM exists and I can access the class fine:
    jclass cls; //java class
    cls = (*env)->FindClass(env, "MyClass");
    However when I put the class in a package I can't access it
    cls = (*env)->FindClass(env, "mypackage.MyClass");
    Does anyone know How I can access a java class in a package using JNI.
    Thanks
    ..

    Been a while since I've done anything with JNI, But... Did you try this:
    cls = (*env)->FindClass(env, "mypackage/MyClass");

  • Access a normal java class from EJB

    how can i access normal java class from an EJB.
    I do not want to write the business logic inside the EJB. How can I achieve this.

    There's no special API for doing this. Just use normal java. E.g.
    @Stateless
    public class FooBean implements Foo {
    public void foo() {
    // access non-EJB utility class Bar
    Bar b = new Bar();
    b.bar();
    }

  • How can i return an object isn't java object from webservice????

    Hi !
    I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
    How can i do it ??
    Please help me !
    Thanks a lot !!!!!
    class ClientRequest {
    public static int i;
    public static String s;
    public ClientRequest() {
    }

    You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • I want to call External Java class from the PL/SQL

    Hi,
    I am using Oracle Apps R11i (11.5.7), I wanted to call external Java class from the PL/SQL. This external Java class is residing in another application server.
    How do I do this.
    I know one way. Develop C routine in Oracle Apps to call external java class and call this C routine from the PL/SQL.
    Is there any simple method available? or any other method?
    Thanks in advance.
    -Venkat

    First of all, this is a Java application you're talking about, right (i.e. it has a main() function)? It's not just a class that you're trying to instantiate is it? If it's an application, you obviously have to start a new virtual machine to run it (rather than using the virtual machine built into the database like stored java). I'm a little leary of your mention of an "application server" as this would more commonly mean that a virtual machine is already over there running with access to this class. In which case, you'd typically interface with SOAP or some other RPC API.
    All that aside, as long as you have physical disc access (through NFS or whatever) to the class file, you could use a java wrapper class with a system call to do this. In fact, there is a thread in just the last day or so on this very forum that has the code to do just that (see " Invoking OS Commands from PL/SQL"). However, it's worth noting that the virtual machine will be running on the database server in this case and not the application server.

  • (how) can I access Java APIs from web-page-hosted JavaScript?

    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?
    Thanks in advance for your time and consideration.

    John L. wrote:
    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?As far as I can remember that was actually possible in the very first versions of Netscape because Netscape really wanted to pretend Javascript and Java were meant to be used together. But they soon removed that functionality. Can you guess why?
    Because people were using the File/IO classes to easily steal or remove files on the harddrive, among other such niceties. You do NOT want to have such control from a web application. People will abuse it.

  • Calling java class from abap function moduile

    Is it possible to call java class from function module.
    i am a java guy. my need is to call a java class from a  function module in the backend. which in turn performs certain functions.
    i would be highly obliged if someone could let me know if this is possible.
    regards
    Srikumar V

    Hi Srikumar ,
    you can call a java webservice in ABAP .
    u can call the webservice and via that u can trigger the java class..
    Regards
    Renu

  • How to read static variable defined java class from flex?

    This is a beginner question. If I use remoteClass to map a java class and a flex class, how can I access a static variable defined in java class from the flex code?
    Thanks!

    Static propeties are by default ignored in the blazeds for serialization. You can try using another global property in the java bean which maps to the value stored in the static property( Hopefully it should work)
    eg,
    public String instanceValue = ClassName.staticValue;
    Ref: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.ht ml

  • Calling a java class from a java web service

    I have deployed a web service to weblogic 8.1 SP5 and now i want to call a simple java class from that web service.How can i do it.

    Hi jazz123,
    There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client.

  • Calling java class from SLSB

    I am trying to call a java class from SLSB . There are external jars which are imported in my java class . When i try to instatiate the java class in SLSB. It ia not able to access the external jars. It gives the following exception :
    0000002e ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "applyRules" on bean "BeanId(MDB_SLSBEAR#MDB_SLSB.jar#msgProcess, null)". Exception data: java.lang.NoClassDefFoundError: org.springframework.context.ApplicationContext
    My code is as follows :
    SLSB:
    package com.vsnl.ejbs;
    import com.vsnl.pricing.bizObjects.CustomizedRateRequest;
    import com.vsnl.pricing.bizObjects.RateRequest;
    import com.vsnl.pricing.dao.ARR.AutoprocsMain;
    import org.springframework.context.ApplicationContext;
    * Bean implementation class for Enterprise Bean: msgProcess
    public class msgProcessBean implements javax.ejb.SessionBean {
    static final long serialVersionUID = 3206093459760846163L;
    private javax.ejb.SessionContext mySessionCtx;
    * getSessionContext
    public javax.ejb.SessionContext getSessionContext() {
    return mySessionCtx;
    * setSessionContext
    public void setSessionContext(javax.ejb.SessionContext ctx) {
    mySessionCtx = ctx;
    * ejbCreate
    public void ejbCreate() throws javax.ejb.CreateException {
    * ejbActivate
    public void ejbActivate() {
    * ejbPassivate
    public void ejbPassivate() {
    * ejbRemove
    public void ejbRemove() {
    public void applyRules(CustomizedRateRequest customizedRateRequest){
    System.out.println("RR ID in SLSB***"+customizedRateRequest.getProductCustomerId());
    System.out.println("RR ID in SLSB$$$"+customizedRateRequest.getIsDestFlag());
    try{
    System.out.println(" before the callng of commented function ");
    AutoprocsMain autoprocsMain = new AutoprocsMain();
    System.out.println(" after making instance ");
    //autoprocsMain.applyRules(customizedRateRequest);
    catch(Exception e){
    e.printStackTrace();
    My Java Class:
    package com.vsnl.pricing.dao.ARR;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import java.util.ArrayList;
    import java.util.List;
    import com.vsnl.pricing.dao.ARR.Base;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.apache.log4j.Logger;
    import org.drools.FactHandle;
    import org.drools.RuleBase;
    import org.drools.RuleBaseFactory;
    import org.drools.WorkingMemory;
    import org.drools.compiler.PackageBuilder;
    import org.drools.rule.Package;
    import org.springframework.context.ApplicationContext;
    import com.vsnl.pricing.bizObjects.Customer;
    import com.vsnl.pricing.bizObjects.RateRequest;
    import com.vsnl.pricing.interfaces.ARR.IARRDAO;
    import com.vsnl.util.VSNLLogger;
    import com.vsnl.pricing.bizObjects.InnerObject;
    import com.vsnl.pricing.bizObjects.CustomizedRateRequest;
    public class AutoprocsMain extends Base{
    private static Log log=LogFactory.getLog(AutoprocsMain.class);
    private static Logger logger = Logger.getLogger(Invoker.class);
    ApplicationContext ctx;
    //ApplicationContext ctx;//=configure();
    IARRDAO autoprocsDAO;//=(IAutoprocsDAO)ctx.getBean("autoProcDAOTarget");
    public AutoprocsMain() {
    System.out.println(" inside the Autoproc constructor");
    //VSNLLogger.debug(logger, "before creatiom of CTX");
    //System.out.println(" before creation of CTX ");
    try{
    //System.out.println(" inside the Autoproc constructor");
    ApplicationContext ctx=configure();
    autoprocsDAO=(IARRDAO)ctx.getBean("arrTarget");
    catch(Exception e)
    //VSNLLogger.error(logger, e.getMessage());
    //VSNLLogger.debug(logger, "after creation of CTX");
    //System.out.println(" after creation of CTX ");
    public void applyRules(CustomizedRateRequest customizedRateRequest)throws Exception{
    RateRequest rateRequest=new RateRequest();
    List rateRequestObjs= new ArrayList();
    List<CustomizedRateRequest> CustomizedRateRequestObjs=new ArrayList<CustomizedRateRequest>();
    try{
    //rateRequest= autoprocsDAO.getRecord();
    rateRequestObjs=autoprocsDAO.getAllRateRequests();
    //VSNLLogger.debug(logger, " AFTER THE CALL OF getAllRateRequests() function ");
    CustomizedRateRequestObjs=autoprocsDAO.getCustomizedObjects(rateRequestObjs);
    catch(Exception e)
    //VSNLLogger.error(logger, e.getMessage());
    RuleBase ruleBase=readRule();
    WorkingMemory workingMemory = ruleBase.newStatefulSession();
    FactHandle handle =workingMemory.insert(customizedRateRequest);
    //customizedRateRequest.setContinueRule("1");
    workingMemory.fireAllRules();
    if(CustomizedRateRequestObjs.size()>0)
    FactHandle handle =workingMemory.insert(CustomizedRateRequestObjs.get(0));
    for(int i=0;i<CustomizedRateRequestObjs.size();i++)
    CustomizedRateRequest customizedRateRequest=CustomizedRateRequestObjs.get(i);
    customizedRateRequest.setContinueRule("1");
    workingMemory.modifyInsert(handle,customizedRateRequest );
    workingMemory.fireAllRules();
    System.out.println(" after the firing of all rules ");
    public static void main (String args[])
    AutoprocsMain procsMain = new AutoprocsMain();
    try{
    procsMain.applyRules();
    catch(Exception e)
    e.printStackTrace();
    private static RuleBase readRule() throws Exception {
    System.out.println(" ****** inside readrule &&&& ");
    //read in the source
    Reader source = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/Sample.drl" ) );
    // Reader source1 = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/com/vsnl/resources/Sample2.drl" ) );
    //Reader source = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/com/vsnl/resources/CustomerDiscount.drl" ) );
    //optionally read in the DSL (if you are using it).
    //Reader dsl = new InputStreamReader( DroolsTest.class.getResourceAsStream( "/mylang.dsl" ) );
    //Use package builder to build up a rule package.
    //An alternative lower level class called "DrlParser" can also be used...
    System.out.println(" after package builder ");
    PackageBuilder builder = new PackageBuilder();
    System.out.println(" after package builder ");
    //this wil parse and compile in one step
    //NOTE: There are 2 methods here, the one argument one is for normal DRL.
    builder.addPackageFromDrl( source );
    System.out.println(" after add package source");
    //builder.addPackageFromDrl(source1);
    System.out.println(" after add package source1");
    //Use the following instead of above if you are using a DSL:
    //builder.addPackageFromDrl( source, dsl );
    //get the compiled package (which is serializable)
    Package pkg = builder.getPackage();
    System.out.println(" after get package ");
    //add the package to a rulebase (deploy the rule package).
    RuleBase ruleBase = RuleBaseFactory.newRuleBase();
    ruleBase.addPackage( pkg );
    System.out.println(" end of read rule function");
    return ruleBase;
    public IARRDAO retBean()
    return null;
    }

    Hi i am new to EJB .
    please explain me the problem ..and kindly tell me to how to add this in classpath. I am using webSphere application server.
    I added this in the classpath in the startup script.
    I also added all the required jars in the EAR libraries ( I am using the RAD IDE).
    Please help.

  • XFIRE - Java class from wsdl and soap request from java class

    Hi,
    Firstly i'm newbie programmer with little experience, so please help me if u can.
    I have found an example on how to create java classes from WSDL under maven:
    (...)<taskdef classname="org.codehaus.xfire.gen.WsGenTask" name="wsgen">(...)
    I've created the below java class and I create new object of this class: UploadChunk up = new UploadChunk()
    and up.setSomething(123) etc....
    I have some service for which I have to prepare soap request manually - suitable for my service requests.
    I'm doing it using dom4j to create xml documents and i rewrite values to it from my variable up.
    I wonder if it is possible to do it automatically - I have UploadChunk object and I want do use xFire library somehow to produce ready or almost ready soap request. I want to do it in my code, no some ant or maven task.
    So I propably need a couple line of code, when I have:
    up.setSomething(123);
    //////CONVERTION - CAN U TELL ME HOW TO DO THAT PLEASE? I haven't found the way :( it seems I need your help.
    //////Document result =....
    callService(result,namespace,qname);
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for UploadChunk complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="UploadChunk">
    *   <complexContent>
    *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    *       <sequence>
    *         <element name="SessionID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
    *         <element name="InputFileName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
    *         <element name="Buffer" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
    *         <element name="Offset" type="{http://www.w3.org/2001/XMLSchema}long"/>
    *         <element name="BytesRead" type="{http://www.w3.org/2001/XMLSchema}int"/>
    *       </sequence>
    *     </restriction>
    *   </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "UploadChunk", propOrder = {
        "sessionID",
        "inputFileName",
        "buffer",
        "offset",
        "bytesRead"
    public class UploadChunk {
        @XmlElement(name = "SessionID")
        protected String sessionID;
        @XmlElement(name = "InputFileName")
        protected String inputFileName;
        @XmlElement(name = "Buffer")
        protected byte[] buffer;
        @XmlElement(name = "Offset")
        protected long offset;
        @XmlElement(name = "BytesRead")
        protected int bytesRead;
         * Gets the value of the sessionID property.
         * @return
         *     possible object is
         *     {@link String }
        public String getSessionID() {
            return sessionID;
         * Sets the value of the sessionID property.
         * @param value
         *     allowed object is
         *     {@link String }
        public void setSessionID(String value) {
            this.sessionID = value;
         * Gets the value of the inputFileName property.
         * @return
         *     possible object is
         *     {@link String }
        public String getInputFileName() {
            return inputFileName;
         * Sets the value of the inputFileName property.
         * @param value
         *     allowed object is
         *     {@link String }
        public void setInputFileName(String value) {
            this.inputFileName = value;
         * Gets the value of the buffer property.
         * @return
         *     possible object is
         *     byte[]
        public byte[] getBuffer() {
            return buffer;
         * Sets the value of the buffer property.
         * @param value
         *     allowed object is
         *     byte[]
        public void setBuffer(byte[] value) {
            this.buffer = ((byte[]) value);
         * Gets the value of the offset property.
        public long getOffset() {
            return offset;
         * Sets the value of the offset property.
        public void setOffset(long value) {
            this.offset = value;
         * Gets the value of the bytesRead property.
        public int getBytesRead() {
            return bytesRead;
         * Sets the value of the bytesRead property.
        public void setBytesRead(int value) {
            this.bytesRead = value;
    }

    Hi,
    Can u Please post the WSDL..here. I remember long back i resolved this kind of issue...when i was getting "*parameters is already defined in - - -*" while using ClientGen.
    Once i will get the WSDL may be i can recall it...
    If u have any problem in Posting the WSDL..in Forums .. then let me know I will send my E-Mail Address...
    As far as i remember ..it usually happens when we Run ClientGen task of WLS81 ON the WebService/WSDL generated by WebLogic 9.x or Above. Please let me know if this is the Case with you as well... . I remember there is a Patch for it...for WLS8 ClientGen task...I dont remember the Patch Number Exactly.
    Just For testing:
    Just Use WLS9.x ClientGen task On the Same WSDL
    <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
    I am sure you will not see this issue... because the issue is there only with WLS8 Clientgen...
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)
    Edited by: Jay SenSharma on Jan 8, 2010 4:32 PM
    Edited by: Jay SenSharma on Jan 8, 2010 4:34 PM

Maybe you are looking for

  • Cannot delete iphoto synced photos

    Hi people, Somehow Iphoto has synced more than 2 gigabyte worth of photos from my macbook to my iphone 3gs and there is apparently no way for me to delete them from my phone. If i try to delete the photos i've taken with my iphone (those located in c

  • Hardware/software requirements to support cable broadband

    I have a grape iMac G3 (333mhz)running OS 8.6 and am curious to know if this system, in it's current configuration is capable of supporting broadband via cable? Cox Communications is my cable provider and their stated minimum requirments lead me to b

  • Change the name for File Type....

    H CRM Experts, How can i change the name of that button? i want it to have the name "voir" instead of "browse" <input type="File"/> Thanks Srini

  • Group by internal table

    Hi .. How can  I group an internal table instead of a similar field. For example I want to move internal table columns by same belnr's .

  • I get a circle with a slash when I hit f8, F9 or f10 to backlight keys

    My keyboard back lighting doesn't work much but I reset PMU and PRAM then suddenly it worked. Now though, about an hour later, if I hit any of the keys I get a circle with a slash as if it is turned off, illegal, or not installed. Anybody know what i