Query XML doesn't work

  • 9 December 2015
  • 6 replies
  • 5 views

Badge +1

I've created a workflow, in which I first "call web service" and after that I tried too "Query XML".

 

The XML which i received form the web services is:

 

<AfasGetConnector>  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">   <xs:element name="AfasGetConnector">    <xs:complexType>     <xs:choice maxOccurs="unbounded">      <xs:element name="AFAS2SPIB">       <xs:complexType>        <xs:sequence>         <xs:element name="Naam" type="xs:string" minOccurs="0"/>         <xs:element name="Jaar" type="xs:long" minOccurs="0"/>         <xs:element name="Oracle_accountnr." type="xs:string" minOccurs="0"/>        </xs:sequence>       </xs:complexType>      </xs:element>     </xs:choice>    </xs:complexType>   </xs:element>  </xs:schema>  <AFAS2SPIB>   <Naam>Vermeulen, G.C.M.</Naam>   <Jaar>2016</Jaar>   <Oracle_accountnr.>36244</Oracle_accountnr.>  </AFAS2SPIB>  <AFAS2SPIB>   <Naam>Vedder, J.</Naam>   <Jaar>2015</Jaar>   <Oracle_accountnr.>29413</Oracle_accountnr.>  </AFAS2SPIB> </AfasGetConnector>

 

Now i would like to have a collection  of "Oracle_accountnr." Therefore i've configured the "Query XML"-function like this:

Query XML.jpg

If i check the "colOracleNumbers" i got exactly the same result as the  xml I've posted above.


6 replies

Badge +9

here it looks ok (Nintex Workflow 2013 Version: 3.1.4.0 - International)

Badge +1

Hi Manfred,

Thanks for your quick reply!

It's correct what you say about the list of oraclenumbers, i saw that too, but when I put the "colOracleNumbers" in an email (for example) i receive an email with the complete xml.instead of the "oraclenumbers only"...

Badge +4

Hi,

I made a test with your data and find below my result, I did'nt use text()

     1. 01.png

     2. 02.png

     3. 03.png

     4. 04.png

Before send the nofication you can make a loop on your collection and use the build string action for formatting your data.

Badge +9

If output formatting is necessary use XSL Transformation instead of XPATH in Query XML action.

Badge +1

Unfortunately nothing of the steps above work.. so hereby some more information

This is my workflow:

1.jpg

In the previous steps we're talking about the Query XML, but probably is the output from the webservice bad.

This is the configuration of the webservice:

2.jpg

And this is the result when i run it:

3.jpg

Within the red boxes i get the property "Naam", but instead of the "<" and ">" i find everywhere &lt; and &gt;.

Probably should this explain why i can't read my xml-properties.

Is there a way to resolve this?

Badge +4

You can use the inline function xmlDecode on this result before read your properties

Reply