SubmitToSharePointList error - InfoPath Dev
in

InfoPath Dev

SubmitToSharePointList error

Last post 07-08-2010 12:56 PM by aruna akella. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-08-2010 08:10 AM

    SubmitToSharePointList error

    I have a form with qRules that is successfully updating a list on site1 (dev)

    I made a copy of the form and changed the data connections to point a similar list on site2 (prod)

    I reconstructed my "mapping.xml" file called QPITASKS_mapping.xml and updated the "mapping" data connection

    I assumed that the "/mapping=" entry should be set to the name of the data connection and therefore I should not have to change it.
     (the documentation says "Mapping Adapter Name", not sure what that is?)

    Below are my Submit Command, the original mapping.xml and the new QPITASKS_mapping.xml and the error message I am trapping.

     Ideas? 

     

    Submit Command

    SubmitToSharePointList /submit=SPListSubmit /mapping=mapping /id=my:ID

    Original XML

     <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T15:29:00" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">
      <my:Mappings>
        <my:IsRepeating>true</my:IsRepeating>
        <my:RepeatingGroup>my:Tasks/my:TaskGroup/my:Task</my:RepeatingGroup>
        <my:Mapping>
          <my:FormField>my:Status</my:FormField>
          <my:SharePointColumn>Status</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField>my:Modified_x0020_Comment</my:FormField>
          <my:SharePointColumn>Modified_x0020_Comment</my:SharePointColumn>
        </my:Mapping>
      </my:Mappings>
      <my:SharePointListURL>http://<servername>:1105/EventDemo</my:SharePointListURL>
      <my:ListCollection>{50C2C9B9-AA58-4DBB-96EE-3FEF256222BE}</my:ListCollection>
      <my:FullListURL>http://hscsbidev2:1105/EventDemo/Lists/Lists</my:FullListURL>
      <Batch OnError="Continue">
        <Method ID="New" Cmd="New">
          <Field Name="Status">
          </Field>
          <Field Name="Modified_x0020_Comment">
          </Field>
        </Method>
      </Batch>
    </my:myFields>

    New XML 

    <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T15:29:00" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">
      <my:Mappings>
        <my:IsRepeating>true</my:IsRepeating>
        <my:RepeatingGroup>my:Tasks/my:TaskGroup/my:Task</my:RepeatingGroup>
        <my:Mapping>
          <my:FormField>my:Status</my:FormField>
          <my:SharePointColumn>Status</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField>my:Modified_x0020_Comment</my:FormField>
          <my:SharePointColumn>Modified_x0020_Comment</my:SharePointColumn>
        </my:Mapping>
      </my:Mappings>
      <my:SharePointListURL>http://<servername>:38790/sites/Quality</my:SharePointListURL>
      <my:ListCollection>{25E7EAE6-2F2F-44FC-8C2B-40AB80DFE020}</my:ListCollection>
      <my:FullListURL>http://hscsbidev2:38790/sites/Quality/Lists/Quality</my:FullListURL>
      <Batch OnError="Continue">
        <Method ID="New" Cmd="New">
          <Field Name="Status">
          </Field>
          <Field Name="Modified_x0020_Comment">
          </Field>
        </Method>
      </Batch>

    Submit Error

    An unexpected error occurred executing the rule. Action: SubmitToSharePointList Arguments: submit: SPListSubmit mapping: mapping id: my:ID Details: Root element is missing. Stack: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList(String submitDs, String mappingDs, String id) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList() at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

  • 07-08-2010 11:43 AM In reply to

    Re: SubmitToSharePointList error

    Hi Marzipan,

    Your SubmitToSharePointList command looks correct to me (I assume the mapping data connection in the second form is called 'mapping', right?)

    Have you updated the parameters(tns:listName, and tns:updates) in the 'UpdateListItems' method to point to the new mapping file in your second form?

    Mapping Adapter Name is nothing but your mapping data connection name.

     

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 07-08-2010 12:32 PM In reply to

    Re: SubmitToSharePointList error

    Yes my "mapping" stayed the same.

     I ended up deleting and recreating both the mapping and the submit connections and was able to get it to work. Thanks.

  • 07-08-2010 12:56 PM In reply to

    Re: SubmitToSharePointList error

    I'm glad you got it working. :)

    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.