public virtual WsMessage getServerAddressWithPort(WsMessage request) { // Build request object getServerAddressWithPortDataContractSerializer reqDcs; reqDcs = new getServerAddressWithPortDataContractSerializer("getServerAddressWithPort", "http://tempuri.org/"); getServerAddressWithPort req; req = ((getServerAddressWithPort)(reqDcs.ReadObject(request.Reader))); request.Reader.Dispose(); request.Reader = null; // Create response object // Call service operation to process request and return response. getServerAddressWithPortResponse resp; resp = m_service.getServerAddressWithPort(req); // Create response header WsWsaHeader respHeader = new WsWsaHeader("http://tempuri.org/IService1/getServerAddressWithPortResponse", request.Header.MessageID, m_version.AnonymousUri, null, null, null); WsMessage response = new WsMessage(respHeader, resp, WsPrefix.Wsdp); // Create response serializer getServerAddressWithPortResponseDataContractSerializer respDcs; respDcs = new getServerAddressWithPortResponseDataContractSerializer("getServerAddressWithPortResponse", "http://tempuri.org/"); response.Serializer = respDcs; return(response); }
public virtual getServerAddressWithPortResponse getServerAddressWithPort(getServerAddressWithPort req) { // Create request header String action; action = "http://tempuri.org/IService1/getServerAddressWithPort"; WsWsaHeader header; header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null); WsMessage request = new WsMessage(header, req, WsPrefix.None); // Create request serializer getServerAddressWithPortDataContractSerializer reqDcs; reqDcs = new getServerAddressWithPortDataContractSerializer("getServerAddressWithPort", "http://tempuri.org/"); request.Serializer = reqDcs; request.Method = "getServerAddressWithPort"; // Send service request m_requestChannel.Open(); WsMessage response = m_requestChannel.Request(request); m_requestChannel.Close(); // Process response getServerAddressWithPortResponseDataContractSerializer respDcs; respDcs = new getServerAddressWithPortResponseDataContractSerializer("getServerAddressWithPortResponse", "http://tempuri.org/"); getServerAddressWithPortResponse resp; resp = ((getServerAddressWithPortResponse)(respDcs.ReadObject(response.Reader))); response.Reader.Dispose(); response.Reader = null; return(resp); }