Skip to content

Commit d23c637

Browse files
committed
first commit
0 parents  commit d23c637

File tree

100 files changed

+3790
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+3790
-0
lines changed

HttpClient/App.config

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
5+
</startup>
6+
<system.serviceModel>
7+
<bindings>
8+
<basicHttpBinding>
9+
<binding name="BasicHttpBinding_ISchoolService" />
10+
<binding name="BasicHttpBinding_IMathService" />
11+
</basicHttpBinding>
12+
</bindings>
13+
<client>
14+
<endpoint address="http://localhost:1302/SchoolService.svc" binding="basicHttpBinding"
15+
bindingConfiguration="BasicHttpBinding_ISchoolService" contract="SchoolServiceRef.ISchoolService"
16+
name="BasicHttpBinding_ISchoolService" />
17+
<endpoint address="http://localhost:1302/MathService.svc" binding="basicHttpBinding"
18+
bindingConfiguration="BasicHttpBinding_IMathService" contract="MathServiceRef.IMathService"
19+
name="BasicHttpBinding_IMathService" />
20+
</client>
21+
</system.serviceModel>
22+
</configuration>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
3+
<contractRef ref="http://localhost:1302/MathService.svc?wsdl" docRef="http://localhost:1302/MathService.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
4+
</discovery>
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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="MathService" 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:1302/MathService.svc?xsd=xsd0" namespace="http://tempuri.org/" />
6+
<xsd:import schemaLocation="http://localhost:1302/MathService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
7+
</xsd:schema>
8+
</wsdl:types>
9+
<wsdl:message name="IMathService_Add_InputMessage">
10+
<wsdl:part name="parameters" element="tns:Add" />
11+
</wsdl:message>
12+
<wsdl:message name="IMathService_Add_OutputMessage">
13+
<wsdl:part name="parameters" element="tns:AddResponse" />
14+
</wsdl:message>
15+
<wsdl:message name="IMathService_Subtract_InputMessage">
16+
<wsdl:part name="parameters" element="tns:Subtract" />
17+
</wsdl:message>
18+
<wsdl:message name="IMathService_Subtract_OutputMessage">
19+
<wsdl:part name="parameters" element="tns:SubtractResponse" />
20+
</wsdl:message>
21+
<wsdl:message name="IMathService_Multiply_InputMessage">
22+
<wsdl:part name="parameters" element="tns:Multiply" />
23+
</wsdl:message>
24+
<wsdl:message name="IMathService_Multiply_OutputMessage">
25+
<wsdl:part name="parameters" element="tns:MultiplyResponse" />
26+
</wsdl:message>
27+
<wsdl:message name="IMathService_Divide_InputMessage">
28+
<wsdl:part name="parameters" element="tns:Divide" />
29+
</wsdl:message>
30+
<wsdl:message name="IMathService_Divide_OutputMessage">
31+
<wsdl:part name="parameters" element="tns:DivideResponse" />
32+
</wsdl:message>
33+
<wsdl:message name="IMathService_CircleArea_InputMessage">
34+
<wsdl:part name="parameters" element="tns:CircleArea" />
35+
</wsdl:message>
36+
<wsdl:message name="IMathService_CircleArea_OutputMessage">
37+
<wsdl:part name="parameters" element="tns:CircleAreaResponse" />
38+
</wsdl:message>
39+
<wsdl:portType name="IMathService">
40+
<wsdl:operation name="Add">
41+
<wsdl:input wsaw:Action="http://tempuri.org/IMathService/Add" message="tns:IMathService_Add_InputMessage" />
42+
<wsdl:output wsaw:Action="http://tempuri.org/IMathService/AddResponse" message="tns:IMathService_Add_OutputMessage" />
43+
</wsdl:operation>
44+
<wsdl:operation name="Subtract">
45+
<wsdl:input wsaw:Action="http://tempuri.org/IMathService/Subtract" message="tns:IMathService_Subtract_InputMessage" />
46+
<wsdl:output wsaw:Action="http://tempuri.org/IMathService/SubtractResponse" message="tns:IMathService_Subtract_OutputMessage" />
47+
</wsdl:operation>
48+
<wsdl:operation name="Multiply">
49+
<wsdl:input wsaw:Action="http://tempuri.org/IMathService/Multiply" message="tns:IMathService_Multiply_InputMessage" />
50+
<wsdl:output wsaw:Action="http://tempuri.org/IMathService/MultiplyResponse" message="tns:IMathService_Multiply_OutputMessage" />
51+
</wsdl:operation>
52+
<wsdl:operation name="Divide">
53+
<wsdl:input wsaw:Action="http://tempuri.org/IMathService/Divide" message="tns:IMathService_Divide_InputMessage" />
54+
<wsdl:output wsaw:Action="http://tempuri.org/IMathService/DivideResponse" message="tns:IMathService_Divide_OutputMessage" />
55+
</wsdl:operation>
56+
<wsdl:operation name="CircleArea">
57+
<wsdl:input wsaw:Action="http://tempuri.org/IMathService/CircleArea" message="tns:IMathService_CircleArea_InputMessage" />
58+
<wsdl:output wsaw:Action="http://tempuri.org/IMathService/CircleAreaResponse" message="tns:IMathService_CircleArea_OutputMessage" />
59+
</wsdl:operation>
60+
</wsdl:portType>
61+
<wsdl:binding name="BasicHttpBinding_IMathService" type="tns:IMathService">
62+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
63+
<wsdl:operation name="Add">
64+
<soap:operation soapAction="http://tempuri.org/IMathService/Add" style="document" />
65+
<wsdl:input>
66+
<soap:body use="literal" />
67+
</wsdl:input>
68+
<wsdl:output>
69+
<soap:body use="literal" />
70+
</wsdl:output>
71+
</wsdl:operation>
72+
<wsdl:operation name="Subtract">
73+
<soap:operation soapAction="http://tempuri.org/IMathService/Subtract" style="document" />
74+
<wsdl:input>
75+
<soap:body use="literal" />
76+
</wsdl:input>
77+
<wsdl:output>
78+
<soap:body use="literal" />
79+
</wsdl:output>
80+
</wsdl:operation>
81+
<wsdl:operation name="Multiply">
82+
<soap:operation soapAction="http://tempuri.org/IMathService/Multiply" style="document" />
83+
<wsdl:input>
84+
<soap:body use="literal" />
85+
</wsdl:input>
86+
<wsdl:output>
87+
<soap:body use="literal" />
88+
</wsdl:output>
89+
</wsdl:operation>
90+
<wsdl:operation name="Divide">
91+
<soap:operation soapAction="http://tempuri.org/IMathService/Divide" style="document" />
92+
<wsdl:input>
93+
<soap:body use="literal" />
94+
</wsdl:input>
95+
<wsdl:output>
96+
<soap:body use="literal" />
97+
</wsdl:output>
98+
</wsdl:operation>
99+
<wsdl:operation name="CircleArea">
100+
<soap:operation soapAction="http://tempuri.org/IMathService/CircleArea" style="document" />
101+
<wsdl:input>
102+
<soap:body use="literal" />
103+
</wsdl:input>
104+
<wsdl:output>
105+
<soap:body use="literal" />
106+
</wsdl:output>
107+
</wsdl:operation>
108+
</wsdl:binding>
109+
<wsdl:service name="MathService">
110+
<wsdl:port name="BasicHttpBinding_IMathService" binding="tns:BasicHttpBinding_IMathService">
111+
<soap:address location="http://localhost:1302/MathService.svc" />
112+
</wsdl:port>
113+
</wsdl:service>
114+
</wsdl:definitions>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<xs:element name="anyType" nillable="true" type="xs:anyType" />
4+
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
5+
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
6+
<xs:element name="boolean" nillable="true" type="xs:boolean" />
7+
<xs:element name="byte" nillable="true" type="xs:byte" />
8+
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
9+
<xs:element name="decimal" nillable="true" type="xs:decimal" />
10+
<xs:element name="double" nillable="true" type="xs:double" />
11+
<xs:element name="float" nillable="true" type="xs:float" />
12+
<xs:element name="int" nillable="true" type="xs:int" />
13+
<xs:element name="long" nillable="true" type="xs:long" />
14+
<xs:element name="QName" nillable="true" type="xs:QName" />
15+
<xs:element name="short" nillable="true" type="xs:short" />
16+
<xs:element name="string" nillable="true" type="xs:string" />
17+
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
18+
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
19+
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
20+
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
21+
<xs:element name="char" nillable="true" type="tns:char" />
22+
<xs:simpleType name="char">
23+
<xs:restriction base="xs:int" />
24+
</xs:simpleType>
25+
<xs:element name="duration" nillable="true" type="tns:duration" />
26+
<xs:simpleType name="duration">
27+
<xs:restriction base="xs:duration">
28+
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
29+
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
30+
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
31+
</xs:restriction>
32+
</xs:simpleType>
33+
<xs:element name="guid" nillable="true" type="tns:guid" />
34+
<xs:simpleType name="guid">
35+
<xs:restriction base="xs:string">
36+
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
37+
</xs:restriction>
38+
</xs:simpleType>
39+
<xs:attribute name="FactoryType" type="xs:QName" />
40+
<xs:attribute name="Id" type="xs:ID" />
41+
<xs:attribute name="Ref" type="xs:IDREF" />
42+
</xs:schema>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<xs:element name="Add">
4+
<xs:complexType>
5+
<xs:sequence>
6+
<xs:element minOccurs="0" name="value1" type="xs:double" />
7+
<xs:element minOccurs="0" name="value2" type="xs:double" />
8+
</xs:sequence>
9+
</xs:complexType>
10+
</xs:element>
11+
<xs:element name="AddResponse">
12+
<xs:complexType>
13+
<xs:sequence>
14+
<xs:element minOccurs="0" name="AddResult" type="xs:double" />
15+
</xs:sequence>
16+
</xs:complexType>
17+
</xs:element>
18+
<xs:element name="Subtract">
19+
<xs:complexType>
20+
<xs:sequence>
21+
<xs:element minOccurs="0" name="value1" type="xs:double" />
22+
<xs:element minOccurs="0" name="value2" type="xs:double" />
23+
</xs:sequence>
24+
</xs:complexType>
25+
</xs:element>
26+
<xs:element name="SubtractResponse">
27+
<xs:complexType>
28+
<xs:sequence>
29+
<xs:element minOccurs="0" name="SubtractResult" type="xs:double" />
30+
</xs:sequence>
31+
</xs:complexType>
32+
</xs:element>
33+
<xs:element name="Multiply">
34+
<xs:complexType>
35+
<xs:sequence>
36+
<xs:element minOccurs="0" name="value1" type="xs:double" />
37+
<xs:element minOccurs="0" name="value2" type="xs:double" />
38+
</xs:sequence>
39+
</xs:complexType>
40+
</xs:element>
41+
<xs:element name="MultiplyResponse">
42+
<xs:complexType>
43+
<xs:sequence>
44+
<xs:element minOccurs="0" name="MultiplyResult" type="xs:double" />
45+
</xs:sequence>
46+
</xs:complexType>
47+
</xs:element>
48+
<xs:element name="Divide">
49+
<xs:complexType>
50+
<xs:sequence>
51+
<xs:element minOccurs="0" name="value1" type="xs:double" />
52+
<xs:element minOccurs="0" name="value2" type="xs:double" />
53+
</xs:sequence>
54+
</xs:complexType>
55+
</xs:element>
56+
<xs:element name="DivideResponse">
57+
<xs:complexType>
58+
<xs:sequence>
59+
<xs:element minOccurs="0" name="DivideResult" type="xs:double" />
60+
</xs:sequence>
61+
</xs:complexType>
62+
</xs:element>
63+
<xs:element name="CircleArea">
64+
<xs:complexType>
65+
<xs:sequence>
66+
<xs:element minOccurs="0" name="radius" type="xs:double" />
67+
</xs:sequence>
68+
</xs:complexType>
69+
</xs:element>
70+
<xs:element name="CircleAreaResponse">
71+
<xs:complexType>
72+
<xs:sequence>
73+
<xs:element minOccurs="0" name="CircleAreaResult" type="xs:double" />
74+
</xs:sequence>
75+
</xs:complexType>
76+
</xs:element>
77+
</xs:schema>
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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 HttpClient.MathServiceRef {
12+
13+
14+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
15+
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="MathServiceRef.IMathService")]
16+
public interface IMathService {
17+
18+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Add", ReplyAction="http://tempuri.org/IMathService/AddResponse")]
19+
double Add(double value1, double value2);
20+
21+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Add", ReplyAction="http://tempuri.org/IMathService/AddResponse")]
22+
System.Threading.Tasks.Task<double> AddAsync(double value1, double value2);
23+
24+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Subtract", ReplyAction="http://tempuri.org/IMathService/SubtractResponse")]
25+
double Subtract(double value1, double value2);
26+
27+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Subtract", ReplyAction="http://tempuri.org/IMathService/SubtractResponse")]
28+
System.Threading.Tasks.Task<double> SubtractAsync(double value1, double value2);
29+
30+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Multiply", ReplyAction="http://tempuri.org/IMathService/MultiplyResponse")]
31+
double Multiply(double value1, double value2);
32+
33+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Multiply", ReplyAction="http://tempuri.org/IMathService/MultiplyResponse")]
34+
System.Threading.Tasks.Task<double> MultiplyAsync(double value1, double value2);
35+
36+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Divide", ReplyAction="http://tempuri.org/IMathService/DivideResponse")]
37+
double Divide(double value1, double value2);
38+
39+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/Divide", ReplyAction="http://tempuri.org/IMathService/DivideResponse")]
40+
System.Threading.Tasks.Task<double> DivideAsync(double value1, double value2);
41+
42+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/CircleArea", ReplyAction="http://tempuri.org/IMathService/CircleAreaResponse")]
43+
double CircleArea(double radius);
44+
45+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMathService/CircleArea", ReplyAction="http://tempuri.org/IMathService/CircleAreaResponse")]
46+
System.Threading.Tasks.Task<double> CircleAreaAsync(double radius);
47+
}
48+
49+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
50+
public interface IMathServiceChannel : HttpClient.MathServiceRef.IMathService, System.ServiceModel.IClientChannel {
51+
}
52+
53+
[System.Diagnostics.DebuggerStepThroughAttribute()]
54+
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
55+
public partial class MathServiceClient : System.ServiceModel.ClientBase<HttpClient.MathServiceRef.IMathService>, HttpClient.MathServiceRef.IMathService {
56+
57+
public MathServiceClient() {
58+
}
59+
60+
public MathServiceClient(string endpointConfigurationName) :
61+
base(endpointConfigurationName) {
62+
}
63+
64+
public MathServiceClient(string endpointConfigurationName, string remoteAddress) :
65+
base(endpointConfigurationName, remoteAddress) {
66+
}
67+
68+
public MathServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
69+
base(endpointConfigurationName, remoteAddress) {
70+
}
71+
72+
public MathServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
73+
base(binding, remoteAddress) {
74+
}
75+
76+
public double Add(double value1, double value2) {
77+
return base.Channel.Add(value1, value2);
78+
}
79+
80+
public System.Threading.Tasks.Task<double> AddAsync(double value1, double value2) {
81+
return base.Channel.AddAsync(value1, value2);
82+
}
83+
84+
public double Subtract(double value1, double value2) {
85+
return base.Channel.Subtract(value1, value2);
86+
}
87+
88+
public System.Threading.Tasks.Task<double> SubtractAsync(double value1, double value2) {
89+
return base.Channel.SubtractAsync(value1, value2);
90+
}
91+
92+
public double Multiply(double value1, double value2) {
93+
return base.Channel.Multiply(value1, value2);
94+
}
95+
96+
public System.Threading.Tasks.Task<double> MultiplyAsync(double value1, double value2) {
97+
return base.Channel.MultiplyAsync(value1, value2);
98+
}
99+
100+
public double Divide(double value1, double value2) {
101+
return base.Channel.Divide(value1, value2);
102+
}
103+
104+
public System.Threading.Tasks.Task<double> DivideAsync(double value1, double value2) {
105+
return base.Channel.DivideAsync(value1, value2);
106+
}
107+
108+
public double CircleArea(double radius) {
109+
return base.Channel.CircleArea(radius);
110+
}
111+
112+
public System.Threading.Tasks.Task<double> CircleAreaAsync(double radius) {
113+
return base.Channel.CircleAreaAsync(radius);
114+
}
115+
}
116+
}

0 commit comments

Comments
 (0)