I am programmatically starting a workflow by calling workflowManager.StartWorkflow and passing it the XML for workflow below. The workflow just errors and fails. The workflow I am using is the OOTB Approval workflow. Is the structure for my XML incorrect?
<?xml version="1.0" encoding="UTF-8"?>
<dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types"
xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields"
xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields"
xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes"
xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dfs:dataFields>
<d:SharePointListItem_RW>
<d:Approvers>
<Assignment>
<Assignee>
<pc:Person>
<pc:DisplayName>Jia Ji JOnes</pc:DisplayName>
<pc:AccountId>ZZZDomain\jjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</Assignee>
<d:Stage xsi:nil="true" />
<d:AssignmentType>Parallel</d:AssignmentType>
</Assignment>
<Assignment>
<Assignee>
<pc:Person>
<pc:DisplayName>Matthew Jones</pc:DisplayName>
<pc:AccountId>ZZZDomain\mjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</Assignee>
<d:Stage xsi:nil="true" />
<d:AssignmentType>Parallel</d:AssignmentType>
</Assignment>
<Assignment>
<Assignee>
<pc:Person>
<pc:DisplayName>Maree H Jones</pc:DisplayName>
<pc:AccountId>ZZZDomain\mhjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</Assignee>
<d:Stage xsi:nil="true" />
<d:AssignmentType>Parallel</d:AssignmentType>
</Assignment>
</d:Approvers>
<d:ExpandGroups>true</d:ExpandGroups>
<d:NotificationMessage>A skill rating has been created which requires your approval.</d:NotificationMessage>
<d:DueDateforAllTasks xsi:nil="true" />
<d:DurationforSerialTasks>5</d:DurationforSerialTasks>
<d:DurationUnits>Day</d:DurationUnits>
<d:CC />
<d:CancelonRejection>true</d:CancelonRejection>
<d:CancelonChange>false</d:CancelonChange>
<d:EnableContentApproval>true</d:EnableContentApproval>
</d:SharePointListItem_RW>
</dfs:dataFields>
</dfs:myFields>
The XML was invalid for the approval workflow. The correct XML is below.
<?xml version="1.0" encoding="UTF-8"?>
<dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dfs:queryFields />
<dfs:dataFields>
<d:SharePointListItem_RW>
<d:Approvers>
<Assignment>
<Assignee>
<pc:Person>
<pc:DisplayName>Jia Ji JOnes</pc:DisplayName>
<pc:AccountId>ZZZDomain\jjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
<pc:Person>
<pc:DisplayName>Matthew Jones</pc:DisplayName>
<pc:AccountId>ZZZDomain\mjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</Assignee>
<d:Stage xsi:nil="true" />
<d:AssignmentType>Parallel</d:AssignmentType>
</Assignment>
</d:Approvers>
<d:ExpandGroups>true</d:ExpandGroups>
<d:NotificationMessage>test</d:NotificationMessage>
<d:DueDateforAllTasks xsi:nil="true" />
<d:DurationforSerialTasks>5</d:DurationforSerialTasks>
<d:DurationUnits>Day</d:DurationUnits>
<d:CC />
<d:CancelonRejection>false</d:CancelonRejection>
<d:CancelonChange>true</d:CancelonChange>
<d:EnableContentApproval>true</d:EnableContentApproval>
</d:SharePointListItem_RW>
</dfs:dataFields>
</dfs:myFields>
Related
i'm implementing a DRM server, so far HLS is working great but i have a problem with the playready key encryption, i know that i need to use the public key and License Nonce(IV) from the client request but i couldn't find the algorithm to encrypt it.
example from Microsoft playReady test server
client requst:
<?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:Body>
<AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
<challenge>
<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages">
<LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve">
<Version>1</Version>
<ContentHeader>
<WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0">
<DATA>
<PROTECTINFO>
<KEYLEN>16</KEYLEN>
<ALGID>AESCTR</ALGID>
</PROTECTINFO>
<KID>7987aj+eE0uBlXi0N73AQw==</KID>
<CHECKSUM>s1zZSs3Wwow=</CHECKSUM>
<CUSTOMATTRIBUTES>
<IIS_DRM_VERSION>7.1.1064.0</IIS_DRM_VERSION>
</CUSTOMATTRIBUTES>
<LA_URL>http://playready.directtaps.net/pr/svc/rightsmanager.asmx</LA_URL>
<DS_ID>AH+03juKbUGbHl1V/QIwRA==</DS_ID>
</DATA>
</WRMHEADER>
</ContentHeader>
<CLIENTINFO>
<CLIENTVERSION>2.0.0.1446</CLIENTVERSION>
</CLIENTINFO>
<RevocationLists>
<RevListInfo>
<ListID>ioydTlK2p0WXkWklprR5Hw==</ListID>
<Version>11</Version>
</RevListInfo>
<RevListInfo>
<ListID>gC4IKKPHsUCCVhnlttibJw==</ListID>
<Version>11</Version>
</RevListInfo>
<RevListInfo>
<ListID>BOZ1zT1UnEqfCf5tJOi/kA==</ListID>
<Version>12</Version>
</RevListInfo>
<RevListInfo>
<ListID>Ef/RUojT3U6Ct2jqTCChbA==</ListID>
<Version>34</Version>
</RevListInfo>
</RevocationLists>
<LicenseNonce>e7NgfwBi1xX/egdgV9BrWQ==</LicenseNonce>
<EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecc256" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyName>WMRMServer</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>W13Rs+iFyn5Qgh8iAduenxsRw3w2mOTNhfOPI6Fwv5kIn93cCauDFJexka6jtQHJ+by8wyTv4u7RofeZW9G8NakvV0JpGg7d5rEg1q1XMwy267Hecnch75FKEPSiydx2NU83IambHenRhJJ5gg3/u1aVpaXsCVtnQsv5pt5L+JM=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>cWEqivcZkvs9Le02WXFsSnCn8W+J87cN0a0/6IXZ1OIYJ8ZgVE2Bf6J14Destd4rYxKonQiMZ5mL+LZytuq7dA8LGFASKUNGKynx887tdMDMbwJnBQAllE593kUqnD4XIyKO04APahlQ1k4ezBrTU3o0TD8ssIN2OxxW4NdoNMPc+rlrPMY31hXVoIdUV7viueMRFcokDgDk/vii3yrHfLpx+iyVINhYhye1Oh0JsKc8Fkz/O1XfSrCVQzVZHI3Hui62r/Pf9H1kblv7CXo1H7Vno8trNq2zsEj96lz2b2GgYpbbiMHBJAMmIjsR6o9z3KUbOIh0eIrupDLTTvITDXDX8Q9x1A9dsDOJJGWMgWUT2n0Ay6GIzATojlMfp9eCti2gJNWv+vWKJD0k2k/COk71mcWtt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/srKRE5baKwI8MJCEEqmWonHM5C+NRboRFMpqO5AR5X27YrSsa38xen8f1VHnzYLFr0UdkprbLbm/dvFpaxivYTqfCVQEXaFMTfNp884OylSAcmvNZbUvrCyritL5xiBm/1rxypDprDv0X0C1WR9rfGilbpqc8MdqcBgmsSpJO1zW43LBBPI6U4/oBlpYKx+T2ovlq/zdgwrtmX/rp6BB+nXFtWdgJZWYN+4cwF0FooIAF8hXNiJGWR9tVPipT7s00BaL0u8udR59W/2T79vUIt0PMpuVHFmp7ZSZumsr2W1pTybmmuj5Lv54XoXryTE63GZYZRhiEE5uS3hwSWLqxd0xyCnz6ThuWaS6N0+rlxDVM+9Z1rlIhR4C5YJ5LJ2xpZFsS1apXPLm+QQ7SM1lspF/bSlHv4m3/LJqaK/sbaLAaxORDF1uE6</CipherValue>
</CipherData>
</EncryptedData>
</LA>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecdsa-sha256" />
<Reference URI="#SignedData">
<DigestMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#sha256" />
<DigestValue>Y6z9FSz2qWpvIN823wrK13in0TnWGoAcPCKw9KlWZPk=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>u45hKzad6Wir2SLSY7WTkTxpziPY2w5WTiLbNSb0RyciFV8Xm2aFyLbOCpMW33ZYubN59lsaZy8fAjUsr7ManA==</SignatureValue>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyValue>
<ECCKeyValue>
<PublicKey>2sumijs/TOhMhxwvkmjp4nXwJku8UXFHU+oY4fg+sRTp/pM7O3/w4k4QXAAn69pHahdLN+6OGpnQfwTv4xzGCQ==</PublicKey>
</ECCKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</Challenge>
</challenge>
</AcquireLicense>
</soap:Body>
</soap:Envelope>
server 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>
<AcquireLicenseResponse xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
<AcquireLicenseResult>
<Response xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages">
<LicenseResponse xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
<Version>1</Version>
<Licenses>
<License>WE1SAAAAAAN7s2B/AGLXFf96B2BX0GtZAAMAAQAAAVAAAgAEAAAACAADAAIAAAAyAAAADQAAAAoAAQABADIAAAAMAAAAIgABADQAAAAKAJYAAAAzAAAACgABAAMACQAAAPIAAQAKAAAAnu/fO2o/nhNLgZV4tDe9wEMAAQADAIDB6u6Ltq5a8s2SvNkd4kAVzxDnlUysqzX6k5epsJ4iNaZaFyLTtpgVjTRQP2lgDeJaJSIObuf2yd2Qd1tWIQDk4gXxCbUPL8NJgdvl6d4z2xBIvJq4Ol3KDiHgkYn6mYEyniIm+2IWZUrUWsKo6Z2brnsoe3GoYoNmXkJ5+kyMOgAAACoAAABMAAEAQDrjNbZngMLUdzVuWakTkwXziavX6rZhzIaQJYQOWLtJSqiFpiWTutb777SRP48Zvx2FMpyqhGdjn53dLmsiRDYAAQALAAAAHAABABB8/phYFmuGw7Y3HoQs0swN</License>
</Licenses>
<Acknowledgement>
<TransactionID>5c062475-4b2c-48e6-9b0b-54fce5b2b770</TransactionID>
</Acknowledgement>
</LicenseResponse>
</Response>
</AcquireLicenseResult>
</AcquireLicenseResponse>
</soap:Body>
</soap:Envelope>
how do i create the License from the client request and my 16 byte key?
as the title says, I can successfully create a new Product via Prestashop 1.6.1 webservice. The problem is that the new product XML has an empty stock_available section:
<stock_availables nodeType="stock_available" api="stock_availables" />
so I have no idea how to set the initial quantity for that product. If I set it manually from the back office, the stock_available section is filled.
Maybe there is something I'm missing in the XML request? Here it is:
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<product>
<id/>
<id_manufacturer/>
<id_supplier/>
<id_category_default>52</id_category_default>
<new/>
<cache_default_attribute/>
<id_default_image/>
<id_default_combination/>
<id_tax_rules_group/>
<position_in_category/>
<type/>
<id_shop_default/>
<reference>A130</reference>
<supplier_reference/>
<location/>
<width/>
<height/>
<depth/>
<weight/>
<quantity_discount/>
<ean13/>
<upc/>
<cache_is_pack/>
<cache_has_attachments/>
<is_virtual/>
<on_sale/>
<online_only/>
<ecotax/>
<minimal_quantity/>
<price>1.30</price>
<wholesale_price/>
<unity/>
<unit_price_ratio/>
<additional_shipping_cost/>
<customizable/>
<text_fields/>
<uploadable_files/>
<active>1</active>
<redirect_type/>
<id_product_redirected/>
<available_for_order>1</available_for_order>
<available_date/>
<condition/>
<show_price>1</show_price>
<indexed>1</indexed>
<visibility/>
<advanced_stock_management/>
<date_add/>
<date_upd/>
<pack_stock_type/>
<meta_description>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</meta_description>
<meta_keywords>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</meta_keywords>
<meta_title>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</meta_title>
<link_rewrite>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</link_rewrite>
<name>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</name>
<description>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</description>
<description_short>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</description_short>
<available_now>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language>
</available_now>
<available_later>
<language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[available later]]></language>
</available_later>
<associations>
<categories>
<category>
<id/>
</category>
<category>
<id>52</id>
</category>
</categories>
<images>
<image>
<id/>
</image>
</images>
<combinations>
<combination>
<id/>
</combination>
</combinations>
<product_option_values>
<product_option_value>
<id/>
</product_option_value>
</product_option_values>
<product_features>
<product_feature>
<id/>
<id_feature_value/>
</product_feature>
</product_features>
<tags>
<tag>
<id/>
</tag>
</tags>
<stock_availables>
<stock_available>
<id/>
<id_product_attribute/>
</stock_available>
</stock_availables>
<accessories>
<product>
<id/>
</product>
</accessories>
<product_bundle>
<product>
<id/>
<quantity/>
</product>
</product_bundle>
</associations>
</product>
</prestashop>
Thank you for any help!
Iuri
The problem was probably a bug with that version of Prestashop. With the latest version (1.6.1.17) it works correctly.
I have a need to check some security HTTP header (called for example X-MyApp-Security) value before processing it after Mule http:listener. Header should be checked like basic auth header but more simply.
I found some Mule documentation about this but don't understand how to use it my simple flow:
<http:listener-config name="HTTP_Listener_Configuration" host="${httpServer.host}" port="${httpServer.port}" doc:name="HTTP Listener Configuration" />
<flow name="planadoWebhookFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP" allowedMethods="POST"/>
<set-payload value="Hello from security area!" doc:name="Set Payload"/>
</flow>
Please help me with header authentication in Mule 3.7.
You can use the "http:basic-security-filter" element, here you have an example:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp"
xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:mule-xml="http://www.mulesoft.org/schema/mule/xml"
xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey"
xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:ws="http://www.mulesoft.org/schema/mule/ws"
xmlns:smtps="http://www.mulesoft.org/schema/mule/smtps"
xmlns:email="http://www.mulesoft.org/schema/mule/email"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security"
xmlns:ss="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/smtps http://www.mulesoft.org/schema/mule/smtps/current/mule-smtps.xsd
http://www.mulesoft.org/schema/mule/email http://www.mulesoft.org/schema/mule/email/current/mule-email.xsd
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.1/mule-spring-security.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
">
<spring:beans>
<ss:authentication-manager alias="authenticationManager">
<ss:authentication-provider>
<ss:user-service id="userService">
<ss:user name="user" password="password" authorities="ROLE_ADMIN" />
<ss:user name="anon" password="anon" authorities="ROLE_ANON" />
</ss:user-service>
</ss:authentication-provider>
</ss:authentication-manager>
</spring:beans>
<mule-ss:security-manager>
<mule-ss:delegate-security-provider name="memory-provider" delegate-ref="authenticationManager" />
</mule-ss:security-manager>
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="9091" doc:name="HTTP Listener Configuration"/>
<flow name="testingFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/*" doc:name="HTTP"/>
<logger message="Before Authentication" level="INFO" doc:name="Log Failure"/>
<http:basic-security-filter realm="mule-realm"/>
<logger message="After Authentication" level="INFO" doc:name="Log Failure"/>
</flow>
</mule>
You can find more information in the next link:
https://docs.mulesoft.com/mule-user-guide/v/3.7/http-listener-connector#authentication
I would like to allow some of my SOAP header elements to be nillable. This is possible for body elements, but I am not sure if it is allowed from header elements.
In the sample message below, I would like to allow the MessageDateTime to be null.
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://mycompany.com/repositoryservice">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://mycompany.com/repositoryservice">
<element name="MessageDateTime" type="dateTime" />
<element name="SaveRequest">
<!-- complexType -->
</element>
</schema>
</types>
<message name="SaveRequest_Headers">
<part name="MessageDateTime" element="tns:MessageDateTime" />
</message>
<message name="SaveRequest">
<part name="parameters" element="tns:SaveRequest" />
</message>
<binding name="RepositoryServiceBinding" type="tns:IRepositoryService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="Save">
<soap:operation soapAction="http://mycompany.com/repositoryservice/Save" style="document" />
<input name="SaveRequest">
<soap:header message="tns:SaveRequest_Headers" part="MessageDateTime" use="literal" />
<soap:body use="literal" />
</input>
</operation>
</binding>
<!-- service, portType -->
</definitions>
It is allowed as long as the definition allows for it. In your case, all you have to do is add the nillable="true" to the element's definition. The result on .NET w/ WCF would look something like this:
[System.ServiceModel.MessageHeaderAttribute(Namespace="...")]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public System.Nullable<System.DateTime> MessageDateTime;
I have a content type defined in Elements.xml and I want to add an Event Receiver. My Elements.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Announcement (0x0104) -->
<ContentType ID="0x0104008a424de98660457481eb7d8ddb5161ee"
Name="News Posting"
Group="News"
Description="$Resources:NewsCTypeDescription"
Inherits="TRUE"
Version="1"
Sealed="TRUE"
>
<FieldRefs>
<FieldRef ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Name="NewsExcerpt"/>
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
<spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
<Receiver>
<Name>ItemAdded</Name>
<Type>ItemAdded</Type>
<Class>MyAssembly.NewsItemEventReceiver</Class>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<SequenceNumber>10000</SequenceNumber>
<Synchronization>Synchronous</Synchronization>
<Data />
<Filter />
</Receiver>
</spe:Receivers>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>
The weird thing is that the Event Receiver never executes. I've checked the Schema with SharePoint Manager 2010, and it seems that the XmlDocuments element is ignored completely?
Here's the content type SchemaXml according to SharePoint Manager:
<?xml version="1.0" encoding="utf-16"?>
<ContentType ID="0x0104008A424DE98660457481EB7D8DDB5161EE" Name="News Posting" Group="News" Description="A News Posting" Sealed="TRUE" Version="1">
<Folder TargetName="_cts/News Posting" />
<Fields>
<Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentType" Group="_Hidden" Type="Computed" DisplayName="Content Type" Sealed="TRUE" Sortable="FALSE" RenderXMLUsingPattern="TRUE" PITarget="MicrosoftWindowsSharePointServices" PIAttribute="ContentTypeID" Customization="">
<FieldRefs>
<FieldRef ID="{03e45e84-1992-4d42-9116-26f756012634}" Name="ContentTypeId" />
</FieldRefs>
<DisplayPattern>
<MapToContentType>
<Column Name="ContentTypeId" />
</MapToContentType>
</DisplayPattern>
</Field>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" Group="_Hidden" Type="Text" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" Customization="" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Name="Body" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Body" Group="_Hidden" Type="Note" RichText="TRUE" RichTextMode="FullHtml" IsolateStyles="TRUE" DisplayName="Body" Sortable="FALSE" NumLines="15" Customization="" />
<Field ID="{6a09e75b-8d17-4698-94a8-371eda1af1ac}" Name="Expires" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Expires" Group="_Hidden" Type="DateTime" DisplayName="Expires" Format="DateOnly" Customization="" />
<Field ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Group="News" Name="NewsExcerpt" DisplayName="Excerpt of the Article" Description="165 Characters maximum" MaxLength="165" Type="Text" Customization="" />
</Field>
</Fields>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>
I have tried adding a FormTemplates XmlDocument as well, just to see if that works, but even this is ignored (I've changed the ListForm to ListForm2, but the SchemaXml is unchanged.
I've deleted the entire Web Application and Content Database to make sure there was nothing stale/stuck, but the result is still the same.
Is XmlDocuments depreciated in SharePoint 2010? What are the alternatives?
You should add your event receiver as a feature, maybe even as a part of the same feature that installs the content type. We always do it this way and it works perfectly