Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is Possible to call a server running an different machine (to web server) from an applet

1 view
Skip to first unread message

Black

unread,
Mar 19, 2003, 3:56:00 PM3/19/03
to
hello
Im trying to call a server from a diferent machine of the web server
where is running my applet...
Is possible that??

Here is my code:

public void fillClientList(clientListHolder clientList, JTable jtb1){

//counter to clientList
int clientSize = 0;
try{
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialHost",getParameter("InitialHost"));
props.put("org.omg.CORBA.ORBInitialPort",getParameter("InitialPort"));

// create and initialize the ORB
ORB orb = ORB.init(jappl,props);

// get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");

// Use NamingContextExt instead of NamingContext. This is
// part of the Interoperable naming Service.
NamingContextExt ncRef = NamingContextExt ncRef =
NamingContextExtHelper.narrow(objRef);

// resolve the Object Reference in Naming
String name = "Client";
Client clientImpl = ClientHelper.narrow(ncRef.resolve_str(name));

// fill the combo box
if(clientImpl.getClientList(clientList)){
for(clientSize=0; clientSize<CLIENT_SIZE.value ; clientSize++)
if(!clientList.value[clientSize][0].toString().equals(" "))
{
jtb1.setValueAt(clientList.value[clientSize][0], clientSize, 0);
jtb1.setValueAt(clientList.value[clientSize][1], clientSize, 1);
}
jt3.setText("LIST DISPLAYED.");
}

}catch (Exception e) {
System.out.println("ClientApplet Exception: " + e.getMessage()) ;
e.printStackTrace(System.out);
}
}

The applets parameters have the name of the server.. (different to web
server where is the codeBase of the applet)

And here is my error:

ClientApplet Exception:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed:
No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:148)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:638)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:580)
at com.sun.corba.se.internal.corba.ClientDelegate.is_a(ClientDelegate.java:832)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at OpClientApplet$OpClientJFrame.fillClientList(OpClientApplet.java:152)
at OpClientApplet$OpClientJFrame.actionPerformed(OpClientApplet.java:248)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)

at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:148)
......

When I run at the same machine the applet and the server it's working
fine...

Please help me!!!!

MAny thanks in advance


Black

0 new messages