Importing data from a REST Web Service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2013 04:05 PM
I'm currently working on pulling our asset data out of MobileIron (mobile device management) and into ServiceNow. MobileIron does have an API, but the xml returned when you make a standard request (w/no headers) is garbage that ServiceNow can't read. It appears to use "{" where "<" should go....
Error Returned: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
You can submit an html request with a header of "Accept=application/xml" to get a nice clean xml file from MobileIron, which is what I have done through an outbound REST message to the MobileIron API.
If I could add a header into a data source (just like in the outbound RESET messages), my problem would be solved. Since I can't, I'm working on programmatically getting the data imported into our CMDB. I have good, solid code that gets the data I need and puts it into a table, but I'd still like to leverage System Import Sets to stage the data and then get it into the table it needs to be in.
Now the problem is, you have to have a data source to utilize a Scheduled Import Sets. Well, I don't have a valid data source for the Scheduled Import Set. I tried throwing my script into the "pre-script", but it ran and ran and ran and I ended up with WAY too many records in my CMDB.
There has to be a better way to do this. Is there something I'm missing?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2014 12:47 PM
Can I ask where you found the MobileIron API? I am searching for it and can not see to find it.
Thanks