我正在开发 C# 控制台应用程序。我硬编码了一个 soap 请求,我在其中传递了 200 个唯一 ID,如下所示。
要求
<soapenv:Envelope
xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:soap=""http://soap.inf.hexing.cn"">
<soapenv:Header/>
<soapenv:Body>
<soap:doCommand>
<!--Optional:-->
<arg0><![CDATA[<?xml version=""1.0"" encoding=""UTF-8""?>
<RequestMessage xmlns=""http://iec.ch/TC57/2011/schema/message""
xmlns:m=""http://iec.ch/TC57/2011/MeterReadSchedule#""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xsi:schemaLocation=""http://iec.ch/TC57/2011/schema/message Message.xsd"">
<Header>
<Verb>create</Verb>
<Noun>MeterReadSchedule</Noun>
<Revision>2.0</Revision>
<Timestamp>" + timestamp + @"</Timestamp>
<Source>Hesco</Source>
<AsyncReplyFlag>false</AsyncReplyFlag>
<ReplyAddress>" + hexURL + @"</ReplyAddress>
<AckRequired>false</AckRequired>
<User>
<UserID>"+userID+@"</UserID>
</User>
<MessageID>String</MessageID>
<CorrelationID>String</CorrelationID>
<Property>
<Name>password</Name>
<Value>"+pass+@"</Value>
</Property>
<Property>
<Name>timeout(h)</Name>
<Value>8</Value>
</Property>
</Header>
<Payload>
<m:MeterReadSchedule>
<m:EndDevice>
<m:mRID></m:mRID>
<Names>
<name>37010732575</name>
</Names>
</m:EndDevice>
<m:EndDevice>
<m:mRID></m:mRID>
<Names>
<name>37010719918</name>
</Names>
</m:EndDevice>
.
.
200 ID's
.
.
<m:EndDevice>
<m:mRID></m:mRID>
<Names>
<name>37030315780</name>
</Names>
</m:EndDevice>
<m:ReadingType>
<m:Names>
<m:name>MonthlyBilling</m:name>
<m:NameType>
<m:name>BillingType</m:name>
</m:NameType>
</m:Names>
</m:ReadingType>
<m:TimeSchedule>
通过它后,我能够得到带有值的响应
ABOUTYOU
相关分类