ServiceMonikerSample
此範例顯示可與 TCP MetadataExchange 範例搭配使用的用戶端。 它會利用 WCF 服務 Moniker。
PurchaseOrderClient.vbs
set obj = GetObject("service:mexAddress='net.tcp://localhost/example/mex', address='net.tcp://localhost/example', contract='IPurchaseOrder', contractNamespace='http://example.org', binding=PurchaseOrderBinding, bindingNamespace='http://example.org'")
for i = 1 to 100
orderId = obj.Order(i,"Pencil", date)
Wscript.Echo orderId, date
Next