Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-18-2004
griffima griffima is offline
Registered User
 
 
Join Date: Oct 2004
Location: Connecticut, USA
Posts: 17
ice_checkedCast fails

I can't figure out where I'm mishandling ice_checkedCast.

Real simple script:

PHP Code:
Ice_loadProfile("Test");
$proxy $ICE->stringToProxy("test:tcp -p 12001"); // i called this "test" when i added it to the server's adaptor
$proxy $proxy->ice_checkedCast("TestServer::TestClass");
$proxy->write("Test"); 
Fails on write() with Fatal error: main(): unknown operation in c:\Code\www\docroot\icetest.php on line 6

before write() is performed, $proxy is still an Ice_ObjectPrx Object and a typed proxy. The manual leads me to believe that checkedCast is failing and thus returning a null proxy. If I put in anything but TestServer::TestClass I get an error that there is no slice defined, as one would expect.

Here's the slice, let me know what you think.
Code:
module TestServer {
	
	interface TestMethods {
		string getString();
		int getInt();
	};
	
	class TestObject implements TestMethods
	{
		int id;
	};
	
	interface TestClass 
	{
		void throwError();
		
		TestObject getObject(int id);
		int getInt();
	};

};
Reply With Quote
  #2 (permalink)  
Old 10-18-2004
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi,

Your code is attempting to invoke the operation write using the proxy. However, I don't see any such operation defined in your Slice code, so I'm not surprised you're getting an error. What is this code attempting to do?

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 10-19-2004
griffima griffima is offline
Registered User
 
 
Join Date: Oct 2004
Location: Connecticut, USA
Posts: 17
It's defined in mine. I must have had an older copy open in a buffer, sorry.

Anyway, the problem has to do with ICE preloading the slice definition. I needed to cycle the webserver. It works now. :-D
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice in a DLL fails unexpectedly? ddunn Help Center 9 10-04-2006 06:38 PM
IcePy 2.0.0 fails, hangs on Mac OS X 10.3 Michael Halle Bug Reports 1 11-30-2004 11:07 AM
demo build fails in prebuild dlyall Bug Reports 1 09-02-2004 07:47 PM
Slice test fails marlowa Bug Reports 3 02-20-2003 10:16 AM


All times are GMT -4. The time now is 06:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.