AnsweredAssumed Answered

SOAP "ERROR: 20-Module Does Not Exist" for 6.5.16 CE

Question asked by anespa anespa on Jun 26, 2014
Latest reply on Jul 23, 2014 by dfstrauss
Dear Friends,
I am using Sugar CE v 6.5.16. I  need to take data from outside world using SOAP . To test that i create a file but I cannot access the 2 custom modules in that file . When I run the code
I got "ERROR: 20-Module Does Not Exist " . I attach my Test file . This code works fine for
already existing module like "Accounts" . Please advise fast


<?php
    $username = "admin";
    $password = "sreekanth";
   
    $soapClient = new SoapClient("http://localhost/SugarCrm/service/v3_1/soap.php?wsdl");
    //print_r($soapClient);
    //exit("tyys");

try {
    $info = $soapClient->login(
        array(
            'user_name' => $username,
            'password'  => md5($password),
            )
        );
}
catch (SoapFault $fault) {
    die("Sorry, the service returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring.".");
}
 
 //Dummy values from jBilling
 $order_lines_values = array("Santoor","Soap","89","10","87","90","Test Description for future Reference.","13ae0ac1-2a6b-e674-b751-539abfc57439");
 $order_values = array("WER098","USD","2014-07-02","2014-08-01","3 Month","JB09","13ae0ac1-2a6b-e674-b751-539abfc57439");
 
$session = $info->id;
//echo "Successful Login! Session ID {$session}n";

// Create/Edit Order & Order Line
try {
   /* $info = $soapClient->set_entry(
        $session,
        'Ord_OrderManage',
        array(
            //To Edit an existing entry
            //array("name" => "id", "value" => "10523bce-c611-860a-97ee-539abf92066b"),
            array('name' => 'bill_type_id_c', 'value' => '.$order_values[0].'),
            array('name' => 'currency_c', 'value' => '.$order_values[1].'),
            array('name' => 'due_date_c', 'value' => '.$order_values[2].'),
            array('name' => 'next_billable_c', 'value' => '.$order_values[3].'),
            array('name' => 'period_c', 'value' => '.$order_values[4].'),
            array('name' => 'jbilling_order_id_c', 'value' => '.$order_values[5].'),
            array('name' => 'account_id_c', 'value' => '.$order_values[6].'),
            )
        ); */
       
       
       
        $info = $soapClient->set_entry(
        $session,
        'Order_Line',
        array(
            //To Edit an existing entry
            //array("name" => "id", "value" => "10523bce-c611-860a-97ee-539abf92066b"),
            array('name' => 'name', 'value' => '.$order_lines_values[0].'),
            array('name' => 'category_c', 'value' => '.$order_lines_values[1].'),
            array('name' => 'amount_c', 'value' => '.$order_lines_values[2].'),
            array('name' => 'quantity_c', 'value' => '.$order_lines_values[3].'),
            array('name' => 'sell_price_c', 'value' => '.$order_lines_values[4].'),
            array('name' => 'item_price_c', 'value' => '.$order_lines_values[5].'),
            array('name' => 'description', 'value' => '.$order_lines_values[6].'),
            array('name' => 'account_id_c', 'value' => '.$order_lines_values[7].'),
            )
        );
       
       
       
}
catch (SoapFault $fault) {
    //echo "ggggg";
    die("Sorry, the service returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring.".");
}
 
$accountId = $info->id;
echo "Created Account ID {$accountId}n";
exit();
?>

Thanks
Anes




Outcomes