How to Get global contacts from EWS? - ios

I'm working on microsoft EWS Webservice i found the solutions for fectching current users data . Now i need to fetch global contacts from EWS. is there any help?thanks in Advance.
currently im using below string for getting user data
<?xml version=\"1.0\" encoding=\"utf-8\"?>\
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\
xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">\
<soap:Body>\
<ResolveNames xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\"\
xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"\
ReturnFullContactData=\"true\">\
<UnresolvedEntry>smtp:%##atea.dk</UnresolvedEntry>\
</ResolveNames>\
</soap:Body>\
</soap:Envelope>

If you want to Search for contacts in the Global Address List you just need to set the SearchScope to ActiveDirectory see http://msdn.microsoft.com/en-us/library/office/aa565329(v=exchg.150).aspx
eg
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1" />
</soap:Header>
<soap:Body>
<m:ResolveNames ReturnFullContactData="true" SearchScope="ActiveDirectory">
<m:UnresolvedEntry>smtp</m:UnresolvedEntry>
</m:ResolveNames>
</soap:Body>
</soap:Envelope>
The thing to keep in mind with this method is that it will only return a max of 100 entries. If you have a really large directory and have Exchange 2013 then use findpeople http://msdn.microsoft.com/en-us/library/office/jj191039(v=exchg.150).aspx instead
Cheers
Glen

Related

Travelport uAPI log in via terminal command

