xml


EWS Error: 'Set action is invalid for property' when CreateItem with attachment by Using XML EWS API


I need to create an item with attachments.
I am using This documentation and following is my xml request:
"<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:CreateItem MessageDisposition=\"SaveOnly\">"
"<m:Items>"
"<t:Message>"
"<t:Subject>%#</t:Subject>"
"<t:Body BodyType=\"HTML\">%#</t:Body>"
"<t:ToRecipients>"
"%#"
"</t:ToRecipients>"
"<t:CcRecipients>"
"%#"
"</t:CcRecipients>"
"<t:BccRecipients>"
"%#"
"</t:BccRecipients>"
"<t:Attachments>"
"<t:FileAttachment>"
"<t:Name>FileAttachment.txt</t:Name>"
"<t:IsInline>false</t:IsInline>"
"<t:IsContactPhoto>false</t:IsContactPhoto>"
"<t:Content>VGhpcyBpcyBhIGZpbGUgYXR0YWNobWVudC4=</t:Content>"
"</t:FileAttachment>"
"</t:Attachments>"
"</t:Message>"
"</m:Items>"
"</m:CreateItem>"
"</soap:Body>"
"</soap:Envelope>"
But EWS API returns following error:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="817" MinorBuildNumber="11" Version="V2016_10_10" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>
<s:Body>
<m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Error">
<m:MessageText>Set action is invalid for property.</m:MessageText>
<m:ResponseCode>ErrorInvalidPropertySet</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:MessageXml>
<t:FieldURI FieldURI="item:Attachments" />
</m:MessageXml>
<m:Items />
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</s:Body>
</s:Envelope>
Am I doing something something wrong? When I remove attachment section from my XML request then it is working but not with attachment.

Related Links

treegrid with json in jqgrid (adjacency), jqgrid not displaying data with json?
Using XSLT can I prevent output of consecutive identical values?
Issues with comma separated data with XSLT
Spring servlet-context.xml error with mongo
iterating over all the subdirectories looking for XML files - Perl
aperte work flow import bpm file
Using XSLT to preprocess #ifdefs in XML
Read and change multiple XML files in Excel (2007) VBA
Groovy Grails test case error when converting to xml
Return xml data from action - CakePHP
Extracting xml attributes with go
NodeJs CMS - XML or JSON as storage format when building a CMS
Finding mixed XML content with regular expressions
Use same XSLT code multiple times in same file
Count <td> Elements in xhtml <table> with XSLT 1.0
Address verification/validation service that supports cross-domain requests

Categories

HOME
shell
assembly
awk
amp-html
object
interface
solaris
babeljs
echo
missing-data
angularfire2
trac
performancepoint
reactive-programming
filechannel
gkturnbasedmatch
foreign-keys
sencha-touch
solrcloud
asp.net-core-webapi
selinux
articulate-storyline
babel
roslyn
pimcore
php-mysqlidb
beta
google-api-client
ckfinder
windows-server-2003
google-cloud-print
pylons
licensing
angular-translate
soot
datastax-enterprise-graph
uitapgesturerecognizer
rselenium
openwhisk
reactjs.net
jwplayer6
watchman
tex
modernizr
doc
datacachefactory
linqpad
bindingnavigator
drupal-theming
berkeley-db-je
signal-strength
strftime
libgphoto2
user-defined-fields
rocks
greatest-n-per-group
avspeechsynthesizer
appscale
data-protection
nio2
toran-proxy
pypiserver
morton-number
toolkit
sapscript
lasso
zscript
airbrake
canvg
bcache
code-documentation
openbabel
theos
execve
beatsmusic
android-cookiemanager
pseudo-class
rickshaw
genymotion-call
jama
functional-java
dsym
koala
syndicationfeed
xmltodict
spring-3
hidapi
neos-server
workitem
composite-component
jdb
database-create
predicatebuilder
cross-database
screen-size
clrstoredprocedure
strsep
metaweblog
binomial-heap
application-verifier
lxr
interop-domino
dsoframer
httpcookie
mathematical-typesetting
idatareader

Resources

Encrypt Message