Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- POST /dSoapServiceSoapBindingService.asmx HTTP/1.1
- Host: www.meusite.com
- User-Agent: gSOAP/2.8
- Content-Type: application/soap+xml; charset=utf-8; action="tns:CrossEvent"
- Content-Length: 685
- Connection: close
- SOAPAction: "tns:CrossEvent"
- <?xml version="1.0" encoding="UTF-8"?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://digicon.com/dFlow/common/v1/" xmlns:ns1="http://digicon.com/dFlow/gate/v1/" xmlns:ns3="http://digicon.com/dFlow/dSoap/v1/">
- <SOAP-ENV:Body>
- <ns3:CrossEventRequest>
- <GateID>teste</GateID>
- <Travellers>
- <ns2:TravellerCross>
- <ns2:TravellerID>123456</ns2:TravellerID>
- <ns2:Cross>CANCEL_CROSS_ENTRANCE</ns2:Cross>
- </ns2:TravellerCross>
- </Travellers>
- </ns3:CrossEventRequest>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- [WebService(Namespace = "http://digicon.com/dFlow/dSoap/v1/")]
- [System.Xml.Serialization.XmlSchemaProvider("http://www.w3.org/2001/XMLSchema")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [System.ComponentModel.ToolboxItem(false)]
- public class dflow : System.Web.Services.WebService
- {
- [XmlNamespaceDeclarations]
- public XmlSerializerNamespaces xmlns
- {
- get
- {
- XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();
- xsn.Add("ns2", "http://digicon.com/dFlow/common/v1/");
- xsn.Add("ns1", "http://digicon.com/dFlow/gate/v1/");
- xsn.Add("ns3", "http://digicon.com/dFlow/dSoap/v1/");
- return xsn;
- }
- }
- [WebMethod]
- [SoapDocumentMethod(Action = "tns:CrossEvent", ResponseElementName = "CrossEventResponse", RequestElementName = "CrossEventRequest")]
- public string CrossEventRequest(string GateID, List<TravellerCross> Travellers)
- {
- // CÓDIGO DO WEBSERVICE
- return "Processado";
- }
- }
- [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://digicon.com/dFlow/common/v1/")]
- public class TravellerCross
- {
- [XmlElement(Namespace = "http://digicon.com/dFlow/common/v1/")]
- public string TravellerID { get; set; }
- [XmlElement(Namespace = "http://digicon.com/dFlow/common/v1/")]
- public CrossEnumType Cross { get; set; }
- [XmlNamespaceDeclarations]
- public XmlSerializerNamespaces xmlns = new XmlSerializerNamespaces();
- public TravellerCross()
- {
- xmlns.Add("ns2", "http://digicon.com/dFlow/common/v1/");
- }
- }
- public enum CrossEnumType
- {
- CROSS_VALID_ENTRANCE = 1,
- CROSS_VALID_EXIT = 2,
- CROSS_INVALID_ENTRANCE = 3,
- CROSS_INVALID_EXIT = 4,
- CANCEL_CROSS_ENTRANCE = 5,
- CANCEL_CROSS_EXIT = 6
- }
Add Comment
Please, Sign In to add comment