I query a custom Web Service in Nintex Workflow 2013 and get the following XML.
Somehow, I can't parse it using the Query XML Action. As a result, I get the orignal XML data back.
Can anybody help me out?
<GetPersonIdListResult xmlns:a="http://schemas.datacontract.org/2004/07/xyz" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:SqlCommand>SELECT DISTINCT P.PERSONID FROM PERSON P INNER JOIN PERSONORG PO ON PO.PERSONID=P.PERSONID INNER JOIN ORGEINHEIT O ON O.ORGEINHEITID=PO.ORGEINHEITID INNER JOIN KOSTENSTELLE K ON K.KOSTENSTELLE_PKEY=O.KOSTENSTELLE_FKEY WHERE K.KREIS LIKE '501' AND P.MODIFYDATE>=TO_DATE('2015.08.12 00:00:00', 'yyyy/mm/dd hh24:mi:ss') AND P.MODIFYDATE<TO_DATE('2016.08.10 00:00:00', 'yyyy/mm/dd hh24:mi:ss') ORDER BY 1</a:SqlCommand>
Solved! Go to Solution.
first of all I have to say that the "Run Now" doesn't always work as expected. Especially if your XPath isn't valid, the result will often show useless stuff (just my experience) e. g. the whole XML.
It seems like you have used the XPath builder for your XPath query. I tested this myself and could reproduce your problem. I also used another XPath generator with no success.
Additionally I created a little (dirty) XPath that should do the trick:
This works fine if you test it on this site: Free Online XPath Tester / Evaluator
but it doesn't work on the XML Query action in Nintex and I have no idea why. The XML Query action DOES work in general, I have used it many times. But it seems like some of the XML returned by the web services is just too messy even for the .NET framework itself.
I would really love to hear some Nintex dev or maybe a user who had some time to deep dive into this topic to tell us about the magic that is happening there.
Sorry I can't help you at the moment.
folowing XPath expression should work
you have had doubled namespace specifications for Ids and int
no, just use xpath I posted.
I copy-pasted your source XML as you posted it in original question with no change.
I've meant following namespace specification doubled in your xpath:
do you test in run now or do you run whole workflow?
do you get any error?
how did you get the XML you posted in the question?
is it really the input of query XML action? I mean if you got it from run now in call webservice action or from some 3rd party tools it need not exactly be what inputs into query XML
I guess you supply a variable to the query XML action that holds the XML to be parsed.
try to send it to yourself by mail action (as plain text!) and compare it to before posted XML.
you may want as well to attach that output to this thread as text file to avoid some HTML formatting issues