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

Web Service invocation and Complex Types (java TO's)

New Here ,
Apr 09, 2009 Apr 09, 2009

I am trying to call a java service from ColdFusion MX 8.0.1 using the following code.

I am the developer of the Java service, not a coldfusion programmer.

<cfscript>
     ws = CreateObject("WebService", "
http://myserver.us/webservices/WebInterface?WSDL");
     vali = CreateObject("Java","vo.myapplication.ContactVO");
     vali.setId(1234);
     vali.setSecondaryID(45855);
     wsResponse = ws.updateContact(vali);
</cfscript>

The call fails with "Object Instantiation Exception - Class not found: vo.myapplication.ContactVO", so i know CF is unable to load my class.

My question is why?

My stubs have been generated into

C:\jrun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\stubs\WS-254617805

and i can see ContactVO in there, in the correct package.

I can make it work if i add the absolute path of the sub directory to

Server Settings > Java and JVM > ColdFusion Class Path

Can anyone tell me why Coldfusion 8.0.1 is not dynamically loading the VO class, so that i can perform a CreateObject?

Thanks in advance!

TOPICS
Advanced techniques
534
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
Community Expert ,
Apr 12, 2009 Apr 12, 2009
LATEST

Another way to dynamically load a custom class like /vo/myapplication/ContactVO.class, besides specifying its path in the classpath, is to place it in the directory {CF_wwwroot}/WEB_INF/classes/. Mind you, I'm on the Coldfusion single-server version, on Windows.

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