Using EWS operations (SOAP) how do I get the Tentative status of a meeting?
I can get it using a GetItem request setting AllProperties instead of IdOnly as BaseShape value but I would like to avoid such a big xml response.
Any suggestion?
Request:
<m:GetItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"/>
<t:FieldURI FieldURI="item:TextBody"/>
</t:AdditionalProperties>
</m:ItemShape>
Response:
<t:IsAllDayEvent>false</t:IsAllDayEvent>
<t:LegacyFreeBusyStatus>Tentative</t:LegacyFreeBusyStatus>
( Full request:)
<?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:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" soap:mustUnderstand="0"/>
</soap:Header>
<soap:Body>
<m:GetItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"/>
<t:FieldURI FieldURI="item:TextBody"/>
</t:AdditionalProperties>
</m:ItemShape>
<m:ItemIds>
<t:ItemId Id="AAMkAGYxMTJlYTgyLTBmYzEtNGYxZS1iYmViLTI4YmUwNjliN2MzNgBGAAAAAAACkhFyvlR7SJUlGy2d/KnVBwCB2CePXX/CToeJqw2EFOoNAAAAAAENAADu1Rjhkj+hRIRrpcOyI08fAAAXZyRiAAA=" ChangeKey="DwAAABYAAADu1Rjhkj+hRIRrpcOyI08fAAAXZ6Nr"/>
</m:ItemIds>
</m:GetItem>
</soap:Body>
</soap:Envelope>
You should be able to do it using calendar:LegacyFreeBusyStatus eg
<m:GetItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"/>
<t:FieldURI FieldURI="item:TextBody"/>
<t:FieldURI FieldURI="calendar:LegacyFreeBusyStatus"/>
</t:AdditionalProperties>
</m:ItemShape>
Related
This is a jboss fuse project
i have this scenario where a file has 1 XML with multiple child records. i need to Split the child records and use XSLT to convert it to multiple XML
.
SAMPLE XML ORDER (INPUT):
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
i have this XSLT :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<!-- TODO: Auto-generated template -->
<xsl:for-each select="catalog/cd">
<xsl:result-document href="file{position()}.xml">
<document>
<xsl:copy-of select="current()"/>
</document>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
BLUEPRINT.xml(CAMEL ROUTE)
<route id="_route1">
<from id="_from1" uri="file:work/in"/>
<log id="_log1" message="${body}"/>
<loop id="_loop1">
<xpath>count(/catalog/cd)</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</loop>
</route>
when i run this route it says error AS BELOW :
[xt) thread #2 - file://work/in] _route1 INFO <?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
[xt) thread #2 - file://work/in] XPathBuilder INFO Created default XPathFactory com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl#4b4289ed
[xt) thread #2 - file://work/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-MC0WKB0C-60902-1513777570783-0-1 on ExchangeId: ID-MC0WKB0C-60902-1513777570783-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: count(/catalog/cd). Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[_route1 ] [_route1 ] [file://work/in ] [ 270]
[_route1 ] [_log1 ] [log ] [ 7]
[_route1 ] [_loop1 ] [loop[xpath{XPath: count(/catalog/cd)}] ] [ 224]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: count(/catalog/cd). Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:916)
at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:780)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:750)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:165)
at org.apache.camel.processor.LoopProcessor.process(LoopProcessor.java:64)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:204)
at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:898)
... 22 more
Caused by: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at com.sun.org.apache.xpath.internal.objects.XObject.error(XObject.java:711)
at com.sun.org.apache.xpath.internal.objects.XObject.nodelist(XObject.java:457)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:364)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:110)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:191)
... 23 more
IN THIS IT FIRSE LOGS THE XML FILE WHICH I PROVIDE THE INPUT AND THEN IT GIVES ERROR FOR THE XPATH EXPRESSION IN THE LOOP ROUTE.
SO can you help me with this or is there some other approach for this scenario ?
Scenario: i have this scenario where a file has 1 XML with multiple child records. i need to Split the child records and use XSLT to convert it to multiple XML (in JBOSS FUSE )
Thankyou for your help # noMad17 .
(BLUEPRINT.XML)Route with ActiveMQ :
<route id="_route1">
<from id="_from1" uri="file:work/in"/>
<log id="_log1" message="${body}"/>
<split id="_split1">
<xpath>/catalog/cd</xpath>
<log id="_log3" message="split data : ${body}"/>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\Scenario5\data\order.xsl"/>
<log id="_log2" message="After XSLT : ${body}"/>
<to id="_to2" pattern="InOnly" uri="activemq:queue:OrderDetails"/>
</split>
</route>
XML INPUT:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd >
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name="catalog">
<xsl:element name="cd">
<xsl:copy-of select="/*[local-name()='cd']/*"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Output MSG IN ACTIVEMQ :
Message 1 :
<?xml version="1.0" encoding="UTF-8"?><catalog><cd><title>Empire Burlesque</title><artist>Bob Dylan</artist><country>USA</country><company>Columbia</company><price>10.90</price><year>1985</year></cd></catalog>
Message 2:
<?xml version="1.0" encoding="UTF-8"?><catalog><cd><title>Hide your heart</title><artist>Bonnie Tyler</artist><country>UK</country><company>CBS Records</company><price>9.90</price><year>1988</year></cd></catalog>
You should change this:
<loop id="_loop1">
<xpath>count(/catalog/cd)</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</loop>
Into this:
<split id="_split1">
<xpath>/catalog/cd</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</split>
When doing this you will get one exchange per cd-element and as such you'll have to change your XSLT accordingly.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="CamelSplitIndex" />
<xsl:template match="/">
<xsl:result-document href="file$CamelSplitIndex.xml">
<document>
<xsl:value-of select="."/>
</document>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
I suggest you take a look at the Splitter EIP
i'm trying to request hotel availability (OTA_HotelAvailRQ) by just address
for example :
<OTA_HotelAvailRQ Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AvailRequestSegment>
<Customer>
<Corporate>
<ID>ABC123</ID>
</Corporate>
</Customer>
<GuestCounts Count="2"/>
<HotelSearchCriteria>
<Criterion>
<Address>
<CityName>SOUTHLAKE</CityName>
<CountryCode>US</CountryCode>
</Address>
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="10-24" Start="10-22" />
</AvailRequestSegment>
</OTA_HotelAvailRQ>
and there is no way i get results in the response, i keep receiving:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header><eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1"><eb:From><eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId></eb:From><eb:To><eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId></eb:To><eb:CPAId>3IHI</eb:CPAId><eb:ConversationId>998</eb:ConversationId><eb:Service eb:type="sabreXML">256444039988570150</eb:Service><eb:Action>OTA_HotelAvailLLSRS</eb:Action><eb:MessageData><eb:MessageId>1090003241665830150</eb:MessageId><eb:Timestamp>2017-08-31T06:42:46</eb:Timestamp></eb:MessageData></eb:MessageHeader><wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"><wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3237679358254869625!1952915!0</wsse:BinarySecurityToken></wsse:Security></soap-env:Header><soap-env:Body><OTA_HotelAvailRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.3.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2017-08-31T01:42:46-05:00">
<stl:SystemSpecificResults>
<stl:Message code="0">NO AVAIL</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
i tried with the example in the sabre page by HotelCode and it worked, but i need to request it by just address, what should be the request design then? thank you
That fake corporate ID is not helping. You'd also need the city code.
Try with something like this:
<OTA_HotelAvailRQ Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnHostCommand="true">
<AvailRequestSegment>
<GuestCounts Count="2"/>
<HotelSearchCriteria>
<Criterion>
<Address>
<CityName>SOUTH LAKE</CityName>
<CountryCode>US</CountryCode>
</Address>
<HotelRef HotelCityCode="TVL"/>
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="10-24" Start="10-22" />
</AvailRequestSegment>
</OTA_HotelAvailRQ>
Note the space in South Lake
If you need to get the city code from the city name, you can use EncodeDecodeLLSRQ:
<EncodeDecodeRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.0">
<Encode>
<Address>
<CityName>south lake</CityName>
</Address>
</Encode>
</EncodeDecodeRQ>
<EncodeDecodeRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.0.0">
<stl:ApplicationResults status="Complete">
<stl:Success timeStamp="2017-09-05T11:35:59-05:00"/>
</stl:ApplicationResults>
<Text>TVL SOUTH LAKE TAHOE, CALIFORNIA,USA</Text>
</EncodeDecodeRS>
I have EWS soap request:
<?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:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>room1#exch2010.local</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:GetItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Start"></t:FieldURI>
<t:FieldURI FieldURI="calendar:End"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Location"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Organizer"></t:FieldURI>
<t:FieldURI FieldURI="item:Body"></t:FieldURI>
<t:FieldURI FieldURI="item:TextBody"></t:FieldURI>
</t:AdditionalProperties>
</m:ItemShape>
<m:ItemIds>
<t:ItemId Id="AAAUAHJvb20xQGV4Y2gyMDEwLmxvY2FsAEYAAAAAALp73pDts6BGkBAHp2xunxIHAOLiLPCbqYNEl0bu9R23VJMAAAAW2OQAAOLiLPCbqYNEl0bu9R23VJMAAAAXKY8AAA==" ChangeKey="DwAAAA=="></t:ItemId>
</m:ItemIds>
</m:GetItem>
</soap:Body>
</soap:Envelope>
Response error is:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: The 'Traversal' attribute is not declared.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message>
<t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>16</t:LineNumber>
<t:LinePosition>20</t:LinePosition>
<t:Violation>The 'Traversal' attribute is not declared.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Why would it fail?
Similar request
<?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:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>room1#exch2010.local</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Start"></t:FieldURI>
<t:FieldURI FieldURI="calendar:End"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Location"></t:FieldURI>
</t:AdditionalProperties>
</m:ItemShape>
<m:CalendarView StartDate="2016-05-30T11:08:48" EndDate="2016-12-31T11:08:48"></m:CalendarView>
<m:ParentFolderIds>
<t:FolderId Id="AAAUAHJvb20xQGV4Y2gyMDEwLmxvY2FsAC4AAAAAALp73pDts6BGkBAHp2xunxIBAOLiLPCbqYNEl0bu9R23VJMAAAAW2OQAAA==" ChangeKey="AgAAABYAAADi4izwm6mDRJdG7vUdt1STAAAAFtkD"></t:FolderId>
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>
works perfectly
EDIT 1:
I have removed traversal attribute and than got error:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode
xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation
</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: The 'FieldURI' attribute is invalid - The value 'item:TextBody' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:UnindexedFieldURIType' - The Enumeration constraint failed.</faultstring>
<detail>
<e:ResponseCode
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation
</e:ResponseCode>
<e:Message
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.
</e:Message>
<t:MessageXml
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>3</t:LineNumber>
<t:LinePosition>649</t:LinePosition>
<t:Violation>The 'FieldURI' attribute is invalid - The value 'item:TextBody' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:UnindexedFieldURIType' - The Enumeration constraint failed.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Then I removed last Additional property
<t:FieldURI FieldURI="item:TextBody"></t:FieldURI>
and finally got this error.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="123" MinorBuildNumber="3" Version="Exchange2010_SP2"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</s:Header>
<s:Body
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetItemResponseMessage ResponseClass="Error">
<m:MessageText>The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert from EwsLegacyId to EwsId format.</m:MessageText>
<m:ResponseCode>ErrorInvalidIdMalformedEwsLegacyIdFormat</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Items/>
</m:GetItemResponseMessage>
</m:ResponseMessages>
</m:GetItemResponse>
</s:Body>
</s:Envelope>
Please advise.
There is no traversal attribute in the GetItem element you can check the reference documentation https://msdn.microsoft.com/en-us/library/aa563775(v=exchg.150).aspx
Traversals are only valid in FindItem and FindFolder operations (its specifies what scope of Folders you are searching). GetItem is just getting a particular Item you have the Id for (The Id contains the information to locate the Item so any folder/mailbox context isn't needed). That said if you don't have rights to the particular Item and you try to use GetItem the error reported will be that the Item doesn't exist in the store (which is a little deceiving).
Edit 1
You need to start versioning all the EWS Requests you make eg in the Header
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2" />
</soap:Header>
You need to put the schema version https://msdn.microsoft.com/en-us/library/office/dn741586(v=exchg.150).aspx you working with (or at least put Exchange2007_SP1) . That will address the EWSId error (you won't be able to use the Id your trying to use but you should get the correct ID from the other request you got that from).
How can I parse the SOAP response xml using Spring Batch. Creating bean for org.springframework.batch.item.xml.StaxEventItemReader and passring fragmentRootElementName parameter value as XMLData returned nothing, probably unmarshalling issue.
SOAP XML
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<WSCorIDSOAPHeader xmlns="http://www.wilytech.com/" CorID="5A35F9B79906411A00156F9B91FFE1EB,1:1,0,0,wl-flor-apvm106|Tomcat|dorms106-1|WebServices|Client|http_//tempuri.org/|submit,2,AgAAAdRIQgAAAAFGAAAAAQAAABFqYXZhLnV0aWwuSGFzaE1hcAAAAAdIQgAAAAJGAAAAAgAAABBqYXZhLmxhbmcuU3RyaW5nABBBcHBNYXBDYWxsZXJUeXBlSEIAAAADRQAAAAIACldlYlNlcnZpY2VIQgAAAARFAAAAAgARQXBwTWFwQ2FsbGVyQWdlbnRIQgAAAAVFAAAAAgAKZG9ybXMxMDYtMUhCAAAABkUAAAACAA9DYWxsZXJUaW1lc3RhbXBIQgAAAAdFAAAAAgANMTQ1NzUwNzQwMDExOUhCAAAACEUAAAACABZBcHBNYXBDYWxsZXJNZXRob2ROYW1lSEIAAAAJRQAAAAIAGmh0dHBfLy90ZW1wdXJpLm9yZy98c3VibWl0SEIAAAAKRQAAAAIAEEFwcE1hcENhbGxlckhvc3RIQgAAAAtFAAAAAgAPd2wtZmxvci1hcHZtMTA2SEIAAAAMRQAAAAIAE0FwcE1hcENhbGxlclByb2Nlc3NIQgAAAA1FAAAAAgAGVG9tY2F0SEIAAAAORQAAAAIAClR4blRyYWNlSWRIQgAAAA9FAAAAAgAjNUEyRDkxRjE5OTA2NDExQTAwMTU2RjlCRTAyOEIwNUM5ODU=" />
<To soap:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://fldcvpswa0806.something.com/RTPTransaction/SubmitTransaction.svc?wsdl</To>
<Action soap:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/ISubmitTransaction/Submit</Action>
</soap:Header>
<soap:Body>
<ns2:Submit xmlns="http://schemas.datacontract.org/2004/07/RTPTransaction" xmlns:ns2="http://tempuri.org/" xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
<ns2:XMLData>
<Creation>2016-03-09 02:10:00</Creation>
<EndOfDays />
<Transactions>
<Transaction>
<BusinessDate>2016-03-09</BusinessDate>
<Items>
<Item>
<Extended>35.0</Extended>
<Number>480000015523</Number>
<Quantity>1</Quantity>
<Taxes>
<Tax>
<Amount>0.00</Amount>
<Rate>0.000</Rate>
<State>FL</State>
<Type>N</Type>
</Tax>
</Taxes>
<Unit>35.0</Unit>
</Item>
</Items>
<Stamp>2016-03-09 00:00:00</Stamp>
<Store>01006</Store>
</Transaction>
</Transactions>
</ns2:XMLData>
</ns2:Submit>
</soap:Body>
</soap:Envelope>
using SOAP is it possible to get the ChangeKey of an item identified by Item ID ?
cheers
GetItem might be what you're looking for. The response will include ChangeKey.
<?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="Exchange2007_SP1" />
<t:TimeZoneContext>
<t:TimeZoneDefinition Id="GMT Standard Time" />
</t:TimeZoneContext>
</soap:Header>
<soap:Body>
<m:GetItem>
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
</m:ItemShape>
<m:ItemIds>
<t:ItemId Id="AAMkADY..." />
</m:ItemIds>
</m:GetItem>
</soap:Body>
</soap:Envelope>