inwise Top Background
Arrow on Service

List

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:  
Inwise Service allows you to query the service using a syntax that is similar to SQL.
The table name is the name of the Entity, the fields are the entity's fields.

** In order to improve performance, you can:
1. Limit the number (using a TOP or LIMIT clause)
2. Select less fields in the query


use the query builder
The service enables you to create a new entity

Parameters:

The service returns the QueryResult

Java Code:

//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();

//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);

Now we can call the "Login" operation for getting the session token.
For setting the new header, please check the code for creating the usual header here with the following changed:
  1. Change the header name from "SecHeader" to "AuthIdentifier"
  2. Do not set SOAPElement "username" and SOAPElement "pass"
  3. Set a SOAPElement named "identifier" with the value of the token you recieved from the service.

C# Code:

 InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();

 

        //fill the security header

        InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();

        header.username = "username";

        header.pass = "myPassword";

        ws.SecHeaderValue = header;//set credentials

 

        string sessionToken = ws.Login();

 

        //now I can use the new header

        ws.SecHeaderValue = null;//clear the old header if you want

 

        //create the new header

        InwiseWebServices.AuthIdentifier sessionHeader = new InwiseWebServices.AuthIdentifier();

        //set it's value

        sessionHeader.identifier = sessionToken;

        //set the service with the new header

        ws.AuthIdentifierValue = sessionHeader;

        //now I can continue the normal activity

        ////prepare query data

        QueryParameters queryData = new QueryParameters();

        queryData.Sql = "select id,name,sender from MobileMessage where id > 20 limit 5";

 

        //// call the service

        QueryResult queryResult = ws.List(queryData);

VB Code:

  Dim ws As New InwiseWebServices.InwiseWebServices()

 

        'fill the security header

        Dim header As New InwiseWebServices.SecHeader()

        header.username = "username"

        header.pass = "myPassword"

        'set credentials

        ws.SecHeaderValue = header

 

        Dim sessionToken As String = ws.Login()

 

        'now I can use the new header

        ws.SecHeaderValue = Nothing 'clear the old header if you want

 

        'create the new header

        Dim sessionHeader As New InwiseWebServices.AuthIdentifier()

        'set it's value

        sessionHeader.identifier = sessionToken

        'set the service with the new header

        ws.AuthIdentifierValue = sessionHeader

        'now I can continue the normal activity

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>d93e413aaf9c4291aed939d3e405bc91</SessionId>

            <EndSession>true</EndSession>

        </SessionIdHeader>

    </soap:Header>

    <soap:Body>

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

            <query>

                <Sql>select Body,Name,CreateDate from  mobileMessage limit 1</Sql>

                <PageSize>0</PageSize>

            </query>

        </List>

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

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

            <ListResult>

                <IsSuccess>true</IsSuccess>

                <ErrorDetails>

                    <Code>Success</Code>

                </ErrorDetails>

                <PageSize>0</PageSize>

                <Data>

                    <InwiseEntity xsi:type="MobileMessage">

                        <Id>1</Id>

                        <AccountId>899</AccountId>

                        <Body>hi #field1#!</Body>

                        <Bounces>0</Bounces>

                        <Charset>utf-8</Charset>

                        <CreateDate>2011-02-14T07:47:00</CreateDate>

                        <EndDate xsi:nil="true" />

                        <LastSent xsi:nil="true" />

                        <Name>Message 14/02/2011</Name>

                        <NonSent>0</NonSent>

                        <Opens>0</Opens>

                        <RecipientType xsi:nil="true" />

                        <Sender>inwise</Sender>

                        <Sent>0</Sent>

                        <Status>Test</Status>

                        <TableConnectionId xsi:nil="true" />

                        <Unsubscribes>0</Unsubscribes>

                        <UpdateDate>2011-02-14T07:47:00</UpdateDate>

                        <Validity>1440</Validity>

                    </InwiseEntity>

                </Data>

            </ListResult>

        </ListResponse>

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