cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Post XML via HTTP dont work

Hello!

I seem to have a problem when I compose HTTP request with content that is in XML I get error:

 

 

 

 

<?xml version="1.0" encoding="utf-8" ?><nodes><status>-1</status><response></response><errormessage>Error 1872: The document has no document element. Line: -1;</errormessage></nodes>

 

 

 

Method is POST

Content is:

 

 

        <?xml version="1.0" encoding="UTF-8"?>
    <task>
       <!-- when udpating existing tasks: either externalId (task external id) or id (task id) property must be defined to select the task for update -->   
       <!-- task id is SeeMe system internal id and always auto generated when adding new tasks -->
       <!-- task external id can be set by third party when importing tasks (or left empty) -->      
      <externalId>xxxxxxx</externalId>
      <name>Väljasõidu akt- xxxxx Korter </name> <!-- Töö nimetus -->
      <timestamp>2020-05-20 14:42</timestamp> <!-- planeeritud kohalejõudmise aeg -->

      <type></type> <!-- töö tüüp-->
      <servicetime>15</servicetime> <!-- töö kestvus min -->

   <description>testing api task add and edit &#xA;  Nimi:  ['Nimi']} &#xA; Intsident: ['Intsident']} &#xA; Tüüp: ['Tüüp']} &#xA; Tsoon: ['Tsoon']}&#xA; Tsoonitekst: ['Tsoonitekst']}&#xA; Objektinr: ['Objektinr']}&#xA; Tänav: 'Tänav']} &#xA; Tänavanr: ['Tänavanr']}&#xA; Linn/vald: ['Linn/vald']}&#xA; Lepingunr: ['Lepingunr']}&#xA; Teenus: ['Teenus']}&#xA; ObjektiID: ['SiSite'] &#xA; </description> <!-- töö kirjeldus, vaba tekst, võib jätta tühjaks -->

      <driver></driver> <!-- Tööd teostava kasutaja kasutajanimi-->

      <customerId>xxxxx</customerId> <!-- Customer mooduli seose external id, kui on soovi seda kasutada-->

	<location>
	   <address>Tartu mnt 1, Tallinn</address> <!-- there is no point in sending location, if customer already has a location set -->
	</location>


      <forms>
        <form key="VSakt">
          <fields>
            <field key="Miratag">http://minu.xxx.xxx/#tasks_view?id=xxxxx</field>     
          </fields>
        </form>
      </forms>
</task>

 

 

 

 

 

With other system that we test with, it works, testing is done with:

 

 

 

 

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
  <label for="requestUrl">Request url: </label>
  <select id="requestUrl" name="requestUrl">
    <option value="https://app.ecofleet.com/seeme/Api/Tasks/addXml">https://app.ecofleet.com/seeme/Api/Tasks/addXml</option>
    <option value="https://app.ecofleet.com/seeme/Api/Tasks/updateAsXml">https://app.ecofleet.com/seeme/Api/Tasks/updateAsXml</option>
  </select>
  <p>
  <form id="requestData" name="requestData" method="POST" onsubmit="onSubmit()">
    key: <input type="text" value="" name="key"/>
    <p>
    API version: <input type="text" name="version" value="2"/>
    <p>
      XML:
    <p>
    <textarea rows="40" name="xml" style="width: 100%;">
    </textarea>
    <p>
    <input type="submit" value="Submit" />
  </form>
  <script type="text/javascript">
    function onSubmit() {
      document.requestData.action = document.getElementById('requestUrl').value;
      document.requestData.submit();
    }
  </script>
</body>

 

 

 

 

 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Post XML via HTTP dont work

Hi @arttiast,

 

Currently, Flow only support parse XML by using Xpath() function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#x...

If you want Post XML via the HTTP action of Flow, this feature is not supported yet.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Post XML via HTTP dont work

Hi @arttiast,

 

Currently, Flow only support parse XML by using Xpath() function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#x...

If you want Post XML via the HTTP action of Flow, this feature is not supported yet.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,642)