Results 1 to 9 of 9

Thread: xml parsing error under soap

  1. #1
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default xml parsing error under soap

    I am getting this error. anyone know why?

    XML error parsing SOAP payload on line 1: Mismatched tag


    What should I tell them to activate? Appreciate your response. Thanks a bunch
    Last edited by sugarcare; 2006-10-24 at 06:35 PM.

  2. #2
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: xml parsing error under soap

    is the XSL and xml reader the problem?

  3. #3
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: xml parsing error under soap

    I am not sure what is causing this error. Sure I am missing some libs, but not sure which ones.

    Your help is appreciated.
    Last edited by sugarcare; 2006-10-24 at 06:35 PM.

  4. #4
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: xml parsing error under soap

    This is the print out of the output of $xml in the file nusoap.php. Is this a bug in the 4.5 ?

    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


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

    End tag 'SOAP-ENV:EnveloXML' does not match the start tag 'SOAP-ENV:Envelope'. Error processing resource 'http://localhost/

  5. #5
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: xml parsing error under soap

    Hello sugarcare,

    Try dumping out $HTTP_RAW_POST_DATA near the top of soap.php-- I've not sure we're seeing the whole picture. What application are you using to connect to Sugar's SOAP API as well? Can we see its code?
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  6. #6
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: xml parsing error under soap

    I am using a simple php file to login via the soapclient

    require_once('hostname.php');
    require_once('include/nusoap/nusoap.php'); //must also have the nusoap code on the ClientSide.

    $soapclient = new nusoapclient($myhost."soap.php"); //define the SOAP Client an
    $result = $soapclient->call('login',array('user_auth'=>array('user_name' =>$user_name,'password'=>md5($user_password), 'version'=>'.01'), 'application_name'=>'soaptest'));

    This logins into the CRM app.

    How do I dump the $HTTP_RAW_POST_DATA ?

    XML error parsing SOAP payload on line 1: Mismatched tagHTTP/1.1 200 OK Date: Wed, 25 Oct 2006 19:19:06 GMT Server: Apache/1.3.37 (Unix) X-Powered-By: PHP/5.1.6 Set-Cookie: PHPSESSID=lm4fbo5r82v1qev4nnjohu4t93; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache X-SOAP-Server: NuSOAP/0.7.2 (1.19) Content-Length: 795 Connection: close Content-Type: text/xml; charset=UTF-8 lm4fbo5r82v1qev4nnjohu4t930
    No ErrorNo Error
    Last edited by sugarcare; 2006-10-25 at 07:20 PM.

  7. #7
    chrisky is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Trondheim, Norway
    Posts
    293

    Cool Re: xml parsing error under soap

    Quote Originally Posted by sugarcare
    I am using a simple php file to login via the soapclient

    require_once('hostname.php');
    require_once('include/nusoap/nusoap.php'); //must also have the nusoap code on the ClientSide.

    $soapclient = new nusoapclient($myhost."soap.php"); //define the SOAP Client an
    $result = $soapclient->call('login',array('user_auth'=>array('user_name' =>$user_name,'password'=>md5($user_password), 'version'=>'.01'), 'application_name'=>'soaptest'));

    This logins into the CRM app.

    How do I dump the $HTTP_RAW_POST_DATA ?

    XML error parsing SOAP payload on line 1: Mismatched tagHTTP/1.1 200 OK Date: Wed, 25 Oct 2006 19:19:06 GMT Server: Apache/1.3.37 (Unix) X-Powered-By: PHP/5.1.6 Set-Cookie: PHPSESSID=lm4fbo5r82v1qev4nnjohu4t93; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache X-SOAP-Server: NuSOAP/0.7.2 (1.19) Content-Length: 795 Connection: close Content-Type: text/xml; charset=UTF-8 lm4fbo5r82v1qev4nnjohu4t930
    No ErrorNo Error
    hmmmm.....
    You might spend some time perusing some PHP tutorial and/or reference sites, especially including php.net.

    Rather than using printr, for various reasons I prefer storing dumps to a file, and am including the code (below) to accomplish such. You should be able to figure out where to place it, and be sure to place it after the definition of any [applicable] variables you're trying to dump.

    <?php
    $pathandfile="/tmp/del1.txt"
    $variablenametowrite=

    $fp=fopen($pathandfile,"w");//overwrite existing file
    fwrite($fp,$variablenametowrite); //write data
    fclose($fp);
    ?>

  8. #8
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: xml parsing error under soap

    chrisky makes a good point-- in this case, you'll need to log to a file, since you won't be able to see the dump over SOAP. However, since you're dumping an array, here's my update:

    In soap.php, after the "global $HTTP_RAW_POST_DATA;" line:
    PHP Code:
    $pathandfile="/tmp/del1.txt";

    $fp=fopen($pathandfile,"wb"); //overwrite existing file, binary safe
    fwrite($fp,var_export($HTTP_RAW_POST_DATATRUE)); //write data
    fclose($fp); 
    After you've added these lines, trigger the error again, then check /tmp/del1.txt for the contents of $HTTP_RAW_POST_DATA.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  9. #9
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: xml parsing error under soap

    This is the content of the file.

    '<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body><ns4342:login xmlns:ns4342="http://tempuri.org">
    <user_auth><user_name xsi:type="xsd:string">admin</user_name>
    <password xsi:type="xsd:string">77d198e0c7c1fb14983cf9e8ec02 f90c</password>
    <version xsi:type="xsd:string">.01</version></user_auth>
    <application_name xsi:type="xsd:string">soaptest</application_name></ns4342:login></SOAP-ENV:Body>
    </SOAP-ENV:Envelope>'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •