cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Web Request only returns a GUID, no XML string

I used the Web Request action in Nintex 2013 to get all lists from a web. I stored the result in a variable. The variable only contains a GUID, no XML string to work with.

Executing the request in the action works fine, returning a valid XML string.

Any idea, why the result of the web requests does not contain the XML string?

Labels: (2)
0 Kudos
Reply
4 Replies
Nintex Employee
Nintex Employee

Re: Web Request only returns a GUID, no XML string

Hi Christian,

can you provide an example of your URL and anything else we could use to try this out?

Vadim

0 Kudos
Reply
janeyres
Nintex Newbie

Re: Web Request only returns a GUID, no XML string

Hi Christian,

Are you using syntax something like this?

SOAP action = http://schemas.microsoft.com/sharepoint/soap/GetListCollection

This works for me, but let me know if you're still stuck?

Thanks

Jan

0 Kudos
Reply
Not applicable

Re: Web Request only returns a GUID, no XML string

Hi Vadim, hi Jan,

first of all thanks for your replies. Attached I send a bit more information about the issue.

I am using the 'Web Request' action in combination with  "Get", not "SOAP". I am using a simple REST call ('Website-URL/_api/web/lists') and save the result in a variable. The value of the variable is something like a GUID, not an XML string.

Because of this I clicked the green execute button. I then clicked the green execute button again. I get the correct result with status 200 and a XML string (just like a REST call via the browser).

But clicking the "Test connection" button I get the message  "Status: FORBIDDEN". The call failed. Any idea about the reason of this message? May be this is why the result value of the REST call is a GUID and not a XML string.

Regards, Christian

0 Kudos
Reply
Automation Master
Automation Master

Re: Web Request only returns a GUID, no XML string

I know that this is older than heck, but I recently ran into this same problem. 

I was able to resolve it using some terrible XSLT. 

In this case, my Web Request is just querying all the list items (Using standard REST request '/_api/lists/gettitleby('sharePointListTitle')/items?$select=ID), and returning the properties. 

Using standard REST request '/_api/lists/gettitleby('sharePointListTitle')/items?$select=ID

Transform the XML using a Query XML action, and copy the following XSLT code: 

XML Query with XSLT Transform

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*">
        <xsl:element name="{local-name()}">
            <xsl:apply-templates select="node()">
            </xsl:apply-templates>
        </xsl:element>
    </xsl:template>   
    <xsl:template match="text() | comment() | processing-instruction()">
        <xsl:copy>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

This should completely remove all of the attributes (completely) leaving only the main tags and values. 

Now you are free to use XPaths as normal! 

XML Query with XPath Selection

If you wanna see what your response XML actually is (after you've transformed it), you can do so by sending yourself an email with your response variable wrapped in the fn-XmlEncode() function. 

example: 

fn-XmlEncode(xmlBlob)

 

(because I'm terrible at XSLT - This thread got me almost there: Working with XML in Nintex Workflows (simplified) ) 

0 Kudos
Reply