1 23 package com.scalagent.kjndi.ksoap; 24 25 import java.util.Vector ; 26 import java.util.Hashtable ; 27 28 public class SoapNamingContext { 29 30 private String serviceUrl = null; 31 32 HttpConnection httpConnection = null; 33 34 public SoapNamingContext(String soapHost, int soapPort) 35 throws Exception { 36 37 serviceUrl = "http://" + soapHost + ":" + soapPort 39 + "/soap/servlet/rpcrouter"; 40 41 httpConnection = new HttpConnection(serviceUrl); 42 } 43 44 public void bind(String name, Object obj) throws Exception { 45 httpConnection.call("bind",name,obj); 46 } 47 48 public void rebind(String name, Object obj) throws Exception { 49 httpConnection.call("rebind",name,obj); 50 } 51 52 public Object lookup(String name) throws Exception { 53 return httpConnection.call("lookup",name,null); 54 } 55 56 public void unbind(String name) throws Exception { 57 httpConnection.call("unbind",name,null); 58 } 59 } 60 | Popular Tags |