1 37 38 package com.sun.j2ee.blueprints.opc.webservicebroker.requestor; 39 40 import javax.xml.rpc.*; 41 import javax.naming.*; 42 43 import com.sun.j2ee.blueprints.opc.JNDINames; 44 45 public class ActivitySupplierClient implements WSClient { 46 47 public String sendRequest(String xmlDoc) { 48 String ret = null; 49 50 try { 51 InitialContext ic = new InitialContext(); 52 ActivityPurchaseOrderService svc = (ActivityPurchaseOrderService) 53 ic.lookup(JNDINames.ACTIVITY_SERVICE_NAME); 54 String endpointURI = (String ) 55 ic.lookup(JNDINames.ACTIVITY_SERVICE_URL); 56 ActivityPOIntf port= (ActivityPOIntf) 57 svc.getPort(ActivityPOIntf.class); 58 59 ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, 62 endpointURI); 63 ret = port.submitActivityReservationDetails(xmlDoc); 64 } catch (Exception exe) { 65 71 System.err.println(exe); 72 } 73 return ret; 74 } 75 } 76 | Popular Tags |