Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-15-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
how to call IcePack in php

hi,

I use IcePack to administrate my servers now. It works well. I hope find my proxy by IcePack in PHP. Should I write the PHP code?

The endpoint of IcePack Node is "default -p 12000".

In C++, the codes are followed:

IcePack::QueryPrx query = IcePack::QueryPrx::checkedCast(communicator->stringToProxy("IcePack/Query"));
CalculatorPrx calc = CalculatorPrx::checkedCast(query->findObjectByType("::Calc"));

In PHP, I don't know.

Thanks in advance.

Regards,
__________________
Fengxb
Reply With Quote
  #2 (permalink)  
Old 10-15-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
The code to do this in PHP is pretty similar:
Code:
$query = $ICE->stringToProxy("IcePack/Query")->ice_checkedCast("::IcePack::Query");
$obj = $query->findObjectByType("::Calc");
if($obj != null)
{
    $calc = $obj->ice_checkedCast("::Calculator");
}
Hope that helps,
- Mark
Reply With Quote
  #3 (permalink)  
Old 10-17-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
Thanks for your reply.

If the IcePack node is reside on another host whose IP is '192.168.0.157', how to specifiy the endpoint?

Regards,
__________________
Fengxb
Reply With Quote
  #4 (permalink)  
Old 10-17-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
Quote:
Originally posted by fengxb
If the IcePack node is reside on another host whose IP is '192.168.0.157', how to specifiy the endpoint?
Use -h 192.168.0.157. See Appendix D in the Ice manual for more information.

Take care,
- Mark
Reply With Quote
  #5 (permalink)  
Old 10-18-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
In the example, $obj can be got. But next statement throws an exception: [unknown] => Reference.cpp:711: Ice::NoEndpointException:
no suitable endpoint available for proxy `CalculatorApp -t @ CalculatorApp.Calculator'

BTW, client is on another machine. Does I miss some configure?
__________________
Fengxb
Reply With Quote
  #6 (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
Did you define the Ice.Default.Locator property in the PHP configuration? If not, that is most likely the reason for the exception. See the IcePack chapter in the manual for more information on this property.

Take care,
- Mark
Reply With Quote
  #7 (permalink)  
Old 10-18-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
Thanks a lot. I have resolve the problem by adding a definition in PHP configuration.
__________________
Fengxb
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
multithread call of ICE JAVA client stanley Help Center 1 09-08-2006 01:34 AM
Simultaneously function call AlexKom Help Center 2 09-04-2005 04:26 AM
about ice_oneway call level Bug Reports 1 01-27-2005 12:48 PM
how to match different request-response in ami call? timeguest Help Center 1 10-28-2004 08:25 AM
I need ICE C# client call my ICE C++ server damingyipai Help Center 4 08-13-2004 01:54 AM


All times are GMT -4. The time now is 06:01 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.