Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Accessing Java Classes from Webservice Stubs

LEGEND ,
Mar 03, 2011 Mar 03, 2011

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?

TOPICS
Advanced techniques
718
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 03, 2011 Mar 03, 2011

Is the request aborting, or is it just not outputting anything?  If you CFLOG something after one of those lines, is it logging?

Do you have an onError event handler which is not outputting to screen any indication that an exception has occurred?

Anything in the exception log?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2011 Mar 04, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources