inwise Top Background
Arrow on Service

Email Marketing API-Part B

InwiseWebServices API Center

https://www.em-sender.com/ws/inwiseservice.asmx

The result of a Log on request

Properties:

Name Type Description
ServiceUrl Uri The url of the service to used in the next requests

Java Code:

    if (logonResult.isIsSuccess() == false) {
        ErrorDetails errorDetails = logonResult.getErrorDetails();
        //// a human readable description of the problem
        String errorMessage = errorDetails.getDescription();

        //// a fixed error code
        ErrorCode errorCode = errorDetails.getCode();

        //// the current error id, not always
            has a value
        String incident = errorDetails.getLogId();

    } else {
        //// use the new service url
        String serviceUrl = logonResult.getServiceUrl();
        String sessionToken = logonResult.getSessionId();
    }

C# Code:

    LoginResult logonResult = service.Logon(this.userName, this.password);

    if (logonResult.IsSuccess == false)

    {

        var errorDetails = logonResult.ErrorDetails;

        //// a human readable description of the problem

        String errorMessage = errorDetails.Description;

 

        //// a fixed error code

        ErrorCode errorCode = errorDetails.Code;

 

        //// the current error id, not always has a value

        String incident = errorDetails.LogId;

 

    }

    else

    {

        //// use the new service url

        String serviceUrl = logonResult.ServiceUrl;

        String sessionToken = logonResult.SessionId;

    }

VB Code:

            Dim logonResult As LoginResult = s.Logon(Me.userName, Me.password)

            If logonResult.IsSuccess = False Then

                Dim errorDetails As ErrorDetails = logonResult.ErrorDetails

                '' a human readable description of the problem

                Dim errorMessage As String = errorDetails.Description

 

                '' a fixed error code

                Dim errorCode As ErrorCode = errorDetails.Code

 

                '' the current error id, not always has a value

                Dim incident As String = errorDetails.LogId

            Else

                '' use the new service url

                Dim serviceUrl As String = logonResult.ServiceUrl

                Dim sessionToken As String = logonResult.SessionId

 

            End If

Raw Xml:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <soap:Body>

        <LogonResponse xmlns="http://www.inwise.com/webservices/v2">

            <LogonResult>

                <IsSuccess>true</IsSuccess>

                <ErrorDetails>

                    <Code>Success</Code>

                </ErrorDetails>

                <SessionId>d93e413fff974291aed939d3e405bc91</SessionId>

                <AccountId>0</AccountId>

                <ServiceUrl>https://www.em-sender.com/InwiseService2.asmx</ServiceUrl>

                <MinutesToLive>1200</MinutesToLive>

            </LogonResult>

        </LogonResponse>

    </soap:Body>

</soap:Envelope>




Home  |  About us  |  Products  |  Service  |  Partners  |  Forum  |  Email Marketing Terms  |  Support  |  Contact us
Terms & Conditions  |  Privacy Policy  |  Anti Spam Policy  |  Site Map
© 2008 inwise LTD. All rights reserved.