Announcement

Collapse
No announcement yet.

MvCALL - port 80: Connection failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MvCALL - port 80: Connection failed

    <MvASSIGN NAME="l.baseurl" VALUE="http://query.yahooapis.com/v1/public/yql?">
    <MvASSIGN NAME="l.Topurl" VALUE="{'q=select * from yahoo.finance.quotes where symbol in ("AAPL")
    &env=store://datatables.org/alltableswithkeys'}">
    <MvASSIGN NAME="l.crlf" VALUE="{ asciichar(13)$asciichar(10) }">



    <MvAssign Name="l.url" Value="{ l.baseurl $ l.topurl $ l.crlf }">
    <MvEVAL EXPR="{ l.url }">
    <P>..</P>

    <MvCALL ACTION = "{ l.url }" METHOD = "XML">

    <MvCOMMENT> Capture post response --PM:BWG:</MvCOMMENT>
    <MvASSIGN NAME="l.response" VALUE = "{ callvalue }">
    </MvCALL>

    <MvEVAL EXPR= "{ l.response }">


    -------------

    http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes
    where symbol in ("AAPL")&env=store://datatables.org/alltableswithkeys

    ..
    Runtime error in /nanny/xml.mvc @ [00000000:0000010e]: xml.txt: Line
    17: MvCALL: Unable to open URL
    'http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes
    where symbol in ("AAPL")&env=store://datatables.org/alltableswithkeys ':
    Error connecting to query.yahooapis.com on port 80: Connection failed

    any idea why?

    #2
    Re: MvCALL - port 80: Connection failed

    ah, your URL is messed up. You can't use thinks like "where symbol in ("AAPL")" in a url. What's the actual URL you need to call?

    Also, you need to use <mvassign name="l.response" value="{ l.response & callvaule }">
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: MvCALL - port 80: Connection failed

      Thanks Bruce,

      I have changed URL and tried it. I am using Miva mia on my desktop. Is it a mia related issue?


      <MvASSIGN NAME ="l.url" VALUE="http://query.yahooapis.com/v1/public...symbol%20in%20
      (%22AAPL%22)&env=store://datatables.org/alltableswithkeys">


      <P>..</P>

      <MvCALL ACTION = "{ l.url }" METHOD = "XML">
      <MvASSIGN NAME="l.response" VALUE = "{ l.response $ callvaule }">
      </MvCALL>

      <MvEVAL EXPR= "{ l.response }">


      -----------------
      Response I get is

      ..
      Runtime error in /nanny/xml.mvc @ [00000000:0000006e]: xml.txt: Line
      11: MvCALL: Unable to open URL
      'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20w here%20symbol%20in%20(%22AAPL%22)&env=store://datatables.org/alltableswithkeys':
      Error connecting to query.yahooapis.com on port 80: Connection failed

      Please help

      Comment


        #4
        Re: MvCALL - port 80: Connection failed

        I can't speak to the correctness of of your query to yahooapis.com, however I can point out issues with your encoding of the url and the response. Normally I would use encodeattribute() on each seperate part of the query string.

        The way you have the mvcall loop, you would only see the last part of the returned data so you need to either output it with an MvEval or concatinate it as show below.

        Also you don't need the crlf on the end of the url.

        Code:
        <MvASSIGN NAME="l.baseurl" VALUE="http://query.yahooapis.com/v1/public/yql?">
        <MvASSIGN NAME="l.query" VALUE="{ 
            'q=' $ encodeattribute( 'select * from yahoo.finance.quotes where symbol in (\"AAPL\")' ) $ 
            '&env=' $ encodeattribute( 'store://datatables.org/alltableswithkeys' ) 
        }">
        
        
        <MvCALL ACTION = "{ l.baseurl $ l.query }" METHOD = "XML">
            <MvASSIGN NAME="l.response" VALUE = "{ l.response $ s.callvalue }">
        </MvCALL>
        Last edited by RayYates; 02-05-15, 09:35 AM.
        Ray Yates
        "If I have seen further, it is by standing on the shoulders of giants."
        --- Sir Isaac Newton

        Comment


          #5
          Re: MvCALL - port 80: Connection failed

          Hello,

          Thank you guys for your suggestions and reply.

          I have tried CRLF as a one of the suggestion from BB. I have tried encoded url, without CRLF. However ended up with same result.

          I think the problem is with miva mia. I have tried this with Miva mia 5.20 and 5.21 on windows vista running 32bit.

          I can not get s.callerid, it returns nothing. I have run diagtool on it and it displays as the followings. I have tried diagtool from the other host on my system, I have checked my cookies are enabled.

          MvCall and some other aspect of the functionality may not be working correctly either in miva mia or may be my desktop not configured correctly.


          Please suggest something to get it working. thank you.

          s.dyn_time_remaining: 90
          s.miva_language: en-US
          s.miva_defaultlanguage: en-US
          s.miva_defaultdatabase: xbase3
          s.miva_charset: utf-8
          s.process_id: 5872
          s.arg2: Diagnostics=1&Diagnostic_Test=svars
          s.nargs: 2
          s.apitype: Mia

          Comment


            #6
            Re: MvCALL - port 80: Connection failed

            I compiled and ran the following script in Miva Mia without problems or errors. If it does not run on your system then something else is wrong.

            Note I changed XML to GET.

            Code:
            <MIVA STANDARDOUTPUTLEVEL="">
            
            <MvASSIGN NAME="l.baseurl" VALUE="http://query.yahooapis.com/v1/public/yql?">
            <MvASSIGN NAME="l.query" VALUE="{
                'q=' $ encodeattribute( 'select * from yahoo.finance.quotes where symbol in (\"AAPL\")' ) $
                '&env=' $ encodeattribute( 'store://datatables.org/alltableswithkeys' )
            }">
            
            <MvCALL ACTION = "{ l.baseurl $ l.query }" METHOD = "GET">
                <MvASSIGN NAME="l.result" VALUE="{ l.result $ s.callvalue }">
            </MvCALL>
            
            <MvASSIGN NAME="l.void" VALUE="{ miva_output_header('Content-type', 'text/xml') }">
            <MvEVAL EXPR="{ l.result }">
            Last edited by RayYates; 02-06-15, 10:36 AM.
            Ray Yates
            "If I have seen further, it is by standing on the shoulders of giants."
            --- Sir Isaac Newton

            Comment


              #7
              Re: MvCALL - port 80: Connection failed

              Thanks for your help.

              I think it is my desktop setup. I have tried to put my intranet security to LOW, - still no joy.

              I have manage to solve my cookie, s.callerid issue by launching miva mia as admin user and setting up the option for cookie.

              I have compiled your revised code that has generated the folowing message.

              Error connecting to query.yahooapis.com on port 80: Connection failed.


              Originally posted by RayYates View Post
              I compiled and ran the following script in Miva Mia without problems or errors. If it does not run on your system then something else is wrong.

              Note I changed XML to GET.

              Code:
              <MIVA STANDARDOUTPUTLEVEL="">
              
              <MvASSIGN NAME="l.baseurl" VALUE="http://query.yahooapis.com/v1/public/yql?">
              <MvASSIGN NAME="l.query" VALUE="{
                  'q=' $ encodeattribute( 'select * from yahoo.finance.quotes where symbol in (\"AAPL\")' ) $
                  '&env=' $ encodeattribute( 'store://datatables.org/alltableswithkeys' )
              }">
              
              <MvCALL ACTION = "{ l.baseurl $ l.query }" METHOD = "GET">
                  <MvASSIGN NAME="l.result" VALUE="{ l.result $ s.callvalue }">
              </MvCALL>
              
              <MvASSIGN NAME="l.void" VALUE="{ miva_output_header('Content-type', 'text/xml') }">
              <MvEVAL EXPR="{ l.result }">

              Comment

              Working...
              X