This commit is contained in:
Jamie Wilbraham 2016-08-10 12:14:45 +12:00
Родитель 76c8ad5fab
Коммит 745bf369fb
32 изменённых файлов: 837 добавлений и 99 удалений

Просмотреть файл

@ -6,6 +6,6 @@
public string LicenceKey { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public ApiRegistrationProviderType? ApiRegistrationProvider { get; set; }
public DeviceManagement.Infrustructure.Connectivity.Models.Enums.ApiRegistrationProviderType? ApiRegistrationProvider { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using System.ServiceModel.Channels;
using System.ServiceModel;
using DeviceManagement.Infrustructure.Connectivity.EricssonApiService;
namespace DeviceManagement.Infrustructure.Connectivity.Builders
{
public class EricssonServiceBuilder
{
public static ApiStatusClient GetApiStatusClient(ICredentials credentials)
{
var apiStatusClient = new ApiStatusClient();
apiStatusClient.Endpoint.Address = GetAuthorizedEndpoint("https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus");
return apiStatusClient;
}
private static EndpointAddress GetAuthorizedEndpoint(string endpointUrl)
{
//Create wsse security object
var usernameToken = new EricssonUsernameToken { Password = "TesTing2345", Username = "demo.user18@ericsson.com" };
var security = new EricssonSecurity { UsernameToken = usernameToken };
//Serialize object to xml
var xmlObjectSerializer = new DataContractSerializer(typeof(EricssonSecurity), "Security", "");
//Create address header with security header
var addressHeader = AddressHeader.CreateAddressHeader("Security", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", security, xmlObjectSerializer);
return new EndpointAddress(new Uri(endpointUrl), new[] { addressHeader });
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
namespace DeviceManagement.Infrustructure.Connectivity.Clients
{
class EricssonCellularClient
{
}
}

Просмотреть файл

@ -7,15 +7,15 @@ using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using DeviceManagement.Infrustructure.Connectivity.Proxies;
namespace DeviceManagement.Infrustructure.Connectivity.Services
namespace DeviceManagement.Infrustructure.Connectivity.Clients
{
public class JasperCellularService : IJasperCellularService
public class JasperCellularClient
{
private readonly ICredentialProvider _credentialProvider;
private const string CellularInvalidCreds = "400200";
private const string CellularInvalidLicense = "400100";
public JasperCellularService(ICredentialProvider credentialProvider)
public JasperCellularClient(ICredentialProvider credentialProvider)
{
_credentialProvider = credentialProvider;
}

Просмотреть файл

@ -33,19 +33,26 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Builders\EricssonServiceBuilder.cs" />
<Compile Include="Builders\JasperServiceBuilder.cs" />
<Compile Include="Constants\JasperApiConstants.cs" />
<Compile Include="Exceptions\CellularConnectivityException.cs" />
<Compile Include="Argument.cs" />
<Compile Include="Models\Enums\CellularProviderEnum.cs" />
<Compile Include="Models\Security\EricssonSecurity.cs" />
<Compile Include="Proxies\AuthenticationValidationProxy.cs" />
<Compile Include="Proxies\IAuthenticationValidationProxy.cs" />
<Compile Include="Services\ExternalCellularService.cs" />
<Compile Include="Services\IJasperCellularService.cs" />
<Compile Include="Service References\EricssonApiService\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Clients\EricssonCellularClient.cs" />
<Compile Include="ExternalCellularService.cs" />
<Compile Include="Utilities.cs" />
<Compile Include="Models\Security\ICredentialProvider.cs" />
<Compile Include="Models\Security\ICredentials.cs" />
<Compile Include="Services\IExternalCellularService.cs" />
<Compile Include="IExternalCellularService.cs" />
<Compile Include="Models\Billing\DataUsage.cs" />
<Compile Include="Models\Billing\DataUsageDetail.cs" />
<Compile Include="Models\TerminalDevice\Iccid.cs" />
@ -54,10 +61,10 @@
<Compile Include="Models\Security\SecurityHeader.cs" />
<Compile Include="Models\TerminalDevice\SessionInfo.cs" />
<Compile Include="Models\TerminalDevice\Terminal.cs" />
<Compile Include="Services\JasperCellularService.cs" />
<Compile Include="Clients\JasperCellularClient.cs" />
<Compile Include="Proxies\IJasperBillingClientProxy.cs" />
<Compile Include="Proxies\IJasperTerminalClientProxy.cs" />
<Compile Include="Models\Jasper\JasperCredentials.cs" />
<Compile Include="Models\Other\CellularCredentials.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
@ -89,6 +96,13 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Service References\EricssonApiService\ApiStatusService.wsdl" />
<None Include="Service References\EricssonApiService\DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Service References\EricssonApiService\DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Web References\com.jasperwireless.spark.billing\Billing.wsdl" />
<None Include="Web References\com.jasperwireless.spark.billing\GetInvoiceResponse.datasource">
<DependentUpon>Reference.map</DependentUpon>
@ -245,10 +259,31 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Channels" />
<Reference Include="System.Web.Services" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Service References\EricssonApiService\" />
</ItemGroup>
<ItemGroup>
<None Include="Service References\EricssonApiService\configuration91.svcinfo" />
</ItemGroup>
<ItemGroup>
<None Include="Service References\EricssonApiService\configuration.svcinfo" />
</ItemGroup>
<ItemGroup>
<None Include="Service References\EricssonApiService\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

Просмотреть файл

@ -1,39 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using DeviceManagement.Infrustructure.Connectivity.com.jasperwireless.spark.terminal;
using DeviceManagement.Infrustructure.Connectivity.Exceptions;
using DeviceManagement.Infrustructure.Connectivity.Proxies;
using DeviceManagement.Infrustructure.Connectivity.Clients;
using DeviceManagement.Infrustructure.Connectivity.Models.Enums;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
namespace DeviceManagement.Infrustructure.Connectivity.Services
namespace DeviceManagement.Infrustructure.Connectivity
{
public class ExternalCellularService : IExternalCellularService
{
private readonly ICredentialProvider _credentialProvider;
private readonly IJasperCellularService _jasperCellularService;
public ExternalCellularService(
IJasperCellularService jasperCellularService,
ICredentialProvider credentialProvider)
public ExternalCellularService(ICredentialProvider credentialProvider)
{
_credentialProvider = credentialProvider;
}
public List<Iccid> GetTerminals(ApiRegistrationProviderType registrationProvider)
public List<Iccid> GetTerminals()
{
List<Iccid> terminals = new List<Iccid>();
var registrationProvider = _credentialProvider.Provide().ApiRegistrationProvider;
switch (registrationProvider)
{
case ApiRegistrationProviderType.Jasper:
terminals = _jasperCellularService.GetTerminals();
terminals = new JasperCellularClient(_credentialProvider).GetTerminals();
break;
case Models.Enums.ApiRegistrationProviderType.Ericsson:
case ApiRegistrationProviderType.Ericsson:
//TODO call ericsson service
break;
@ -44,14 +38,15 @@ namespace DeviceManagement.Infrustructure.Connectivity.Services
return terminals;
}
public Terminal GetSingleTerminalDetails(Iccid iccid, ApiRegistrationProviderType registrationProvider)
public Terminal GetSingleTerminalDetails(Iccid iccid)
{
Terminal terminal = null;
var registrationProvider = _credentialProvider.Provide().ApiRegistrationProvider;
switch (registrationProvider)
{
case ApiRegistrationProviderType.Jasper:
terminal = _jasperCellularService.GetSingleTerminalDetails(iccid);
terminal = new JasperCellularClient(_credentialProvider).GetSingleTerminalDetails(iccid);
break;
case ApiRegistrationProviderType.Ericsson:
//TODO call ericsson service
@ -63,14 +58,15 @@ namespace DeviceManagement.Infrustructure.Connectivity.Services
return terminal;
}
public List<SessionInfo> GetSingleSessionInfo(Iccid iccid, ApiRegistrationProviderType registrationProvider)
public List<SessionInfo> GetSingleSessionInfo(Iccid iccid)
{
List<SessionInfo> sessionInfo = null;
var registrationProvider = _credentialProvider.Provide().ApiRegistrationProvider;
switch (registrationProvider)
{
case ApiRegistrationProviderType.Jasper:
sessionInfo = _jasperCellularService.GetSingleSessionInfo(iccid);
sessionInfo = new JasperCellularClient(_credentialProvider).GetSingleSessionInfo(iccid);
break;
case ApiRegistrationProviderType.Ericsson:
//TODO call ericsson service
@ -87,14 +83,15 @@ namespace DeviceManagement.Infrustructure.Connectivity.Services
/// GetTerminals() and checks the response for validation errors.
/// </summary>
/// <returns>True if valid. False if not valid</returns>
public bool ValidateCredentials(ApiRegistrationProviderType registrationProvider)
public bool ValidateCredentials()
{
bool isValid = false;
var registrationProvider = _credentialProvider.Provide().ApiRegistrationProvider;
switch (registrationProvider)
{
case ApiRegistrationProviderType.Jasper:
isValid = _jasperCellularService.ValidateCredentials();
isValid = new JasperCellularClient(_credentialProvider).ValidateCredentials();
break;
case ApiRegistrationProviderType.Ericsson:
//TODO call ericsson service

Просмотреть файл

@ -0,0 +1,16 @@
using System.Collections.Generic;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
namespace DeviceManagement.Infrustructure.Connectivity
{
/// <summary>
/// Temp interface structure for implementing resources that are required from the IoT Suite
/// </summary>
public interface IExternalCellularService
{
List<Iccid> GetTerminals();
bool ValidateCredentials();
Terminal GetSingleTerminalDetails(Iccid iccid);
List<SessionInfo> GetSingleSessionInfo(Iccid iccid);
}
}

Просмотреть файл

@ -1,13 +0,0 @@
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
namespace DeviceManagement.Infrustructure.Connectivity.Models.Jasper
{
public class JasperCredentials : ICredentials
{
//todo : how can I structure this to allow multiple telcos?
public string LicenceKey { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string BaseUrl { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,18 @@
using DeviceManagement.Infrustructure.Connectivity.Models.Enums;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
namespace DeviceManagement.Infrustructure.Connectivity.Models.Other
{
public class CellularCredentials : ICredentials
{
//todo : how can I structure this to allow multiple telcos?
public string LicenceKey { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string BaseUrl { get; set; }
public ApiRegistrationProviderType? ApiRegistrationProvider
{
get; set;
}
}
}

Просмотреть файл

@ -0,0 +1,52 @@
using System;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace DeviceManagement.Infrustructure.Connectivity.Models.Security
{
[Serializable]
[DataContract(Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")] // This object serialize specific namespace
public class EricssonSecurity
{
[DataMember] // This object serialize without namespace
public EricssonUsernameToken UsernameToken;
}
public class EricssonUsernameToken : IXmlSerializable
{
public string Username
{
get; set;
}
public string Password
{
get; set;
}
public XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
reader.MoveToContent();
Username = reader.ReadElementString("Username");
reader.ReadStartElement();
Password = reader.ReadElementString("Password");
reader.ReadEndElement();
}
public void WriteXml(XmlWriter writer)
{
writer.WriteElementString("Username", Username);
writer.WriteElementString("Password", Password);
}
}
}

Просмотреть файл

@ -1,4 +1,6 @@
namespace DeviceManagement.Infrustructure.Connectivity.Models.Security
using DeviceManagement.Infrustructure.Connectivity.Models.Enums;
namespace DeviceManagement.Infrustructure.Connectivity.Models.Security
{
public interface ICredentials
{
@ -6,5 +8,10 @@
string Username { get; set; }
string Password { get; set; }
string BaseUrl { get; set; }
ApiRegistrationProviderType? ApiRegistrationProvider
{
get; set;
}
}
}

Просмотреть файл

@ -29,8 +29,6 @@ namespace DeviceManagement.Infrustructure.Connectivity.Proxies
cycleStartDate = cycleStartDate
};
return _service.GetTerminalUsageDataDetails(request);
}

Просмотреть файл

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://api.dcp.ericsson.net/ApiStatus" name="ApiStatusService" targetNamespace="http://api.dcp.ericsson.net/ApiStatus" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xs:schema targetNamespace="http://api.dcp.ericsson.net/ApiStatus" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Echo" nillable="true" type="tns:echo" />
<xs:element name="EchoResponse" nillable="true" type="tns:echoResponse" />
<xs:complexType name="echo">
<xs:sequence>
<xs:element minOccurs="0" name="message" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="echoResponse">
<xs:sequence>
<xs:element minOccurs="0" name="message" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="ApiStatus_echo">
<part name="echo" element="tns:Echo" />
</message>
<message name="ApiStatus_echoResponse">
<part name="echoResponse" element="tns:EchoResponse" />
</message>
<portType name="ApiStatus">
<operation name="echo" parameterOrder="echo">
<input message="tns:ApiStatus_echo" />
<output message="tns:ApiStatus_echoResponse" />
</operation>
</portType>
<binding name="ApiStatusBinding" type="tns:ApiStatus">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="echo">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="ApiStatusService">
<port name="ApiStatusPort" binding="tns:ApiStatusBinding">
<soap:address location="https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus" />
</port>
</service>
</definitions>

Просмотреть файл

@ -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="echoResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse, Service References.EricssonApiService.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

Просмотреть файл

@ -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="echoResponse1" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1, Service References.EricssonApiService.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

Просмотреть файл

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <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 DeviceManagement.Infrustructure.Connectivity.EricssonApiService {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://api.dcp.ericsson.net/ApiStatus", ConfigurationName="EricssonApiService.ApiStatus")]
public interface ApiStatus {
// CODEGEN: Generating message contract since the operation echo is neither RPC nor document wrapped.
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1 echo(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest request);
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
System.Threading.Tasks.Task<DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1> echoAsync(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest request);
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.6.1064.2")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://api.dcp.ericsson.net/ApiStatus")]
public partial class echo : object, System.ComponentModel.INotifyPropertyChanged {
private string messageField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
public string message {
get {
return this.messageField;
}
set {
this.messageField = value;
this.RaisePropertyChanged("message");
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.6.1064.2")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://api.dcp.ericsson.net/ApiStatus")]
public partial class echoResponse : object, System.ComponentModel.INotifyPropertyChanged {
private string messageField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
public string message {
get {
return this.messageField;
}
set {
this.messageField = value;
this.RaisePropertyChanged("message");
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class echoRequest {
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.dcp.ericsson.net/ApiStatus", Order=0)]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echo Echo;
public echoRequest() {
}
public echoRequest(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echo Echo) {
this.Echo = Echo;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class echoResponse1 {
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.dcp.ericsson.net/ApiStatus", Order=0)]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse EchoResponse;
public echoResponse1() {
}
public echoResponse1(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse EchoResponse) {
this.EchoResponse = EchoResponse;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface ApiStatusChannel : DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus, System.ServiceModel.IClientChannel {
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class ApiStatusClient : System.ServiceModel.ClientBase<DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus>, DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus {
public ApiStatusClient() {
}
public ApiStatusClient(string endpointConfigurationName) :
base(endpointConfigurationName) {
}
public ApiStatusClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public ApiStatusClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public ApiStatusClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress) {
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1 DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus.echo(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest request) {
return base.Channel.echo(request);
}
public DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse echo(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echo Echo1) {
DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest inValue = new DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest();
inValue.Echo = Echo1;
DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1 retVal = ((DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus)(this)).echo(inValue);
return retVal.EchoResponse;
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
System.Threading.Tasks.Task<DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1> DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus.echoAsync(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest request) {
return base.Channel.echoAsync(request);
}
public System.Threading.Tasks.Task<DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoResponse1> echoAsync(DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echo Echo) {
DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest inValue = new DeviceManagement.Infrustructure.Connectivity.EricssonApiService.echoRequest();
inValue.Echo = Echo;
return ((DeviceManagement.Infrustructure.Connectivity.EricssonApiService.ApiStatus)(this)).echoAsync(inValue);
}
}
}

Просмотреть файл

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="d54e8b9a-2953-4e83-943e-52943937b3c2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
<EnableDataBinding>true</EnableDataBinding>
<ExcludedTypes />
<ImportXmlTypes>false</ImportXmlTypes>
<GenerateInternalTypes>false</GenerateInternalTypes>
<GenerateMessageContracts>false</GenerateMessageContracts>
<NamespaceMappings />
<CollectionMappings />
<GenerateSerializableTypes>true</GenerateSerializableTypes>
<Serializer>Auto</Serializer>
<UseSerializerForFaults>true</UseSerializerForFaults>
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
<ReferencedAssemblies />
<ReferencedDataContractTypes />
<ServiceContractMappings />
</ClientOptions>
<MetadataSources>
<MetadataSource Address="https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus?WSDL" Protocol="http" SourceId="1" />
</MetadataSources>
<Metadata>
<MetadataFile FileName="ApiStatusService.wsdl" MetadataType="Wsdl" ID="15b73c87-8871-4fd7-bdbb-006435ae902d" SourceId="1" SourceUrl="https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus?WSDL" />
</Metadata>
<Extensions>
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
</Extensions>
</ReferenceGroup>

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<behaviors />
<bindings>
<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;ApiStatusBinding&quot;&gt;&lt;security mode=&quot;Transport&quot; /&gt;&lt;/Data&gt;" bindingType="basicHttpBinding" name="ApiStatusBinding" />
<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;ApiStatusBinding1&quot; /&gt;" bindingType="basicHttpBinding" name="ApiStatusBinding1" />
</bindings>
<endpoints>
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;ApiStatusBinding&quot; contract=&quot;EricssonApiService.ApiStatus&quot; name=&quot;ApiStatusPort&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;ApiStatusBinding&quot; contract=&quot;EricssonApiService.ApiStatus&quot; name=&quot;ApiStatusPort&quot; /&gt;" contractName="EricssonApiService.ApiStatus" name="ApiStatusPort" />
</endpoints>
</configurationSnapshot>

Просмотреть файл

@ -0,0 +1,310 @@
<?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="2n9Mfx/qAZ63lPrw0I0z+C/Jzzw=">
<bindingConfigurations>
<bindingConfiguration bindingType="basicHttpBinding" name="ApiStatusBinding">
<properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>ApiStatusBinding</serializedValue>
</property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>StrongWildcard</serializedValue>
</property>
<property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>65536</serializedValue>
</property>
<property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
</property>
<property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Text.UTF8Encoding</serializedValue>
</property>
<property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Buffered</serializedValue>
</property>
<property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Text</serializedValue>
</property>
<property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
</property>
<property path="/security/mode" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Transport</serializedValue>
</property>
<property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
</property>
<property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Never</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>TransportSelected</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>(Collection)</serializedValue>
</property>
<property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
</property>
<property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>UserName</serializedValue>
</property>
<property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Default</serializedValue>
</property>
</properties>
</bindingConfiguration>
<bindingConfiguration bindingType="basicHttpBinding" name="ApiStatusBinding1">
<properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>ApiStatusBinding1</serializedValue>
</property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>StrongWildcard</serializedValue>
</property>
<property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>65536</serializedValue>
</property>
<property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
</property>
<property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Text.UTF8Encoding</serializedValue>
</property>
<property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Buffered</serializedValue>
</property>
<property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Text</serializedValue>
</property>
<property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
</property>
<property path="/security/mode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
</property>
<property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Never</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>TransportSelected</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>(Collection)</serializedValue>
</property>
<property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
</property>
<property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>UserName</serializedValue>
</property>
<property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Default</serializedValue>
</property>
</properties>
</bindingConfiguration>
</bindingConfigurations>
<endpoints>
<endpoint name="ApiStatusPort" contract="EricssonApiService.ApiStatus" bindingType="basicHttpBinding" address="https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus" bindingConfiguration="ApiStatusBinding">
<properties>
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus</serializedValue>
</property>
<property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>basicHttpBinding</serializedValue>
</property>
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>ApiStatusBinding</serializedValue>
</property>
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>EricssonApiService.ApiStatus</serializedValue>
</property>
<property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
</property>
<property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>&lt;Header /&gt;</serializedValue>
</property>
<property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
</property>
<property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
</property>
<property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
</property>
<property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
</property>
<property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
</property>
<property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
</property>
<property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
</property>
<property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>My</serializedValue>
</property>
<property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>LocalMachine</serializedValue>
</property>
<property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>FindBySubjectDistinguishedName</serializedValue>
</property>
<property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>False</serializedValue>
</property>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>ApiStatusPort</serializedValue>
</property>
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
</properties>
</endpoint>
</endpoints>
</SavedWcfConfigurationInformation>

Просмотреть файл

@ -1,17 +0,0 @@
using System.Collections.Generic;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using DeviceManagement.Infrustructure.Connectivity.Models.Enums;
namespace DeviceManagement.Infrustructure.Connectivity.Services
{
/// <summary>
/// Temp interface structure for implementing resources that are required from the IoT Suite
/// </summary>
public interface IExternalCellularService
{
List<Iccid> GetTerminals(ApiRegistrationProviderType registrationProvider);
bool ValidateCredentials(ApiRegistrationProviderType registrationProvider);
Terminal GetSingleTerminalDetails(Iccid iccid, ApiRegistrationProviderType cellularProvider);
List<SessionInfo> GetSingleSessionInfo(Iccid iccid, ApiRegistrationProviderType cellularProvider);
}
}

Просмотреть файл

@ -1,17 +0,0 @@
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceManagement.Infrustructure.Connectivity.Services
{
public interface IJasperCellularService
{
List<Iccid> GetTerminals();
bool ValidateCredentials();
Terminal GetSingleTerminalDetails(Iccid iccid);
List<SessionInfo> GetSingleSessionInfo(Iccid iccid);
}
}

Просмотреть файл

@ -6,8 +6,19 @@
</sectionGroup>
</configSections>
<system.serviceModel>
<bindings/>
<client/>
<bindings>
<basicHttpBinding>
<binding name="ApiStatusBinding">
<security mode="Transport" />
</binding>
<binding name="ApiStatusBinding1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus"
binding="basicHttpBinding" bindingConfiguration="ApiStatusBinding"
contract="EricssonApiService.ApiStatus" name="ApiStatusPort" />
</client>
</system.serviceModel>
<applicationSettings>
<DeviceManagement.Infrustructure.Connectivity.Properties.Settings>

Просмотреть файл

@ -60,6 +60,7 @@
<HintPath>..\..\packages\Dynamitey.1.0.2.0\lib\net40\Dynamitey.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Infrastructure.Connectivity, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Azure.Amqp, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Amqp.1.1.1\lib\net451\Microsoft.Azure.Amqp.dll</HintPath>

Просмотреть файл

@ -2,7 +2,6 @@
using Autofac.Integration.Mvc;
using Autofac.Integration.WebApi;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using DeviceManagement.Infrustructure.Connectivity.Services;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Configurations;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Repository;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Utility;
@ -12,6 +11,8 @@ using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Help
using Owin;
using System.Reflection;
using System.Web.Mvc;
using DeviceManagement.Infrustructure.Connectivity;
using DeviceManagement.Infrustructure.Connectivity.Clients;
namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web
{
@ -83,7 +84,7 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web
builder.RegisterType<ApiRegistrationRepository>().As<IApiRegistrationRepository>();
builder.RegisterType<JasperCredentialsProvider>().As<ICredentialProvider>();
builder.RegisterType<ExternalCellularService>().As<IExternalCellularService>();
builder.RegisterType<JasperCellularService>().As<IJasperCellularService>();
}
}
}

Просмотреть файл

@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Mvc;
using DeviceManagement.Infrustructure.Connectivity;
using DeviceManagement.Infrustructure.Connectivity.Exceptions;
using DeviceManagement.Infrustructure.Connectivity.Services;
using GlobalResources;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.BusinessLogic;

Просмотреть файл

@ -4,9 +4,9 @@ using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;
using DeviceManagement.Infrustructure.Connectivity;
using DeviceManagement.Infrustructure.Connectivity.Exceptions;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using DeviceManagement.Infrustructure.Connectivity.Services;
using GlobalResources;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Configurations;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.DeviceSchema;
@ -283,8 +283,8 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.
public ActionResult GetDeviceCellularDetails(string iccid)
{
var viewModel = new SimInformationViewModel();
viewModel.TerminalDevice = _cellularService.GetSingleTerminalDetails(new Iccid(iccid), ApiRegistrationProviderType.Jasper);
viewModel.SessionInfo = _cellularService.GetSingleSessionInfo(new Iccid(iccid), ApiRegistrationProviderType.Jasper).LastOrDefault() ??
viewModel.TerminalDevice = _cellularService.GetSingleTerminalDetails(new Iccid(iccid));
viewModel.SessionInfo = _cellularService.GetSingleSessionInfo(new Iccid(iccid)).LastOrDefault() ??
new SessionInfo();
return PartialView("_CellularInformation", viewModel);

Просмотреть файл

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using DeviceManagement.Infrustructure.Connectivity;
using DeviceManagement.Infrustructure.Connectivity.Models.TerminalDevice;
using DeviceManagement.Infrustructure.Connectivity.Services;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models;
using DeviceManagement.Infrustructure.Connectivity.Models.Enums;
@ -11,7 +11,7 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.
{
public static IEnumerable<string> GetListOfAvailableIccids(this IExternalCellularService cellularService, List<dynamic> devices)
{
var fullIccidList = cellularService.GetTerminals(ApiRegistrationProviderType.Jasper).Select(i => i.Id);
var fullIccidList = cellularService.GetTerminals().Select(i => i.Id);
var usedIccidList = GetUsedIccidList(devices).Select(i => i.Id);
return fullIccidList.Except(usedIccidList);
}

Просмотреть файл

@ -1,4 +1,4 @@
using DeviceManagement.Infrustructure.Connectivity.Models.Jasper;
using DeviceManagement.Infrustructure.Connectivity.Models.Other;
using DeviceManagement.Infrustructure.Connectivity.Models.Security;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Repository;
@ -16,12 +16,13 @@ namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.
public ICredentials Provide()
{
var apiRegistration = _registrationRepository.RecieveDetails();
return new JasperCredentials()
return new CellularCredentials()
{
BaseUrl = apiRegistration.BaseUrl,
LicenceKey = apiRegistration.LicenceKey,
Password = apiRegistration.Password,
Username = apiRegistration.Username
Username = apiRegistration.Username,
ApiRegistrationProvider = apiRegistration.ApiRegistrationProvider
};
}
}

Просмотреть файл

@ -60,7 +60,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Security.cs" />
<Compile Include="EricssonSecurity.cs" />
<Compile Include="Service References\ApiStatus\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>

Просмотреть файл

@ -14,11 +14,11 @@ namespace EricssonConsoleApiTester
public static EndpointAddress GetAuthorizedEndpoint(string endpointUrl)
{
//Create wsse security object
var usernameToken = new UsernameToken { Password = "TesTing2345", Username = "demo.user18@ericsson.com" };
var security = new Security { UsernameToken = usernameToken };
var usernameToken = new UsernameToken { Password = "TesTing234dd5", Username = "demo.user18@ericsson.com" };
var security = new EricssonSecurity { UsernameToken = usernameToken };
//Serialize object to xml
var xmlObjectSerializer = new DataContractSerializer(typeof(Security), "Security", "");
var xmlObjectSerializer = new DataContractSerializer(typeof(EricssonSecurity), "Security", "");
//Create address header with security header
var addressHeader = AddressHeader.CreateAddressHeader("Security", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", security, xmlObjectSerializer);

Просмотреть файл

@ -12,7 +12,7 @@ namespace EricssonConsoleApiTester
{
[Serializable]
[DataContract(Namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")] // This object serialize specific namespace
public class Security
public class EricssonSecurity
{
[DataMember] // This object serialize without namespace
public UsernameToken UsernameToken;

Просмотреть файл

@ -22,6 +22,9 @@ namespace EricssonConsoleApiTester
apiStatusClient.Endpoint.Address = EricssonEndpointBuilder.GetAuthorizedEndpoint("https://serviceportal.telenorconnexion.com/dcpapi/ApiStatus");
var response1 = apiStatusClient.echo(new echo());
//sub tester - get a single sim information