Use WebRequest to write an XML file
Hello,
I'm a little new to the webrequest activity and to XML files in general. What I'm trying to do is a web request with provided uri to an xml feed. I'm using the GET method and then trying to use the Write to File activity to save the info as an xml file. The workflow works but isnt getting the xml. It's only pulling the HTML. Most of the posts on here involve using the POST method and json data types. I believe I need to add in the headers and parameters and possibly change the content type to xml in the web request activity but am a little lost on the syntax. Any help would be appreciated!
0
-
Is the XML coming from a public server that we can look at?
What's the HTML content? Sometimes the webserver generates HTML if some kind of error occurs, so there may be a clue in that file.
What happens if you open the same URL in a browser?0 -
here is a sample of the XML
<?xml version="1.0" encoding="UTF-8"?><_data473580_cheshire_catch_basin_inspection><record>
<ID>15</ID>
<PARENT_RECORD_ID>0</PARENT_RECORD_ID>
<PARENT_PAGE_ID>0</PARENT_PAGE_ID>
<PARENT_ELEMENT_ID>0</PARENT_ELEMENT_ID>
<CREATED_DATE>2018-04-12 13:37:00</CREATED_DATE>
<CREATED_BY>degraziat@ne-geo.com</CREATED_BY>
<CREATED_LOCATION>41.375750:-71.829843:-19.712431:48.000000:48.000000:0.000000:215.344376:1523554713600.000000</CREATED_LOCATION>
<CREATED_DEVICE_ID>353716886778243</CREATED_DEVICE_ID>
<MODIFIED_DATE>2018-04-12 13:37:01</MODIFIED_DATE>
<MODIFIED_BY>degraziat@ne-geo.com</MODIFIED_BY>
<MODIFIED_LOCATION>41.375750:-71.829843:-19.712431:48.000000:48.000000:0.000000:215.344376:1523554713600.000000</MODIFIED_LOCATION>
<MODIFIED_DEVICE_ID>353716886778243</MODIFIED_DEVICE_ID>
<SERVER_MODIFIED_DATE>2018-04-12 13:38:56</SERVER_MODIFIED_DATE>
<cb_id>CB-R739</cb_id>
<inspection_date_and_time />
<inspector />
<inspection_type>surface</inspection_type>
<current_temperature>33_50</current_temperature>
<last_rain_fall_hrs>_72</last_rain_fall_hrs>
<cleaned>Yes</cleaned>
<depth_to_sediment />
<depth_to_sump />
<depth_to_invert_out />
<flow>No</flow>
<oil_sheen>No</oil_sheen>
<unpermitted_discharge>No</unpermitted_discharge>
<illicit_discharge>No</illicit_discharge>
<follow_up_required>Yes</follow_up_required>
<repairs_required>Yes</repairs_required>
<new_top_needed>Yes</new_top_needed>
<pointing_required>No</pointing_required>
<rebuild_required>No</rebuild_required>
<photo>https://1b679d435a9c0cb855a4-5e783ede762bf508243fd6d1ba1484df.ssl.cf2.rackcdn.com/iformbuilder.com/473580/_data473580_cheshire_catch_basin_inspection/field_735021305acf99b06c654.jpg</photo>
<my_element_21>{"objectId":"5"}</my_element_21>
<notes />
<street>CROSS COUNTRY</street>
<my_element_25>ggggg</my_element_25>
</record>0 -
It seems like you need to login in your workflow. I can't tell how to do that, it would depend on how that's implemented on the server. Usually it's either Single Sign On, or you need to get a token first, and send that with the actual XML request. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare