nmarus / node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API.
MIT License
116 stars 52 forks source link

Single Result Returned #42

Closed scottweedon closed 7 years ago

scottweedon commented 7 years ago

Take the below Soap request. I believe when this is converted into a JSON object the value of ItemId.Id is always the last listed item.

Anyway around this?
scottweedon commented 7 years ago

Export Items https://msdn.microsoft.com/en-us/library/office/ff709523(v=exchg.150).aspx

kcastrotech commented 7 years ago

Are you asking about multiple ItemId's in the request or on the response? A specific example Soap message/xml and JSON object would be helpful.

For the request, the element you want multiples of is the one that should contain the array. Using the example request you provided, you want multiple "ItemId" elements so the JSON object would need to look like this:

{
    ItemIds:{
        ItemId:[
            {attributes:{Id:"AAMkAGYzZjZmRiUsidkC+NAAAAY89GAAA="}},
            {attributes:{Id:"AAMkAGYzZjZmRiUsidkC+NAAAAY89FAAA="}},
            {attributes:{Id:"AAMkAGYzZjZmRiUsidkC+NAAAAY87NAAA="}},
        ]
    }
}
kcastrotech commented 7 years ago

Closing due to inactivity.