public virtual GetBookInformationsResponse GetBookInformations(GetBookInformations req) { // Create request header String action; action = "http://tempuri.org/IService/GetBookInformations"; WsWsaHeader header; header = new WsWsaHeader(action, null, EndpointAddress, m_version.AnonymousUri, null, null); WsMessage request = new WsMessage(header, req, WsPrefix.None); // Create request serializer GetBookInformationsDataContractSerializer reqDcs; reqDcs = new GetBookInformationsDataContractSerializer("GetBookInformations", "http://tempuri.org/"); request.Serializer = reqDcs; request.Method = "GetBookInformations"; // Send service request m_requestChannel.Open(); WsMessage response = m_requestChannel.Request(request); m_requestChannel.Close(); // Process response GetBookInformationsResponseDataContractSerializer respDcs; respDcs = new GetBookInformationsResponseDataContractSerializer("GetBookInformationsResponse", "http://tempuri.org/"); GetBookInformationsResponse resp; resp = ((GetBookInformationsResponse)(respDcs.ReadObject(response.Reader))); response.Reader.Dispose(); response.Reader = null; return resp; }
public override object ReadObject(XmlReader reader) { GetBookInformations GetBookInformationsField = null; if (IsParentStartElement(reader, false, true)) { GetBookInformationsField = new GetBookInformations(); reader.Read(); if (IsChildStartElement(reader, "barcode", true, false)) { reader.Read(); GetBookInformationsField.barcode = reader.ReadString(); reader.ReadEndElement(); } reader.ReadEndElement(); } return GetBookInformationsField; }