Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eduardo 106 posts 130 karma points
    Oct 20, 2010 @ 13:58
    Eduardo
    0

    Calling a WebService

    Hi,

    I have a Web service that returns values separated by ';' (Example: 120;100;90)

    I want to list the nodes which id attribute is equal to each of the numbers the service returns.

    Example:

    Service returns: 120;100;90

    I want to show: the document with id 120, 100 and 90 respectively.

    Thanks beforehand.

    Sincere regards,
    Eduardo

  • Harm-Jan Abbing 62 posts 102 karma points
    Oct 20, 2010 @ 14:06
    Harm-Jan Abbing
    0
    <xsl:variable name="splitNodes" select="umbraco.library:Split($serviceValue,';')" />

    <xsl:for-each select="$splitNodes//value">
    <xsl:value-of select="umbraco.library:GetXmlNodeById(.)/nodeName" />
    </xsl:for-each>

    Something like that?

  • Eduardo 106 posts 130 karma points
    Oct 20, 2010 @ 14:10
    Eduardo
    0

    Hi Harm-Jan,

    Thanks for your reply.

    My problem is I don't know how to call the asmx web service to retrieve the values. Maybe using c# within the xslt?

    Any idea?

    Regards,
    Eduardo Macho

  • Harm-Jan Abbing 62 posts 102 karma points
    Oct 20, 2010 @ 14:18
    Harm-Jan Abbing
    0

    You could try:

    <xsl:variable name="serviceValue" select="umbraco.library:GetXmlDocumentByUrl('http://www.mydomain.com/service.asmx/dosomething')"/>
  • Eduardo 106 posts 130 karma points
    Oct 20, 2010 @ 14:23
    Eduardo
    0

    Harm-Jan,

    Thank you for your answer.

    Your solution fitted my needs.

    Regards,
    Eduardo Macho

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies