Skip to content

Commit 49a867f

Browse files
committed
ScadaAgent: app structure
1 parent 94d9f3f commit 49a867f

22 files changed

+740
-165
lines changed

ScadaAgent/ScadaAgent/ScadaAgentCtrl/App.config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@
33
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
55
</startup>
6+
<system.serviceModel>
7+
<bindings>
8+
<basicHttpBinding>
9+
<binding name="BasicHttpBinding_AgentSvc" />
10+
</basicHttpBinding>
11+
</bindings>
12+
<client>
13+
<endpoint address="http://localhost:10002/ScadaAgent/ScadaAgentSvc/"
14+
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_AgentSvc"
15+
contract="ServiceReference1.AgentSvc" name="BasicHttpBinding_AgentSvc" />
16+
</client>
17+
</system.serviceModel>
618
</configuration>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AgentSvc" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
3+
<wsdl:types>
4+
<xsd:schema targetNamespace="http://tempuri.org/Imports">
5+
<xsd:import schemaLocation="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?xsd=xsd0" namespace="http://tempuri.org/" />
6+
<xsd:import schemaLocation="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
7+
</xsd:schema>
8+
</wsdl:types>
9+
<wsdl:message name="AgentSvc_Sum_InputMessage">
10+
<wsdl:part name="parameters" element="tns:Sum" />
11+
</wsdl:message>
12+
<wsdl:message name="AgentSvc_Sum_OutputMessage">
13+
<wsdl:part name="parameters" element="tns:SumResponse" />
14+
</wsdl:message>
15+
<wsdl:portType name="AgentSvc">
16+
<wsdl:operation name="Sum">
17+
<wsdl:input wsaw:Action="http://tempuri.org/AgentSvc/Sum" message="tns:AgentSvc_Sum_InputMessage" />
18+
<wsdl:output wsaw:Action="http://tempuri.org/AgentSvc/SumResponse" message="tns:AgentSvc_Sum_OutputMessage" />
19+
</wsdl:operation>
20+
</wsdl:portType>
21+
<wsdl:binding name="BasicHttpBinding_AgentSvc" type="tns:AgentSvc">
22+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
23+
<wsdl:operation name="Sum">
24+
<soap:operation soapAction="http://tempuri.org/AgentSvc/Sum" style="document" />
25+
<wsdl:input>
26+
<soap:body use="literal" />
27+
</wsdl:input>
28+
<wsdl:output>
29+
<soap:body use="literal" />
30+
</wsdl:output>
31+
</wsdl:operation>
32+
</wsdl:binding>
33+
<wsdl:service name="AgentSvc">
34+
<wsdl:port name="BasicHttpBinding_AgentSvc" binding="tns:BasicHttpBinding_AgentSvc">
35+
<soap:address location="http://localhost:10002/ScadaAgent/ScadaAgentSvc/" />
36+
</wsdl:port>
37+
</wsdl:service>
38+
</wsdl:definitions>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
namespace Scada.Agent.Ctrl.ServiceReference1 {
12+
13+
14+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
15+
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference1.AgentSvc")]
16+
public interface AgentSvc {
17+
18+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/Sum", ReplyAction="http://tempuri.org/AgentSvc/SumResponse")]
19+
double Sum(double a, double b);
20+
21+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AgentSvc/Sum", ReplyAction="http://tempuri.org/AgentSvc/SumResponse")]
22+
System.Threading.Tasks.Task<double> SumAsync(double a, double b);
23+
}
24+
25+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
26+
public interface AgentSvcChannel : Scada.Agent.Ctrl.ServiceReference1.AgentSvc, System.ServiceModel.IClientChannel {
27+
}
28+
29+
[System.Diagnostics.DebuggerStepThroughAttribute()]
30+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
31+
public partial class AgentSvcClient : System.ServiceModel.ClientBase<Scada.Agent.Ctrl.ServiceReference1.AgentSvc>, Scada.Agent.Ctrl.ServiceReference1.AgentSvc {
32+
33+
public AgentSvcClient() {
34+
}
35+
36+
public AgentSvcClient(string endpointConfigurationName) :
37+
base(endpointConfigurationName) {
38+
}
39+
40+
public AgentSvcClient(string endpointConfigurationName, string remoteAddress) :
41+
base(endpointConfigurationName, remoteAddress) {
42+
}
43+
44+
public AgentSvcClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
45+
base(endpointConfigurationName, remoteAddress) {
46+
}
47+
48+
public AgentSvcClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
49+
base(binding, remoteAddress) {
50+
}
51+
52+
public double Sum(double a, double b) {
53+
return base.Channel.Sum(a, b);
54+
}
55+
56+
public System.Threading.Tasks.Task<double> SumAsync(double a, double b) {
57+
return base.Channel.SumAsync(a, b);
58+
}
59+
}
60+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="881502c2-8070-4388-8144-5128cbd28169" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
3+
<ClientOptions>
4+
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
5+
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
6+
<EnableDataBinding>true</EnableDataBinding>
7+
<ExcludedTypes />
8+
<ImportXmlTypes>false</ImportXmlTypes>
9+
<GenerateInternalTypes>false</GenerateInternalTypes>
10+
<GenerateMessageContracts>false</GenerateMessageContracts>
11+
<NamespaceMappings />
12+
<CollectionMappings />
13+
<GenerateSerializableTypes>true</GenerateSerializableTypes>
14+
<Serializer>Auto</Serializer>
15+
<UseSerializerForFaults>true</UseSerializerForFaults>
16+
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
17+
<ReferencedAssemblies />
18+
<ReferencedDataContractTypes />
19+
<ServiceContractMappings />
20+
</ClientOptions>
21+
<MetadataSources>
22+
<MetadataSource Address="http://localhost:10002/ScadaAgent/ScadaAgentSvc/" Protocol="http" SourceId="1" />
23+
</MetadataSources>
24+
<Metadata>
25+
<MetadataFile FileName="item.xsd" MetadataType="Schema" ID="5875ee0a-0c3a-4441-ae71-7b5c5ebbfe5b" SourceId="1" SourceUrl="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?xsd=xsd0" />
26+
<MetadataFile FileName="item1.xsd" MetadataType="Schema" ID="292a2bd1-1360-479e-ae9a-3cf3e264bac3" SourceId="1" SourceUrl="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?xsd=xsd1" />
27+
<MetadataFile FileName="AgentSvc.wsdl" MetadataType="Wsdl" ID="511d0274-7622-48df-973b-a6967efadd92" SourceId="1" SourceUrl="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?wsdl" />
28+
<MetadataFile FileName="item.disco" MetadataType="Disco" ID="2b2dbcd6-d973-4fcf-af03-41309cb58a19" SourceId="1" SourceUrl="http://localhost:10002/ScadaAgent/ScadaAgentSvc/?disco" />
29+
</Metadata>
30+
<Extensions>
31+
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
32+
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
33+
</Extensions>
34+
</ReferenceGroup>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
3+
<behaviors />
4+
<bindings>
5+
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;BasicHttpBinding_AgentSvc&quot; /&gt;" bindingType="basicHttpBinding" name="BasicHttpBinding_AgentSvc" />
6+
</bindings>
7+
<endpoints>
8+
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:10002/ScadaAgent/ScadaAgentSvc/&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_AgentSvc&quot; contract=&quot;ServiceReference1.AgentSvc&quot; name=&quot;BasicHttpBinding_AgentSvc&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:10002/ScadaAgent/ScadaAgentSvc/&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_AgentSvc&quot; contract=&quot;ServiceReference1.AgentSvc&quot; name=&quot;BasicHttpBinding_AgentSvc&quot; /&gt;" contractName="ServiceReference1.AgentSvc" name="BasicHttpBinding_AgentSvc" />
9+
</endpoints>
10+
</configurationSnapshot>

0 commit comments

Comments
 (0)