com/scalagent/kjndi/ksoap/SoapNamingContext.java

00001 /*
00002  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
00003  * Copyright (C) 2003 - ScalAgent Distributed Technologies
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00018  * USA.
00019  *
00020  * Initial developer(s): Nicolas Tachker (ScalAgent)
00021  * Contributor(s):
00022  */
00023 package com.scalagent.kjndi.ksoap;
00024 
00025 import java.util.Vector;
00026 import java.util.Hashtable;
00027 
00028 public class SoapNamingContext {
00030   private String serviceUrl = null;
00031 
00032   HttpConnection httpConnection = null;
00033 
00034   public SoapNamingContext(String soapHost, int soapPort)
00035          throws Exception {
00036 
00037     // Building the service URL:
00038     serviceUrl = "http://" + soapHost + ":" + soapPort
00039       + "/soap/servlet/rpcrouter";
00040 
00041     httpConnection = new HttpConnection(serviceUrl);
00042   } 
00043 
00044   public void bind(String name, Object obj) throws Exception {
00045     httpConnection.call("bind",name,obj);
00046   }
00047 
00048   public void rebind(String name, Object obj) throws Exception {
00049     httpConnection.call("rebind",name,obj);
00050   }
00051 
00052   public Object lookup(String name) throws Exception {
00053     return httpConnection.call("lookup",name,null);
00054   }
00055 
00056   public void unbind(String name) throws Exception {
00057     httpConnection.call("unbind",name,null);
00058   }
00059 }

Generated on Tue Sep 16 16:14:23 2008 for joram by  doxygen 1.5.0