public XDocument getservice(GetAvailableServicesRequest _objGetAvailableServicesRequest) { XDocument doc = null; XElement root = null; string servicename = "GetAvailableServices"; XmlDocument servicesNames = new XmlDocument(); try { XNamespace fc = AppStatic.BusIndiaWebService; XNamespace soapenv = AppStatic.XmlSoapSchema; doc = new XDocument(new XDeclaration("1.0", "utf-16", "yes"), root = new XElement(soapenv + "Envelope", new XAttribute(XNamespace.Xmlns + "com", fc.NamespaceName), new XAttribute(XNamespace.Xmlns + "soapenv", soapenv.NamespaceName), new XElement(soapenv + "Header"), new XElement(soapenv + "Body", new XElement(fc + servicename, new XElement("arg0", new XElement("biFromPlace", new XElement("placeCode", _objGetAvailableServicesRequest.placeCodeFrom), new XElement("placeID", _objGetAvailableServicesRequest.placeIDFrom), new XElement("placeName", _objGetAvailableServicesRequest.placeNameFrom) ), new XElement("biToPlace", new XElement("placeCode", _objGetAvailableServicesRequest.placeCodeTo), new XElement("placeID", _objGetAvailableServicesRequest.placeIDto), new XElement("placeName", _objGetAvailableServicesRequest.placeNameTo) ), new XElement("journeyDate", _objGetAvailableServicesRequest.journeyDate), new XElement("wsUser", new XElement("franchUserID", _objGetAvailableServicesRequest.franchUserID), new XElement("password", _objGetAvailableServicesRequest.password), new XElement("userID", _objGetAvailableServicesRequest.userID), new XElement("userKey", _objGetAvailableServicesRequest.userKey), new XElement("userName", _objGetAvailableServicesRequest.userName), new XElement("userRole", _objGetAvailableServicesRequest.userRole), new XElement("userStatus", _objGetAvailableServicesRequest.userStatus), new XElement("userType", _objGetAvailableServicesRequest.userType) ) ) ) ) ) ); } catch (Exception ex) { } return doc; }
public XDocument getAvailableServicelayout(GetAvailableServicesRequest _objGetSeatlayoutRequest) { XDocument doc = null; XmlDocument servicesNames = new XmlDocument(); try { doc = new XDocument( new XElement("arg0", new XElement("biFromPlace", new XElement("placeCode", _objGetSeatlayoutRequest.placeCodeFrom), new XElement("placeID", _objGetSeatlayoutRequest.placeIDFrom), new XElement("placeName", _objGetSeatlayoutRequest.placeNameFrom) ), new XElement("biToPlace", new XElement("placeCode", _objGetSeatlayoutRequest.placeCodeTo), new XElement("placeID", _objGetSeatlayoutRequest.placeIDto), new XElement("placeName", _objGetSeatlayoutRequest.placeNameTo) ), new XElement("journeyDate", _objGetSeatlayoutRequest.journeyDate), new XElement("wsUser", new XElement("franchUserID", _objGetSeatlayoutRequest.franchUserID), new XElement("password", _objGetSeatlayoutRequest.password), new XElement("userID", _objGetSeatlayoutRequest.userID), new XElement("userKey", _objGetSeatlayoutRequest.userKey), new XElement("userName", _objGetSeatlayoutRequest.userName), new XElement("userRole", _objGetSeatlayoutRequest.userRole), new XElement("userStatus", _objGetSeatlayoutRequest.userStatus), new XElement("userType", _objGetSeatlayoutRequest.userType) ) ) ); } catch (Exception ex) { } return doc; }