Note |
---|
Questa pagina è un work in progress con visibilità ristretta a Cigoli, Miscia, Gorni, Arrigoni |
URL degli endpoint del servizio MailUpService:
Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
Endpoints
SOAP: http://services.mailupnet.it/1.0/MailUpService.svc
REST: http://services.mailupnet.it/1.0/MailUpService.svc/rest
Methods
Category | Description | Available methods |
---|---|---|
Authentication | Login and logout methods. Login returns an access key that can be used as parameter when calling other methods |
...
Filters | Create and delete MailUp filters. | |
Test | This |
...
group includes methods that can be used to test the service |
|
...
Using SOAP
As specified in WSDL, SOAP methods receives a specific "request" object as input parameter and return a specific "response" object. Please refer to the description of each method for more details.
Error Handling
In case of error a standard SOAP Fault object is returned (more on this)
Using REST
REST is supported only when XML parameters are passed with http POST method (Ping method is the only exception, which can be called using http
...
GET http://services.mailupnet.it/1.0/MailUpService.svc/rest/Ping).
...
How to use REST
Client configuration in ASP.NET
Add the following entries in web.config file to enable REST
Code Block | ||
---|---|---|
| ||
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
...
<behaviors>
<endpointBehaviors>
<behavior name="restBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<service behaviorConfiguration="MailUp.WS.Host.Web.MailUpServiceBehavior" name="MailUp.WS.Service.MailUpService">
<endpoint address="rest" binding="webHttpBinding" contract="MailUp.WS.Contract.IMailUpService" behaviorConfiguration="restBehavior"/> |
Example
...
Required parameter format is the same as what is specified for SOAP requests (see example below).
Restrictions
- Available REST methods cannot be called using HTTP GET ("Ping" test method is the only exception, which can be called using http GET http://services.mailupnet.it/1.0/MailUpService.svc/rest/
...
Per configurare REST è sufficiente aggiungere le seguenti configurazioni nel web.config:
- <system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
….
- <behaviors>
….
<endpointBehaviors>
<behavior name="restBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
- <service behaviorConfiguration="MailUp.WS.Host.Web.MailUpServiceBehavior" name="MailUp.WS.Service.MailUpService">
<endpoint address="rest" binding="webHttpBinding" contract="MailUp.WS.Contract.IMailUpService" behaviorConfiguration="restBehavior"/>
ESEMPIO login REST:
...
- Ping)
- JSON is not supported
Warning |
---|
Any client implementation that performs authentication to MailUp API using REST from a client-side script (e.g. by calling AuthenticationLogin from a Javascript page) may expose your credentials to hacking. |
Configuration
Info |
---|
Please refer to REST configuration page to get some tips about enabling REST |
Example
Call http://services.mailupnet.it/1.0/MailUpService.svc/rest/AuthenticationLogin
Metodo HTTP: POST
Richiesta XML:
<LoginRequest>
<Username>xxxx</Username>
<Password>yyyy</Password>
<IdConsole>10001</IdConsole>
</LoginRequest>
Risposta XML in caso di esito positivo:
<LoginResponse passing the following XML as parameter in HTTP POST:
Code Block | ||
---|---|---|
| ||
<LoginRequest>
<Username>xxxx</Username>
<Password>yyyy</Password>
<IdConsole>10001</IdConsole>
</LoginRequest> |
A successful response has this format:
Code Block | ||
---|---|---|
| ||
<LoginResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
...
<Token>A973Amr5FJZzsZukgfdBkjblveNL8TKnqc5iLjDyixLDF9VdTx0M9N9z4Hiw=</Token> |
...
</LoginResponse> |
Risposta in caso di esito negativo:
Codice di stato while "HTTP 400 Bad Request" is returned in case of unsuccessful response
More details
Child pages (Children Display) | ||
---|---|---|
|