<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpsEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> <wsHttpBinding> <binding name="HttpsEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="false" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://api.dc1.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc" binding="wsHttpBinding" bindingConfiguration="HttpsEndpoint" contract="ServiceWsEndUser.IWsEndUser" name="HttpsEndpoint" /> <endpoint address="https://api.dc1.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/soap11" binding="basicHttpBinding" bindingConfiguration="BasicHttpsEndpoint" contract="ServiceWsEndUser.IWsEndUser" name="BasicHttpsEndpoint" /> <endpoint address="https://api.dc1.computing.cloud.it/WsCommon/v2.9/WsCommon.svc" binding="wsHttpBinding" bindingConfiguration="HttpsEndpoint" contract="ServiceWsCommon.IWsCommon" name="HttpsEndpoint1" /> <endpoint address="https://api.dc1.computing.cloud.it/WsLicense/v2.9/WsLicense.svc" binding="wsHttpBinding" bindingConfiguration="HttpsEndpoint" contract="ServiceWsLicense.IWsLicense" name="HttpsEndpoint2" /> </client> </system.serviceModel>
using ArubaCloud.ServiceWsCommon; using ArubaCloud.ServiceWsEndUser; using ArubaCloud.ServiceWsLicense; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { //crea un nuovo oggetto di tipo WsEndUserClient using (WsEndUserClient client = new WsEndUserClient("HttpsEndpoint")) { //crea un nuovo oggetto di tipo WsCommonClient using (WsCommonClient client = new WsCommonClient()) { } //crea un nuovo oggetto di tipo WsLicenseClient using (WsLicenseClient client = new WsLicenseClient()) } } } }
<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <jxb:globalBindings generateElementProperty="false" /> </jxb:bindings>
package arubacloud; import https.api_computing_cloud_it.wscommon.v2.IWsCommon; import https.api_computing_cloud_it.wscommon.v2.WsCommon; import https.api_computing_cloud_it.wsenduser.v2.IWsEndUser; import https.api_computing_cloud_it.wsenduser.v2.WsEndUser; import https.api_computing_cloud_it.wslicense.v2.IWsLicense; import https.api_computing_cloud_it.wslicense.v2.WsLicense; public class ArubaCloud { public static void main(String[] args) { try { IWsEndUser iWsEndUser = new WsEndUser().getHttpsEndpoint(); IWsCommon iWsCommon = new WsCommon().getHttpsEndpoint(); IWsLicense iWsLicense = new WsLicense().getHttpsEndpoint(); } catch (Exception e) { System.out.println(e); } } }