-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding Issue in get_all_user_info #9
Comments
3 questions : 1) Your data have special characters like Chinese, Arabic or something like that?. 2) did you use the parameter "encoding" when you get a TAD-PHP instance?. 3) can you send me the sample code you used? |
|
My friend, it seems the XML response received from your device is invalid in someway. To be sure please copy, paste and run, as an alone script, the following PHP code and send to me the response generated: <?php
$your_ip = 'xxx.xxx.xx.xx'; // Set here your device's ip
$options = array(
'location' => 'http://' . $your_ip . '/iWsService',
'uri' => 'http://www.zksoftware/Service/message/'
);
$client = new SoapClient(null, $options);
$soapRequest = "<GetAllUserInfo><ArgComKey>0</ArgComKey></GetAllUserInfo>";
$response = $client->__doRequest($soapRequest, 'http://' . $your_ip . '/iWsService', '', '1.1');
echo '<pre>', var_dump($response), '</pre>'; // Please copy the whole string generated here and send it to me I hope I can find out where the problem is. It is a little complicated to help you because I don't have a device where I can run some tests. |
Here is the response which i get from machine according to your instructions string(3342) "
110-Fatima Zaheer123450022221401060000
214-Hira Iqbal123450022299811429000
313-Momina Chaudhry123450032042511362000
416-Hashim Iqbal1234511482932321656000
512-Kashif Ali123450032210261253000
69-Zaheer Saeed12345003186861938000
717-Aurangzaib Nawaz123450022419471771000
818-Ali Mian123450022415631898000
919-Ahmad Hafeez12345003199085193000
1019-Ahmad Hafeez123450067891954000
1117-Aurangzaib Nawaz123450067326181773000
1220-weweweweee kkkiiikiikû†123400345552041000
1321-weweweweee kkkiiikiikm²123400456772124000
1421-weweweweee kkkiiikiik2 �123400678902180000
1520-edjdije ejdije12340083748922067000
1620-user 123450021474836472022000
1720-user 123450021474836472072000
" |
Well the response that you got from your device is obviously not well formed (according XML structure) and that's why you are getting the error:
It's suppose your device should be return an XML response like the following:
I have no idea why you are getting a not well-formed XML. Maybe is your device model (which I don't know what model you have, by the way). Maybe is the device's firmware version (TAD-PHP it's been tested on ZEM580, ZEM600 and few devices with ZEM800). Sorry but at the moment I don't have any advice for you to solve this issue. |
Hi @ahmedali5530 the problem is how are you sending data, if you look at line: "1421-weweweweee kkkiiikiik2 �123400678902180000", you can see a "diamond" with a question mark inside, that is the problem on sending XML data and convert it. I think the solution is send the data without that signs or symbols. I hope this help you. |
Maybe I'm wrong my friend but I agree with @JohanMa4. I think the problem is related with your data in your device. It would be nice if you can tell me what device's model you have (including the firmware version). |
@cobisja @ahmedali5530 Thanks |
Hi @cobisja,
i m using this library for fetching user information from machine but error occurs while triggering the
get_all_user_info
function, the error message is hereAny ideas how to resolve this issue.
The text was updated successfully, but these errors were encountered: