1. Your code apparently does not check for errors. From the debug, when
you make your SOAP call, the SOAP response is HTML, not XML, which
implies a bad error. Your code after a call should have error checking
logic like the samples:
$result = $client->call('ManufacturerSearchRequest', $params,
'http://soap.amazon.com', 'http://soap.amazon.com');
if ($client->fault) {
echo '<h2>Fault (This is expected)</h2><pre>'; print_r($result); echo
'</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
In other words, always check $client->fault and $client->getError before
assuming that $result is the actual SOAP response.
2. In your case, since the response from the service is HTML, you would
do well to view that response to see what the problem is, such as
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response,
ENT_QUOTES) . '</pre>';
Scott Nichol
----- Original Message -----
From: "Gerhard Hetzel" <hetzel@xxxxxxxxx>
To: <snichol@xxxxxxxxxxxx>
Sent: Saturday, May 05, 2007 12:00 PM
Subject: nusoap problem - gerhard hetzel
Dear Mr Scott Nichol,
having read in many forums that a lot of the great developing work of
"nusoap"
comes from Your engagement in the project,
I would like to ask if You could give me any hint to find a failure in
the
connection with nusoap between my sugarcrm and oscommerce
datatransport...
nusoap stops suddenly... no ideas why...
nusoapclient: got response, length: 547 type: text/html 2007-05-03
15:10:48.981896 nusoapclient: Entering parseResponse() for data of
length
547 and type text/html 2007-05-03 15:10:48.981933 nusoapclient: Error:
Response not of type text/xml
Fatal error: Call to a member function on a non-object
Would be glad if You have any hint to delete my last errors...
- best regards from europe ( germany )
gerhard hetzel
-----------
sugarCRM 3.5.1 e
oscommerce 2.2
---------------------------------
1. up to now I have a small problem: when I choose: SugarCRM Admin
Panel
>OS Commerce Configuration Mit der rechten Maustaste hier klicken, um
Bilder downzuloaden. Um Ihre Privatsphäre besser zu schützen, hat
Outlook
den automatischen Download dieses Bilds vom Internet verhindert.
Mit der rechten Maustaste hier klicken, um Bilder downzuloaden. Um Ihre
Privatsphäre besser zu schützen, hat Outlook den automatischen Download
dieses Bilds vom Internet verhindert.
<http://www.vip.naturstein-erlebnis.de/include/images/blank.gif> >
Syncronise all Data >> OSCommerce as Source of Sync - everything is
running
fine until
zug/modules/OsCommerceCustomers/SyncWithOsCommerce.php on line 37...
Error.....
2007-05-03 15:06:39.843887 nusoapclient: call: login, Array,
http://tempuri.org, , , rpc, encoded; endpointType: soap 2007-05-03
15:06:39.844047 nusoapclient: serializing param array for operation
login
2007-05-03 15:06:39.844080 nusoapclient: in serialize_val: xxx,
username, ,
, , , encoded 2007-05-03 15:06:39.844139 nusoapclient: in serialize_val:
xxx, password, , , , , encoded 2007-05-03 15:06:39.844179 nusoapclient:
wrapping RPC request with encoded method element 2007-05-03
15:06:39.844233
nusoapclient: endpoint:
http://www.shop.naturstein-erlebnis.de/admin/soap.php, soapAction: ,
namespace: http://tempuri.org, style: rpc, use: encoded 2007-05-03
15:06:39.844260 nusoapclient: SOAP message length: 599 contents:
57TP39S9612FV87 2007-05-03 15:06:39.844302 nusoapclient: transporting
via
HTTP 2007-05-03 15:06:39.844487 nusoapclient: sending message, length:
599
2007-05-03 15:06:39.844377 soap_transport_http: scheme = http 2007-05-03
15:06:39.844405 soap_transport_http: host =
www.shop.naturstein-erlebnis.de
2007-05-03 15:06:39.844426 soap_transport_http: path = /admin/soap.php
2007-05-03 15:06:39.844525 soap_transport_http: entered send() with data
of
length: 599 2007-05-03 15:06:39.844927 soap_transport_http: connect
connection_timeout 0, response_timeout 30, scheme http, host
www.shop.naturstein-erlebnis.de, port 80 2007-05-03 15:06:39.844957
soap_transport_http: calling fsockopen with host
www.shop.naturstein-erlebnis.de 2007-05-03 15:06:39.847394
soap_transport_http: socket connected 2007-05-03 15:06:39.847441
soap_transport_http: HTTP request: POST /admin/soap.php HTTP/1.0
2007-05-03
15:06:39.847466 soap_transport_http: HTTP header: Host:
www.shop.naturstein-erlebnis.de 2007-05-03 15:06:39.847491
soap_transport_http: HTTP header: User-Agent: NuSOAP/0.6.9 (1.9)
2007-05-03
15:06:39.847515 soap_transport_http: HTTP header: Content-Type:
text/xml;
charset=ISO-8859-1 2007-05-03 15:06:39.847539 soap_transport_http: HTTP
header: SOAPAction: "" 2007-05-03 15:06:39.847562 soap_transport_http:
HTTP
header: Content-Length: 599 2007-05-03 15:06:39.847618
soap_transport_http:
wrote data to socket, length = 784 2007-05-03 15:06:39.878218
soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2007-05-03
15:06:39.878297 soap_transport_http: read line of 37 bytes: Date: Thu,
03
May 2007 13:06:39 GMT 2007-05-03 15:06:39.878332 soap_transport_http:
read
line of 89 bytes: Server: Apache/1.3 (Unix) mod_ssl/2.8.28
OpenSSL/0.9.8d
AuthPG/1.3 FrontPage/5.0.2.2635 2007-05-03 15:06:39.878360
soap_transport_http: read line of 25 bytes: X-Powered-By: PHP/4.4.1
2007-05-03 15:06:39.878387 soap_transport_http: read line of 19 bytes:
Connection: close 2007-05-03 15:06:39.878415 soap_transport_http: read
line
of 25 bytes: Content-Type: text/html 2007-05-03 15:06:39.878442
soap_transport_http: read line of 2 bytes: 2007-05-03 15:06:39.878508
soap_transport_http: found end of headers after length 214 2007-05-03
15:06:39.878576 soap_transport_http: want to read content to EOF
2007-05-03
15:06:39.896442 soap_transport_http: read buffer of 547 bytes 2007-05-03
15:06:39.900218 soap_transport_http: read buffer of 0 bytes 2007-05-03
15:06:39.900276 soap_transport_http: read to EOF 2007-05-03
15:06:39.900299
soap_transport_http: read body of length 547 2007-05-03 15:06:39.900323
soap_transport_http: received a total of 761 bytes of data from server
2007-05-03 15:06:39.900394 soap_transport_http: closed socket 2007-05-03
15:06:39.900434 soap_transport_http: No Content-Encoding header
2007-05-03
15:06:39.900461 soap_transport_http: end of send() 2007-05-03
15:06:39.900513 nusoapclient: got response, length: 547 type: text/html
2007-05-03 15:06:39.900544 nusoapclient: Entering parseResponse() for
data
of length 547 and type text/html 2007-05-03 15:06:39.900581
nusoapclient:
Error: Response not of type text/xml
Fatal error: Call to a member function on a non-object in
/kunden/154948_73765/rp-hosting/4816/5816/zug/modules/OsCommerceCustomers/Sy
ncWithOsCommerce.php on line 37
2. Syncronise all Data >> SugarCrm as Source of Sync - everything is
running
fine until
zug/modules/OsCommerceCustomers/SyncWithOsCommerce.php on line 37 ...
Error....
2007-05-03 15:08:18.213528 nusoapclient: call: login, Array,
http://tempuri.org, , , rpc, encoded; endpointType: soap 2007-05-03
15:08:18.213700 nusoapclient: serializing param array for operation
login
2007-05-03 15:08:18.213734 nusoapclient: in serialize_val: 57TP39S,
username, , , , , encoded 2007-05-03 15:08:18.213793 nusoapclient: in
serialize_val: 9612FV87, password, , , , , encoded 2007-05-03
15:08:18.213834 nusoapclient: wrapping RPC request with encoded method
element 2007-05-03 15:08:18.213889 nusoapclient: endpoint:
http://www.shop.naturstein-erlebnis.de/admin/soap.php, soapAction: ,
namespace: http://tempuri.org, style: rpc, use: encoded 2007-05-03
15:08:18.213916 nusoapclient: SOAP message length: 599 contents:
57TP39S9612FV87 2007-05-03 15:08:18.213960 nusoapclient: transporting
via
HTTP 2007-05-03 15:08:18.214141 nusoapclient: sending message, length:
599
2007-05-03 15:08:18.214031 soap_transport_http: scheme = http 2007-05-03
15:08:18.214059 soap_transport_http: host =
www.shop.naturstein-erlebnis.de
2007-05-03 15:08:18.214080 soap_transport_http: path = /admin/soap.php
2007-05-03 15:08:18.214175 soap_transport_http: entered send() with data
of
length: 599 2007-05-03 15:08:18.214204 soap_transport_http: connect
connection_timeout 0, response_timeout 30, scheme http, host
www.shop.naturstein-erlebnis.de, port 80 2007-05-03 15:08:18.214228
soap_transport_http: calling fsockopen with host
www.shop.naturstein-erlebnis.de 2007-05-03 15:08:18.216553
soap_transport_http: socket connected 2007-05-03 15:08:18.216618
soap_transport_http: HTTP request: POST /admin/soap.php HTTP/1.0
2007-05-03
15:08:18.216644 soap_transport_http: HTTP header: Host:
www.shop.naturstein-erlebnis.de 2007-05-03 15:08:18.216671
soap_transport_http: HTTP header: User-Agent: NuSOAP/0.6.9 (1.9)
2007-05-03
15:08:18.216695 soap_transport_http: HTTP header: Content-Type:
text/xml;
charset=ISO-8859-1 2007-05-03 15:08:18.216718 soap_transport_http: HTTP
header: SOAPAction: "" 2007-05-03 15:08:18.216743 soap_transport_http:
HTTP
header: Content-Length: 599 2007-05-03 15:08:18.216797
soap_transport_http:
wrote data to socket, length = 784 2007-05-03 15:08:18.234236
soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2007-05-03
15:08:18.234303 soap_transport_http: read line of 37 bytes: Date: Thu,
03
May 2007 13:08:18 GMT 2007-05-03 15:08:18.234332 soap_transport_http:
read
line of 89 bytes: Server: Apache/1.3 (Unix) mod_ssl/2.8.28
OpenSSL/0.9.8d
AuthPG/1.3 FrontPage/5.0.2.2635 2007-05-03 15:08:18.234361
soap_transport_http: read line of 25 bytes: X-Powered-By: PHP/4.4.1
2007-05-03 15:08:18.234388 soap_transport_http: read line of 19 bytes:
Connection: close 2007-05-03 15:08:18.234415 soap_transport_http: read
line
of 25 bytes: Content-Type: text/html 2007-05-03 15:08:18.234443
soap_transport_http: read line of 2 bytes: 2007-05-03 15:08:18.234509
soap_transport_http: found end of headers after length 214 2007-05-03
15:08:18.234576 soap_transport_http: want to read content to EOF
2007-05-03
15:08:18.264469 soap_transport_http: read buffer of 547 bytes 2007-05-03
15:08:18.268170 soap_transport_http: read buffer of 0 bytes 2007-05-03
15:08:18.268228 soap_transport_http: read to EOF 2007-05-03
15:08:18.268251
soap_transport_http: read body of length 547 2007-05-03 15:08:18.268275
soap_transport_http: received a total of 761 bytes of data from server
2007-05-03 15:08:18.268351 soap_transport_http: closed socket 2007-05-03
15:08:18.268392 soap_transport_http: No Content-Encoding header
2007-05-03
15:08:18.268420 soap_transport_http: end of send() 2007-05-03
15:08:18.268474 nusoapclient: got response, length: 547 type: text/html
2007-05-03 15:08:18.268505 nusoapclient: Entering parseResponse() for
data
of length 547 and type text/html 2007-05-03 15:08:18.268545
nusoapclient:
Error: Response not of type text/xml
Fatal error: Call to a member function on a non-object in
/kunden/154948_73765/rp-hosting/4816/5816/zug/modules/OsCommerceCustomers/Sy
ncWithOsCommerce.php on line 37
-------------------
SyncWithOsCommerce.php on line 37
.......
$query_addon .= "WHERE customers.customers_id != '".implode("' AND
customers.customers_id != '",$do_not_get)."'";
}
37 $result_data =
$client->call('get_db_fields',array("table_name"=>"customers","fields"=>arra
y(),"query_addon"=>$query_addon));
if(isset($result_data['faultcode']))
{
error_log("ERROR: ".print_r($result_data,true));
return $result_data;
}
............................
3. Create os commerce customer within SugarCrm
2007-05-03 15:10:48.925627 nusoapclient: call: login, Array,
http://tempuri.org, , , rpc, encoded; endpointType: soap 2007-05-03
15:10:48.925775 nusoapclient: serializing param array for operation
login
2007-05-03 15:10:48.925815 nusoapclient: in serialize_val: xxxxxx,
username,
, , , , encoded 2007-05-03 15:10:48.925870 nusoapclient: in
serialize_val:
xxxxxx, password, , , , , encoded 2007-05-03 15:10:48.925909
nusoapclient:
wrapping RPC request with encoded method element 2007-05-03
15:10:48.925964
nusoapclient: endpoint:
http://www.shop.naturstein-erlebnis.de/admin/soap.php, soapAction: ,
namespace: http://tempuri.org, style: rpc, use: encoded 2007-05-03
15:10:48.925991 nusoapclient: SOAP message length: 599 contents:
57TP39S9612FV87 2007-05-03 15:10:48.926030 nusoapclient: transporting
via
HTTP 2007-05-03 15:10:48.926207 nusoapclient: sending message, length:
599
2007-05-03 15:10:48.926101 soap_transport_http: scheme = http 2007-05-03
15:10:48.926128 soap_transport_http: host =
www.shop.naturstein-erlebnis.de
2007-05-03 15:10:48.926149 soap_transport_http: path = /admin/soap.php
2007-05-03 15:10:48.926244 soap_transport_http: entered send() with data
of
length: 599 2007-05-03 15:10:48.926273 soap_transport_http: connect
connection_timeout 0, response_timeout 30, scheme http, host
www.shop.naturstein-erlebnis.de, port 80 2007-05-03 15:10:48.926297
soap_transport_http: calling fsockopen with host
www.shop.naturstein-erlebnis.de 2007-05-03 15:10:48.928680
soap_transport_http: socket connected 2007-05-03 15:10:48.928724
soap_transport_http: HTTP request: POST /admin/soap.php HTTP/1.0
2007-05-03
15:10:48.928751 soap_transport_http: HTTP header: Host:
www.shop.naturstein-erlebnis.de 2007-05-03 15:10:48.928776
soap_transport_http: HTTP header: User-Agent: NuSOAP/0.6.9 (1.9)
2007-05-03
15:10:48.928800 soap_transport_http: HTTP header: Content-Type:
text/xml;
charset=ISO-8859-1 2007-05-03 15:10:48.928825 soap_transport_http: HTTP
header: SOAPAction: "" 2007-05-03 15:10:48.928849 soap_transport_http:
HTTP
header: Content-Length: 599 2007-05-03 15:10:48.928902
soap_transport_http:
wrote data to socket, length = 784 2007-05-03 15:10:48.946137
soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2007-05-03
15:10:48.946206 soap_transport_http: read line of 37 bytes: Date: Thu,
03
May 2007 13:10:48 GMT 2007-05-03 15:10:48.946240 soap_transport_http:
read
line of 89 bytes: Server: Apache/1.3 (Unix) mod_ssl/2.8.28
OpenSSL/0.9.8d
AuthPG/1.3 FrontPage/5.0.2.2635 2007-05-03 15:10:48.946269
soap_transport_http: read line of 25 bytes: X-Powered-By: PHP/4.4.1
2007-05-03 15:10:48.946296 soap_transport_http: read line of 19 bytes:
Connection: close 2007-05-03 15:10:48.946324 soap_transport_http: read
line
of 25 bytes: Content-Type: text/html 2007-05-03 15:10:48.946351
soap_transport_http: read line of 2 bytes: 2007-05-03 15:10:48.946415
soap_transport_http: found end of headers after length 214 2007-05-03
15:10:48.946482 soap_transport_http: want to read content to EOF
2007-05-03
15:10:48.981579 soap_transport_http: read buffer of 547 bytes 2007-05-03
15:10:48.981653 soap_transport_http: read to EOF 2007-05-03
15:10:48.981677
soap_transport_http: read body of length 547 2007-05-03 15:10:48.981700
soap_transport_http: received a total of 761 bytes of data from server
2007-05-03 15:10:48.981748 soap_transport_http: closed socket 2007-05-03
15:10:48.981786 soap_transport_http: No Content-Encoding header
2007-05-03
15:10:48.981813 soap_transport_http: end of send() 2007-05-03
15:10:48.981865 nusoapclient: got response, length: 547 type: text/html
2007-05-03 15:10:48.981896 nusoapclient: Entering parseResponse() for
data
of length 547 and type text/html 2007-05-03 15:10:48.981933
nusoapclient:
Error: Response not of type text/xml
Fatal error: Call to a member function on a non-object in
/kunden/154948_73765/rp-hosting/4816/5816/zug/modules/OsCommerceCustomers/Sy
ncWithOsCommerce.php on line 188
...................
SyncWithOsCommerce.php
188 $customers_id =
$client->call('set_db_fields',array("table_name"=>"customers","name_value_li
st"=>$customer_name_value_list));
if(is_array($customers_id))
{
error_log("ERROR: ".print_r($customers_id,true));
return $customers_id;
}
............................................................................
4. WIthin OSCOMMERCE make a new user :
no errors, but no new database entries in SugarCrm....
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
|