I have been stuck iwht the authorization process wiht Travelport uAPI.
So far, we have been able to successesfully create a terminal session and returns a host token.
Following this, i need to Include the host token in order to the create a terminal session response.
I hit a post request to the API - (https://americas.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/TerminalService) with my generated token
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ter:TerminalReq AuthorizedBy="PRODSMOKETEST" TargetBranch="P1064XX" xmlns:ter="http://www.travelport.com/schema/terminal_v33_0" xmlns:com="http://www.travelport.com/schema/common_v33_0">
<com:BillingPointOfSaleInfo OriginApplication="UAPI"/>
<com:HostToken Host="1V" Key="1T">7BC47E76-49E8-436D-5061-XXXXXXXXXXXX</com:HostToken>
<ter:TerminalCommand>ADENATL</ter:TerminalCommand>
</ter:TerminalReq>
</soapenv:Body>
</soapenv:Envelope>
The respoonse is shared below:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<terminal:TerminalRsp TransactionId="A9D4AF0F0A0D6A81BE7458993D2C259F" ResponseTime="15" xmlns:terminal="http://www.travelport.com/schema/terminal_v33_0">
<terminal:TerminalCommandResponse>
<terminal:Text>SIGN IN </terminal:Text>
<terminal:Text>><</terminal:Text>
</terminal:TerminalCommandResponse>
</terminal:TerminalRsp>
</SOAP:Body>
</SOAP:Envelope>
The issue seems to be around the Terminal command log in wiht ADENATL .
I am not able to figure out if this is an issue with the log "ADENATL" or if I am missing out on any step?
Any help would be appreciated
I have tried the loggoin in with the terminal commands SON/ZHA, which gives me an eorror with Agent ID.

Bing Ads API Reporting Service returns error code 2015 "No Dimension Selected"

I'm trying to pull some data from the Bing Ads API but I keep getting error code 2015. I'm using Savon with Ruby on Rails. Here is the request:
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v13" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://bingads.microsoft.com/Reporting/v13">
<env:Header>
<AuthenticationToken>blahblahblah</AuthenticationToken>
<CustomerAccountId>blahblahblah</CustomerAccountId>
<CustomerId>blahblahblah</CustomerId>
<DeveloperToken>blahblahblah</DeveloperToken>
</env:Header>
<env:Body>
<tns:SubmitGenerateReportRequest>
<ReportRequest xsi:nil="false" xsi:type="AccountPerformanceReportRequest">
<ExcludeColumnHeaders>true</ExcludeColumnHeaders>
<ExcludeReportFooter>true</ExcludeReportFooter>
<ExcludeReportHeader>true</ExcludeReportHeader>
<Format>Csv</Format>
<Language>English</Language>
<ReportName>AccountPerformanceReportRequest</ReportName>
<ReturnOnlyCompleteData>false</ReturnOnlyCompleteData>
<Aggregation>Summary</Aggregation>
<Columns>
<AccountPerformanceReportColumn>Spend</AccountPerformanceReportColumn>
<AccountPerformanceReportColumn>Clicks</AccountPerformanceReportColumn>
<AccountPerformanceReportColumn>Conversions</AccountPerformanceReportColumn>
<AccountPerformanceReportColumn>Revenue</AccountPerformanceReportColumn>
</Columns>
<Filter xsi:nil="true"/>
<Scope>
<AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>blahblahblah</a1:long>
</AccountIds>
</Scope>
<Time>
<CustomDateRangeEnd>
<Day>02</Day>
<Month>04</Month>
<Year>2019</Year>
</CustomDateRangeEnd>
<CustomDateRangeStart>
<Day>01</Day>
<Month>04</Month>
<Year>2019</Year>
</CustomDateRangeStart>
<PredefinedTime xsi:nil="true"/>
<ReportTimeZone>EasternTimeUSCanada</ReportTimeZone>
</Time>
</ReportRequest>
</tns:SubmitGenerateReportRequest>
</env:Body>
</env:Envelope>
As you can see, I'm pulling the report with 'Summary' as the aggregation type. If I use 'Monthly' as the aggregation type and include a 'TimePeriod' column, it works perfectly, but if I do that then the data returned is for the whole month of April as opposed to the date range I've selected 04-01-2019..04-02-2019.
Here is the response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Server</faultcode>
<faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information</faultstring> <detail>
<ApiFaultDetail xmlns="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<TrackingId xmlns="https://adapi.microsoft.com">52665fe5-3eb8-42e0-ad8e-942e848297ce</TrackingId>
<BatchErrors/>
<OperationErrors>
<OperationError>
<Code>2015</Code>
<Details>No Dimension selected.</Details>
<ErrorCode>RequiredColumnsNotSelected</ErrorCode>
<Message>The specified report request does not specify all the required columns for this report type. Please submit a report request with the required columns for this report type, and optionally additional columns that are to be included in the report.</Message>
</OperationError>
</OperationErrors>
</ApiFaultDetail>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
The error code returned would lead me to believe that a TimePeriod column is required even for Summary, but that contradicts what is documented here.
All other aggregation types work with this setup. Any help would be greatly appreciated.
Good catch. We will update documentation to clarify that at least one attribute (non performance stat) e.g., AccountId must be included. Most of the other reports have specific attributes that must be included, whereas the account report does not. I hope this helps!

Retriving all checks, deposits, etc dealing with money using qbxml

I'm able to retrieve some data using QBXML from a QuickBooks 14 database, but there are missing items in the returned XML. For example, although all of the General Journal Entries are returned, but not Checks or Deposits. This gives and incomplete picture of the account's balance.
Is JournalEntryQueryRq the best way to get all of the information? If so are there other child nodes than <IncludeLineItems>true</IncludeLineItems> I should use? Should something else other than JournalEntryQueryRqbe used to begin with?
Here is a current XML sample for an account
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<!-- Examples: -->
<JournalEntryQueryRq>
<AccountFilter>
<ListID>80000000-1xxxxxxxxx</ListID>
</AccountFilter>
<IncludeLineItems>true</IncludeLineItems>
</JournalEntryQueryRq>
</QBXMLMsgsRq>
</QBXML>
that returns a lot of data for the account, but none of the types Check or Deposit. This makes me think I'm missing something easy.
Thanks in advance for any insight
The JournalEntryQueryRq request returns Journal Entry records.
If you want Check objects, do a CheckQueryRq.
If you want Deposit objects, do a DepositQueryRq.
All of the syntax is documented in the QuickBooks OSR:
https://developer-static.intuit.com/qbsdk-current/common/newosr/index.html

PHP library for Office365 EWS with GetRooms

Whole last week i struggled with Php libraries for EWS. I tried Package365Ews and Php-ews but both of them are missing core feature for me, or it's not documented - GetRooms. Do anyone know how to handle it, or know another library implementing this?
I personally would suggest my own library, garethp/php-ews.
It's got simple usage, but not everything is covered under simpler API's. EWS is a large thing, and documenting everything would be intense. That being said, I can certainly help you translate existing documentation by Microsoft to using this code. And, if you find yourself with more issues after this post, I check my Github daily, so logging an issue against my repository will get more help in a better place for a back and forth.
But first, let me outlay how to perform functions that aren't directly documented. Like GetRooms. My API wraps around EWS, it doesn't block your access to it. So even though I've made no obvious way to do a GetRooms, it's still there. Like this
<?php
use garethp\ews\API;
use garethp\ews\API\Type;
$api = API::fromUsernameAndPassword($server, $username, $password);
//Build Request
$result = $api->getClient()->GetRooms($request);
var_dump($result);
So, the question becomes, how do we build the request? Well, thankfully EWS is very well documented in XML. First, find the article that describes what you're trying to do, then look for the XML. I'm not 100% what you want to do, but I'll use this article as a base. The XML that we're going to try to replicate is
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
</soap:Header>
<soap:Body>
<m:GetRooms>
<m:RoomList>
<t:EmailAddress>bldg3rooms#contoso.com</t:EmailAddress>
</m:RoomList>
</m:GetRooms>
</soap:Body>
</soap:Envelope>
You can skip the header, and the <m:GetRooms> part, those are built for you. What we're focused on is the payload you want to send, which is
<m:RoomList>
<t:EmailAddress>bldg3rooms#contoso.com</t:EmailAddress>
</m:RoomList>
We want to make our request look like that. So, in our code, our request will look like:
$request = array (
'RoomsList' => array (
'EmailAddress' => 'bldg3rooms#contoso.com'
)
);
$request = Type::buildFromArray($request);
And this will be translated to XML for you for the SOAP call. Using this method, for any functions that aren't documented or outright supported, you can easily still use them and just refer to the official Microsoft documentation for any request you need to make

Send Array of Api Request for Server in Soap iOS

i am using third party Exigo Api request for my app. the service says to send 2 more requests array in the body of main Soap service. Though i tried sending the 2 request in string form in the Body of the main request but i received Empty String . Help me out how should i do this . i got no solution in the manual or on any other site after googling this issue for a week i am posting this question
Exigo Api (Process Transaction Service)
POST /3.0/ExigoApi.asmx HTTP/1.1
Host: api.exigo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.exigo.com/ProcessTransaction"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ApiAuthentication xmlns="http://api.exigo.com/">
<LoginName>string</LoginName>
<Password>string</Password>
<Company>string</Company>
</ApiAuthentication>
</soap:Header>
<soap:Body>
<TransactionalRequest xmlns="http://api.exigo.com/">
<TransactionRequests>
<ApiRequest />
</TransactionRequests>
</TransactionalRequest>
</soap:Body>
</soap:Envelope>
This is the Soap request i have to process and Send Api Request Array in the body of the main request using iOS.
Thanks in Advance
Please check below link, like
let body = envelope.addChild(name: "soap:Body")
let header = body.addChild(name: "soap:Header" , attributes: ["xmlns:m" : "http://www.w3schools.com/transaction/"])
https://github.com/tadija/AEXML
We have tackle same type of issue for our mobile app. We have have implemented adapter that accepts JSON request from Mobile and then translate that into API request which is inculded in MVC Application as wsdl. Can't find any other way to do that.

Resources