示例#1
0
        public byte[] TwoWayRequest(WsWsaHeader header, WsXmlDocument envelope)
        {
            WsXmlNode tempNode;
            WsFault   fault = new WsFault();

            if ((tempNode = envelope.SelectSingleNode("Body/TwoWayRequest/X", false)) == null)
            {
                return(fault.RaiseFault(header, WsExceptionFaultType.XmlException,
                                        "Body/TwoWay X value is missing."));
            }
            int X = Convert.ToInt32(tempNode.Value);

            if ((tempNode = envelope.SelectSingleNode("Body/TwoWayRequest/Y", false)) == null)
            {
                return(fault.RaiseFault(header, WsExceptionFaultType.XmlException,
                                        "Body/TwoWay Y value is missing."));
            }
            int Y = Convert.ToInt32(tempNode.Value);

            Debug.Print("");
            Debug.Print("X = " + X.ToString() + " Y = " + Y.ToString());
            Debug.Print(X.ToString() + " + " + Y.ToString() + " = " + ((int)(X + Y)).ToString());
            Debug.Print("");

            return(TwoWayResponse(header, X + Y));
        }
示例#2
0
        public byte[] OneWay(WsWsaHeader header, WsXmlDocument envelope)
        {
            WsXmlNode tempNode;
            WsFault   fault = new WsFault();

            if ((tempNode = envelope.SelectSingleNode("Body/OneWay/Param", false)) == null)
            {
                return(fault.RaiseFault(header, WsExceptionFaultType.XmlException,
                                        "Body/OneWay is missing."));
            }
            int number = Convert.ToInt32(tempNode.Value);

            Debug.Print("");
            Debug.Print("Integer = " + tempNode.Value);
            Debug.Print("");
            byte[] response = new byte[0];
            return(response);
        }