测试模式
对于一个WLS客户和.NET Web Services:
·用Microsoft Visual Studio在目录/InetPub/wwwroot/DotNetServices/下创建一个.NET Web Services。
·在WLS端,在为DotNetService 提供了WSDL URL后,用WebLlogic clientgen ant task生成一个clientjar。
·从testclient,对JAVA Stub进行一次调用。
WebLogic Server
.NET Server
.NET Web Service
WLS Client
| // STOCK TRADE WEB SERVICE
// The Stock Trade web service executes a trade and returns result. [WebMethod] public bool execute(string action, string symbol, int quantity) { if(action == null) { Console.WriteLine("action null"); return false; } if(symbol == null) { Console.WriteLine("symbol null"); return false; } if(action.Equals("BUY")) Console.WriteLine("BUYING quantity: "+ quantity + " of symbol:" + symbol); else if(action.Equals("SELL")) Console.WriteLine("SELLING quantity: "+ quantity + " of symbol:" + symbol); else { Console.WriteLine("INVALID action: "+ action); return false; } return true; } |
最新相关文章
发表评论