inwise Top Background
Arrow on Service

Send

Operation Name: operation Name
Description: description

All actions require a valid user name and password using authenticaion header.

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

Adding a reference to inwise web services

User Name:
Password:  
  • Select source:
  • Select target:
The service enables you to send an immediate message (new or existing) to a single recipient (new or existing)

Parameters:

The service returns the SendingResult

Java Code:

    //// call the service
    SendingResult sendResult = soapService.send(source, target);

    //// check the results
    if (sendResult.isIsSuccess()) {
        String sendId = sendResult.getIds().getString().get(0);
        return "Transaction Id: " + sendId;
    } else {
        ErrorDetails errorDetails = sendResult.getErrorDetails();
        return Utils.BuildErrorMessage(errorDetails);
    }

C# Code:

    //// use the new service url

    InwiseService.InwiseService service = new InwiseService.InwiseService();

    service.Url = logonResult.ServiceUrl;

 

    //// prepare headers

    service.SessionIdHeaderValue = new SessionIdHeader()

    {

        SessionId = logonResult.SessionId

    };

 

    //// call the service

    SendingResult sendResult = service.Send(source, target);

 

    //// check the results

    if (sendResult.IsSuccess)

    {

        String sendId = sendResult.Ids[0];

        return "Transaction Id: " + sendId;

    }

    else

    {

        ErrorDetails errorDetails = sendResult.ErrorDetails;

        return Utils.BuildErrorMessage(errorDetails);

    }

VB Code:

                '' use the new service url

                Dim service As New InwiseService.InwiseService()

                service.Url = logonResult.ServiceUrl

 

                '' prepare headers

                service.SessionIdHeaderValue = New SessionIdHeader() With { _

                 .SessionId = logonResult.SessionId _

                }

 

                '' call the service

                Dim sendResult As SendingResult = service.Send(source, target)

 

                '' check the results

                If sendResult.IsSuccess Then

                    Dim sendId As [String] = sendResult.Ids(0)

                    Return "Transaction Id: " & sendId

                Else

                    Dim errorDetails As ErrorDetails = sendResult.ErrorDetails

                    Return Utils.BuildErrorMessage(errorDetails)

                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:Header>

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

            <SessionId>ef7b1728ce004a4dbd7404d16918dd53</SessionId>

            <EndSession>true</EndSession>

        </SessionIdHeader>

    </soap:Header>

    <soap:Body>

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

            <source xsi:type="ExistingSendingSource">

                <ChannelType>Sms</ChannelType>

                <Id>1</Id>

            </source>

            <target xsi:type="ExistingRecipientSendingTarget">

                <RecipientId>12070135</RecipientId>

                <ExternalGroupId xsi:nil="true" />

            </target>

        </Send>

    </soap:Body>

</soap:Envelope>


Response

<?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>

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

            <SendResult>

                <IsSuccess>true</IsSuccess>

                <ErrorDetails>

                    <Code>Success</Code>

                </ErrorDetails>

                <Ids>

                    <string>b2249f9776984a60bdebfdca6115eb5c</string>

                </Ids>

                <Status>

                    <MobileSendingStatus>SentToGateway</MobileSendingStatus>

                </Status>

            </SendResult>

        </SendResponse>

    </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.