コード例 #1
0
        public virtual void OneWay(OneWay req)
        {
            // Create request header
            String action;
            action = "http://schemas.example.org/SimpleService/OneWay";
            WsWsaHeader header;
            header = new WsWsaHeader(action, null, ServiceEndpoint, null, EndpointAddress, null);

            // Create request serializer
            OneWayDataContractSerializer reqDcs;
            reqDcs = new OneWayDataContractSerializer("OneWay", "http://schemas.example.org/SimpleService");

            // Build soap request message
            byte[] soapBuffer = SoapMessageBuilder.BuildSoapMessage(header, reqDcs, req);

            // Send service request
            DpwsHttpClient httpClient;
            httpClient = new DpwsHttpClient();
            DpwsSoapResponse response;
            response = httpClient.SendRequest(soapBuffer, ServiceEndpoint, true, false);
        }
コード例 #2
0
 void ISimpleService.OneWay(OneWay req)
 {
     Debug.Print("OneWay Param=" + req.Param);
 }
コード例 #3
0
 public override object ReadObject(XmlReader reader)
 {
     OneWay OneWayField = null;
     if (IsParentStartElement(reader, false, true))
     {
         OneWayField = new OneWay();
         OneWayField.AnyAttr = ReadAnyAttribute(reader);
         reader.Read();
         if (IsChildStartElement(reader, "Param", false, true))
         {
             reader.Read();
             OneWayField.Param = XmlConvert.ToInt32(reader.ReadString());
             reader.ReadEndElement();
         }
         OneWayField.Any = ReadAnyElement(reader, false);
         reader.ReadEndElement();
     }
     return OneWayField;
 }