Jump to content

munnikd

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

munnikd's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, i'm not able to access a mapped drive on my server with the following code : $location = "K:" if ($handle = opendir($location)) { while (false !== ($entry = readdir($handle))) { echo "$entry"; } closedir($handle); } I know it is a permission problem, but how do I give the Iusr and IIS rights to access this mapped drive ?
  2. I'm really lost here, would appreciate if you could help me with some code.
  3. Hi, When looping through a foreach loop I get the following error: foreach($result as $key=>$value) { echo $key.' -> '.$value.'<br />'; } PHP Catchable fatal error: Object of class stdClass could not be converted to string in ??
  4. I call the following webservice: $soap = new SoapClient('http://172.18.22.182/csp/ampath/ReportGeneration.Mobi.Services.cls?WSDL'); $params = array('prmRegUser'=>"34"); $result = $soap->getResultsByUser($params); I get the following returned when I do a var_dump ($result) form a webs service call and needs to be able to display the data correctly in a table: object(stdClass)#2 (1) { ["getResultsByUserResult"]=> object(stdClass)#3 (1) { ["Specimen"]=> array(10) { [0]=> object(stdClass)#4 (3) { ["SpecimenID"]=> string(3) "380" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "13:12" } [1]=> object(stdClass)#5 (7) { ["SpecimenID"]=> string(5) "18470" ["PatientSurname"]=> string(6) "de Wet" ["PatientFirstName"]=> string(6) "Liza K" ["PatientSex"]=> string(1) "F" ["PatientAge"]=> string(2) "33" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "14:00" } [2]=> object(stdClass)#6 (7) { ["SpecimenID"]=> string(5) "17890" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:53" } [3]=> object(stdClass)#7 (7) { ["SpecimenID"]=> string(5) "17408" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:00" } [4]=> object(stdClass)#8 (7) { ["SpecimenID"]=> string(5) "17371" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "09:46" } [5]=> object(stdClass)#9 (7) { ["SpecimenID"]=> string(5) "18480" ["PatientSurname"]=> string(6) "Harvey" ["PatientFirstName"]=> string(4) "Lee " ["PatientSex"]=> string(1) "F" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "15:00" } [6]=> object(stdClass)#10 (7) { ["SpecimenID"]=> string(5) "17115" ["PatientSurname"]=> string(6) "Marais" ["PatientFirstName"]=> string(7) "Les PTP" ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "35" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "16:30" } [7]=> object(stdClass)#11 (7) { ["SpecimenID"]=> string(5) "17113" ["PatientSurname"]=> string(6) "Marais" ["PatientFirstName"]=> string(7) "Les PTP" ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "35" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "16:26" } [8]=> object(stdClass)#12 (7) { ["SpecimenID"]=> string(5) "17311" ["PatientSurname"]=> string(4) "Muis" ["PatientFirstName"]=> string(7) "Mickey " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "54" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "10:36" } [9]=> object(stdClass)#13 (7) { ["SpecimenID"]=> string(4) "4919" ["PatientSurname"]=> string(5) "Tudor" ["PatientFirstName"]=> string(6) "Henry " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "57" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:00" } } } } This is data from a database and length varies accordingly. What would be the best way to display this in a table under the following headings: Specimen ID | Surname | Name | Sex | Age | Module | Time 380 | | | F | | LAB | 13:12 18470 | de Wet | Liza K | F | 33 | LAB | 14:00 Any ideas ?
  5. One more question: I get the following returned when I do a var_dump ($result) form a webs service call: This is data from a database and length varies accordingly. What would be the best way to display this in a table under the following headings: Specimen ID | Surname | Name | Sex | Age | Module | Time 380 | | | F | | LAB | 13:12 18470 | de Wet | Liza K | F | 33 | LAB | 14:00 object(stdClass)#2 (1) { ["getResultsByUserResult"]=> object(stdClass)#3 (1) { ["Specimen"]=> array(10) { [0]=> object(stdClass)#4 (3) { ["SpecimenID"]=> string(3) "380" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "13:12" } [1]=> object(stdClass)#5 (7) { ["SpecimenID"]=> string(5) "18470" ["PatientSurname"]=> string(6) "de Wet" ["PatientFirstName"]=> string(6) "Liza K" ["PatientSex"]=> string(1) "F" ["PatientAge"]=> string(2) "33" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "14:00" } [2]=> object(stdClass)#6 (7) { ["SpecimenID"]=> string(5) "17890" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:53" } [3]=> object(stdClass)#7 (7) { ["SpecimenID"]=> string(5) "17408" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:00" } [4]=> object(stdClass)#8 (7) { ["SpecimenID"]=> string(5) "17371" ["PatientSurname"]=> string(6) "Harmse" ["PatientFirstName"]=> string(5) "Mark " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "09:46" } [5]=> object(stdClass)#9 (7) { ["SpecimenID"]=> string(5) "18480" ["PatientSurname"]=> string(6) "Harvey" ["PatientFirstName"]=> string(4) "Lee " ["PatientSex"]=> string(1) "F" ["PatientAge"]=> string(2) "31" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "15:00" } [6]=> object(stdClass)#10 (7) { ["SpecimenID"]=> string(5) "17115" ["PatientSurname"]=> string(6) "Marais" ["PatientFirstName"]=> string(7) "Les PTP" ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "35" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "16:30" } [7]=> object(stdClass)#11 (7) { ["SpecimenID"]=> string(5) "17113" ["PatientSurname"]=> string(6) "Marais" ["PatientFirstName"]=> string(7) "Les PTP" ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "35" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "16:26" } [8]=> object(stdClass)#12 (7) { ["SpecimenID"]=> string(5) "17311" ["PatientSurname"]=> string(4) "Muis" ["PatientFirstName"]=> string(7) "Mickey " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "54" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "10:36" } [9]=> object(stdClass)#13 (7) { ["SpecimenID"]=> string(4) "4919" ["PatientSurname"]=> string(5) "Tudor" ["PatientFirstName"]=> string(6) "Henry " ["PatientSex"]=> string(1) "M" ["PatientAge"]=> string(2) "57" ["SpecimenModule"]=> string(3) "LAB" ["CollectedTime"]=> string(5) "12:00" } } } }
  6. HI, I need to know how to get the response objects from a webserve call. I call the following webservice: $params = array('mobiUser'=>"WJBASSON",'mobiPass'=>"83dop"); $soap = new SoapClient('http://172.18.22.182/csp/ampath/ReportGeneration.Mobi.Services.cls?WSDL'); $result = $soap->login($params); When I do var_dump($result) I receive the following: stdClass Object ( [loginResult] => stdClass Object ( [MobiRegUserID] => 34 [MobiRegUserName] => WJBasson ) ) I need to know how can I get the values of objects MobiRegUserID and MobiRegUserName ??
  7. Thank you for the reply but I still need an answer on my question
  8. Hi, I trying to call a .Net webservice but get the following error: Array ( [faultcode] => soap:Client [faultstring] => Object reference not set to an instance of an object. [detail] => ) Array here is the wsdl file of the webservice I'm trying to call: POST /WebSetup1/CAIRegister.asmx HTTP/1.1 Host: 172.18.22.181 Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://tempuri.org/Execute" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Execute xmlns="http://tempuri.org/"> <userContext> <Username>string</Username> <UserPassword>string</UserPassword> <ApplicationMnemonic>string</ApplicationMnemonic> <ApplicationPassword>string</ApplicationPassword> </userContext> <registrationRequest> <Identifiers xmlns="http://www.ampath.co.za/SOAPheaders"> <IdentifiersItem>string</IdentifiersItem> <IdentifiersItem>string</IdentifiersItem> </Identifiers> <Type xmlns="http://www.ampath.co.za/SOAPheaders">string</Type> <FirstName xmlns="http://www.ampath.co.za/SOAPheaders">string</FirstName> <LastName xmlns="http://www.ampath.co.za/SOAPheaders">string</LastName> <EmailAddress xmlns="http://www.ampath.co.za/SOAPheaders">string</EmailAddress> <ContactNumber xmlns="http://www.ampath.co.za/SOAPheaders">string</ContactNumber> <Status xmlns="http://www.ampath.co.za/SOAPheaders">string</Status> </registrationRequest> </Execute> </soap:Body> Here is my code to call the webservice: $c = new soapclient("http://172.18.22.181/WebSetup1/CAIRegister.asmx?wsdl",true); $err = $c->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $rt = $c->call('Execute',$userContext,$registrationRequest); print_r($rt); ANY IDEAS ???
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.