Copied to clipboard

Flag this post as spam?

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


  • Jacob Jensen 29 posts 49 karma points
    Feb 11, 2010 @ 13:47
    Jacob Jensen
    0

    Problem using GetXmlDocumentByUrl with google CSE

    Hi.

    Locally i have no problem requesting google CSE:

    http://jj.kraftvaerkaarhus.dk/soeg.aspx?q=test&sa.x=18&sa.y=2&umbdebugshowtrace=true

    But on our live site i get an error, files are 100% identical on remote and local server.

    http://www.aarhusnetsport.dk/soeg.aspx?q=test&sa.x=18&sa.y=2&umbdebugshowtrace=true

    The error is:

    Error parsing XSLT System.Xml.Xsl.XslCompiledTransform
    An error occurred during a call to extension function 'GetXmlDocumentByUrl'. See InnerException for a complete description of the error.

    Iam using an simple xml proxy for transforming the xml:

    http://pastebin.com/m3f06b037

    An example of an search on "test"

    http://www.google.com/search?q=test&hl=da&start=0&num=100&output=xml_no_dtd&client=google-csbe&cx=013072118847133125193:cxgwdcr5i8i

    Does any one have any suggestions ? - Or how do i see the innerexception on the remote server - i cant debug it locally, when the service works fine.

    Thx in advance, please tell me if i need to send more information.

    /Jacob Jensen

     

  • Jacob Jensen 29 posts 49 karma points
    Feb 11, 2010 @ 13:47
    Jacob Jensen
    0

    uhmmm links works fine, but there are querystrings attached.

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 11, 2010 @ 13:53
    Morten Christensen
    0

    Has it been working on the live site before? Just to make sure its not a firewall, anti-virus or something that is blocking your request, which I guess is over port 80.

    - Morten

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 11, 2010 @ 14:01
    Morten Christensen
    1

    From the test example you added to your post I tried to run these two lines from within the developer section (visualize xlst):

    <xsl:variable name="q" select="test"/>
    <xsl:copy-of select="umbraco.library:GetXmlDocumentByUrl(concat('http://www.google.com/search?q=',$q,'&amp;hl=en&amp;start=0&amp;num=100&amp;output=xml_no_dtd&amp;client=google-csbe&amp;cx=013072118847133125193:cxgwdcr5i8i'))"/>

    and I got this result:

    <gsp ver="3.2"><tm>0.001425</tm><q><param
    name="q" value="" original_value=""><param name="hl" value="en"
    original_value="en"><param name="start" value="0"
    original_value="0"><param name="num" value="100"
    original_value="100"><param name="output" value="xml_no_dtd"
    original_value="xml_no_dtd"><param name="client"
    value="google-csbe" original_value="google-csbe"><param name="cx"
    value="013072118847133125193:cxgwdcr5i8i"
    original_value="013072118847133125193:cxgwdcr5i8i"></q></gsp>

    Maybe you can try and run it from umbraco on the live site to see what happens. If there is an error it will be displayed.

    - Morten

  • Jacob Jensen 29 posts 49 karma points
    Feb 11, 2010 @ 14:03
    Jacob Jensen
    0

    Thx, the server blocked the request, dunno why, but ill figure out !!!

    Best regards

    /J

  • Jacob Jensen 29 posts 49 karma points
    Feb 11, 2010 @ 14:04
  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 11, 2010 @ 22:56
    Morten Christensen
    0

    Looks good! Remember to mark your question as solved if you don't have any further questions ;)

    - Morten

Please Sign in or register to post replies

Write your reply to:

Draft