آموزش های این وب سایت به صورت رایگان در دسترس است. اطلاعات بیشتر
بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]

چرا اتوماتیک به خروجی JSON تگ HTML اضافه می شود؟

akram  12 سال پیش  7 سال پیش
0 0

توی وب سرویس خروجی کاملا json هست اما وقتی از اندروید کال می شه یه هدر دیگه ایی بهش اضافه می شه . به شکل زیر.
اشکال از اینه؟

<? xml version="1.0" encoding="utf-8 "?>
< string xmlns="http://tempuri.org/>
 برای این سوال 2 پاسخ وجود دارد.
پاسخ به سوال 
uncocoder  12 سال پیش
0 0

بله اشکال از عباراتی است که به خروجی اضافه میشود. توجه داشته باشید که در آموزش های همین بخش، در خصوص کاراکترهایی که در خروجی html دیده نمی شوند اما وجود دارند، توضیح کامل ارائه شده و گفته شده که دیدن خروجی در View Page Source معتبر است و نه در Render شده توسط Browser. مطمئناً با مطالعه دقیقتر آموزش فعلی مشکل شما حل خواهد شد.
پاسخ به سوال 
h.k.m  7 سال پیش
0 0

در View Page Source درست نمایش داده میشود..ولی در logcat این نمایش داده میشود:

I: Webservice Data: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html><head>
    <meta type="copyright" content="Copyright (C) 1996-2016 The Squid Software Foundation and contributors">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>ERROR: The requested URL could not be retrieved</title>
    <style type="text/css"><!--
     /*
     * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
     *
     * Squid software is distributed under GPLv2+ license and includes
     * contributions from numerous individuals and organizations.
     * Please see the COPYING and CONTRIBUTORS files for details.
     */
    
    /*
     Stylesheet for Squid Error pages
     Adapted from design by Free CSS Templates
     http://www.freecsstemplates.org
     Released for free under a Creative Commons Attribution 2.5 License
    */
    
    /* Page basics */
    * {
        font-family: verdana, sans-serif;
    }
    
    html body {
        margin: 0;
        padding: 0;
        background: #efefef;
        font-size: 12px;
        color: #1e1e1e;
    }
    
    /* Page displayed title area */
    #titles {
        margin-left: 15px;
        padding: 10px;
        padding-left: 100px;
        background: url('/squid-internal-static/icons/SN.png') no-repeat left;
    }
    
    /* initial title */
    #titles h1 {
        color: #000000;
    }
    #titles h2 {
        color: #000000;
    }
    
    /* special event: FTP success page titles */
    #titles ftpsuccess {
        background-color:#00ff00;
        width:100%;
    }
    
    /* Page displayed body content area */
    #content {
        padding: 10px;
        background: #ffffff;
    }
    
    /* General text */
    p {
    }
    
    /* error brief description */
    #error p {
    }
    
    /* some data which may have caused the problem */
    #data {
    }
    
    /* the error message received from the system or other software */
    #sysmsg {
    }
    
    pre {
        font-family:sans-serif;
    }
    
    /* special event: FTP / Gopher directory listing */
    #dirmsg {
        font-family: courier;
        color: black;
        font-size: 10pt;
    }
    #dirlisting {
        margin-left: 2%;
        margin-right: 2%;
    }
    #dirlisting tr.entry td.icon,td.filename,td.size,td.date {
        border-bottom: groove;
    }
    #dirlisting td.size {
        width: 50px;
        text-align: right;
        padding-right: 5px;
    }
    
    /* horizontal lines */
    hr {
        margin: 0;
    }
    
    /* page displayed footer area */
    #footer {
        font-size: 9px;
        padding-left: 10px;
    }
    
    
    body
    :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
    :lang(he) { direction: rtl; }
     --></style>
    </head><body id=ERR_ACCESS_DENIED>
    <div id="titles">
    <h1>ERROR</h1>
    <h2>The requested URL could not be retrieved</h2>
    </div>
    <hr>
    
    <div id="content">
    <p>The following error was encountered while trying to retrieve the URL: <a href="http://168.168.170.149/powrolserver/index.php?">http://168.168.170.149/powrolserver/index.php?</a></p>
    
    <blockquote id="error">
    <p><b>Access Denied.</b></p>
    </blockquote>
    
    <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>
    
    <p>Your cache administrator is <a href="mailto:root?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%20mirror.vtwo.org%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Sun,%2026%20Aug%202018%2013%3A30%3A40%20GMT%0D%0A%0D%0AClientIP%3A%2095.38.14.3%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fpowrolserver%2Findex.php%3Faction%3Dread%20HTTP%2F1.1%0AContent-Length%3A%2030%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0AConnection%3A%20Keep-Alive%0D%0AHost%3A%20168.168.170.149%0D%0A%0D%0A%0D%0A">root</a>.</p>
    <br>
    </div>
    
    <hr>
    <div id="footer">
    <p>Generated Sun, 26 Aug 2018 13:30:40 GMT by mirror.vtwo.org (squid/3.5.20)</p>
    <!-- ERR_ACCESS_DENIED -->
    </div>
    </body></html>

یعنی تو وب خروجی درست میگیرم ولی در logcat این متن رو دریافت میکنم


پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .