Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MVC app calls WCF. WCF illustrates standard WCF and WCF-REST.
- Loading branch information
Travis Illig
committed
Oct 5, 2016
1 parent
ea2a1d3
commit 4116679
Showing
35 changed files
with
825 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/MvcExample/Service References/HostFactoryService/HostFactoryService.disco
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> | ||
<contractRef ref="http://localhost:25665/HostFactoryService.svc?wsdl" docRef="http://localhost:25665/HostFactoryService.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> | ||
</discovery> |
36 changes: 36 additions & 0 deletions
36
src/MvcExample/Service References/HostFactoryService/HostFactoryService.wsdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<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="HostFactoryService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> | ||
<wsdl:types> | ||
<xsd:schema targetNamespace="http://tempuri.org/Imports"> | ||
<xsd:import schemaLocation="http://localhost:25665/HostFactoryService.svc?xsd=xsd0" namespace="http://tempuri.org/" /> | ||
<xsd:import schemaLocation="http://localhost:25665/HostFactoryService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> | ||
</xsd:schema> | ||
</wsdl:types> | ||
<wsdl:message name="IService_GetServiceInfo_InputMessage" /> | ||
<wsdl:message name="GetServiceInfoResponse"> | ||
<wsdl:part name="parameters" element="tns:GetServiceInfoResponse" /> | ||
</wsdl:message> | ||
<wsdl:portType name="IService"> | ||
<wsdl:operation name="GetServiceInfo"> | ||
<wsdl:input wsaw:Action="http://tempuri.org/IService/GetServiceInfo" message="tns:IService_GetServiceInfo_InputMessage" /> | ||
<wsdl:output wsaw:Action="http://tempuri.org/IService/GetServiceInfoResponse" name="GetServiceInfoResponse" message="tns:GetServiceInfoResponse" /> | ||
</wsdl:operation> | ||
</wsdl:portType> | ||
<wsdl:binding name="BasicHttpBinding_IService" type="tns:IService"> | ||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> | ||
<wsdl:operation name="GetServiceInfo"> | ||
<soap:operation soapAction="http://tempuri.org/IService/GetServiceInfo" style="document" /> | ||
<wsdl:input> | ||
<soap:body use="literal" /> | ||
</wsdl:input> | ||
<wsdl:output name="GetServiceInfoResponse"> | ||
<soap:body use="literal" /> | ||
</wsdl:output> | ||
</wsdl:operation> | ||
</wsdl:binding> | ||
<wsdl:service name="HostFactoryService"> | ||
<wsdl:port name="BasicHttpBinding_IService" binding="tns:BasicHttpBinding_IService"> | ||
<soap:address location="http://localhost:25665/HostFactoryService.svc" /> | ||
</wsdl:port> | ||
</wsdl:service> | ||
</wsdl:definitions> |
12 changes: 12 additions & 0 deletions
12
src/MvcExample/Service References/HostFactoryService/HostFactoryService.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<xs:import schemaLocation="http://localhost:25665/HostFactoryService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> | ||
<xs:element name="GetServiceInfoResponse"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="DependencyInstanceId" type="q1:guid" /> | ||
<xs:element minOccurs="0" name="ServiceImplementationTypeName" nillable="true" type="xs:string" /> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
42 changes: 42 additions & 0 deletions
42
src/MvcExample/Service References/HostFactoryService/HostFactoryService1.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<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"> | ||
<xs:element name="anyType" nillable="true" type="xs:anyType" /> | ||
<xs:element name="anyURI" nillable="true" type="xs:anyURI" /> | ||
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" /> | ||
<xs:element name="boolean" nillable="true" type="xs:boolean" /> | ||
<xs:element name="byte" nillable="true" type="xs:byte" /> | ||
<xs:element name="dateTime" nillable="true" type="xs:dateTime" /> | ||
<xs:element name="decimal" nillable="true" type="xs:decimal" /> | ||
<xs:element name="double" nillable="true" type="xs:double" /> | ||
<xs:element name="float" nillable="true" type="xs:float" /> | ||
<xs:element name="int" nillable="true" type="xs:int" /> | ||
<xs:element name="long" nillable="true" type="xs:long" /> | ||
<xs:element name="QName" nillable="true" type="xs:QName" /> | ||
<xs:element name="short" nillable="true" type="xs:short" /> | ||
<xs:element name="string" nillable="true" type="xs:string" /> | ||
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" /> | ||
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" /> | ||
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" /> | ||
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" /> | ||
<xs:element name="char" nillable="true" type="tns:char" /> | ||
<xs:simpleType name="char"> | ||
<xs:restriction base="xs:int" /> | ||
</xs:simpleType> | ||
<xs:element name="duration" nillable="true" type="tns:duration" /> | ||
<xs:simpleType name="duration"> | ||
<xs:restriction base="xs:duration"> | ||
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" /> | ||
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" /> | ||
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:element name="guid" nillable="true" type="tns:guid" /> | ||
<xs:simpleType name="guid"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:attribute name="FactoryType" type="xs:QName" /> | ||
<xs:attribute name="Id" type="xs:ID" /> | ||
<xs:attribute name="Ref" type="xs:IDREF" /> | ||
</xs:schema> |
10 changes: 10 additions & 0 deletions
10
...rences/HostFactoryService/MvcExample.HostFactoryService.GetServiceInfoResponse.datasource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is automatically generated by Visual Studio .Net. It is | ||
used to store generic object data source configuration information. | ||
Renaming the file extension or editing the content of this file may | ||
cause the file to be unrecognizable by the program. | ||
--> | ||
<GenericObjectDataSource DisplayName="GetServiceInfoResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<TypeInfo>MvcExample.HostFactoryService.GetServiceInfoResponse, Service References.HostFactoryService.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> | ||
</GenericObjectDataSource> |
98 changes: 98 additions & 0 deletions
98
src/MvcExample/Service References/HostFactoryService/Reference.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.42000 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
namespace MvcExample.HostFactoryService { | ||
|
||
|
||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | ||
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="HostFactoryService.IService")] | ||
public interface IService { | ||
|
||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/GetServiceInfo", ReplyAction="http://tempuri.org/IService/GetServiceInfoResponse")] | ||
MvcExample.HostFactoryService.GetServiceInfoResponse GetServiceInfo(MvcExample.HostFactoryService.GetServiceInfoRequest request); | ||
|
||
// CODEGEN: Generating message contract since the operation has multiple return values. | ||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/GetServiceInfo", ReplyAction="http://tempuri.org/IService/GetServiceInfoResponse")] | ||
System.Threading.Tasks.Task<MvcExample.HostFactoryService.GetServiceInfoResponse> GetServiceInfoAsync(MvcExample.HostFactoryService.GetServiceInfoRequest request); | ||
} | ||
|
||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | ||
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)] | ||
public partial class GetServiceInfoRequest { | ||
|
||
public GetServiceInfoRequest() { | ||
} | ||
} | ||
|
||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | ||
[System.ServiceModel.MessageContractAttribute(WrapperName="GetServiceInfoResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)] | ||
public partial class GetServiceInfoResponse { | ||
|
||
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)] | ||
public System.Guid DependencyInstanceId; | ||
|
||
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)] | ||
public string ServiceImplementationTypeName; | ||
|
||
public GetServiceInfoResponse() { | ||
} | ||
|
||
public GetServiceInfoResponse(System.Guid DependencyInstanceId, string ServiceImplementationTypeName) { | ||
this.DependencyInstanceId = DependencyInstanceId; | ||
this.ServiceImplementationTypeName = ServiceImplementationTypeName; | ||
} | ||
} | ||
|
||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | ||
public interface IServiceChannel : MvcExample.HostFactoryService.IService, System.ServiceModel.IClientChannel { | ||
} | ||
|
||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] | ||
public partial class ServiceClient : System.ServiceModel.ClientBase<MvcExample.HostFactoryService.IService>, MvcExample.HostFactoryService.IService { | ||
|
||
public ServiceClient() { | ||
} | ||
|
||
public ServiceClient(string endpointConfigurationName) : | ||
base(endpointConfigurationName) { | ||
} | ||
|
||
public ServiceClient(string endpointConfigurationName, string remoteAddress) : | ||
base(endpointConfigurationName, remoteAddress) { | ||
} | ||
|
||
public ServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : | ||
base(endpointConfigurationName, remoteAddress) { | ||
} | ||
|
||
public ServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : | ||
base(binding, remoteAddress) { | ||
} | ||
|
||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] | ||
MvcExample.HostFactoryService.GetServiceInfoResponse MvcExample.HostFactoryService.IService.GetServiceInfo(MvcExample.HostFactoryService.GetServiceInfoRequest request) { | ||
return base.Channel.GetServiceInfo(request); | ||
} | ||
|
||
public System.Guid GetServiceInfo(out string ServiceImplementationTypeName) { | ||
MvcExample.HostFactoryService.GetServiceInfoRequest inValue = new MvcExample.HostFactoryService.GetServiceInfoRequest(); | ||
MvcExample.HostFactoryService.GetServiceInfoResponse retVal = ((MvcExample.HostFactoryService.IService)(this)).GetServiceInfo(inValue); | ||
ServiceImplementationTypeName = retVal.ServiceImplementationTypeName; | ||
return retVal.DependencyInstanceId; | ||
} | ||
|
||
public System.Threading.Tasks.Task<MvcExample.HostFactoryService.GetServiceInfoResponse> GetServiceInfoAsync(MvcExample.HostFactoryService.GetServiceInfoRequest request) { | ||
return base.Channel.GetServiceInfoAsync(request); | ||
} | ||
} | ||
} |
Oops, something went wrong.