UnknownCodester's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
32 (0.05 per day)
Joined:
05-March 13
Profile Views:
968
Last Active:
User is offline Oct 27 2014 09:13 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   UnknownCodester has not set their status

Posts I've Made

  1. In Topic: WSDL tools for PHP Webservice

    Posted 23 Oct 2014

    Just in case anybody else is wondering about this in the future...

    I have found that SoapUI is a good tool for testings WSDL's and Eclipse WSDL Editor has a great GUI interface that allows you to make WSDLs whilst providing a layer of abstraction and automating the process.
  2. In Topic: Web Service Problems

    Posted 20 Oct 2014

    Now I have no errors, but;

    var_dump($client->getMiles(2.0));
    


    Produces;

    object(stdClass)#2 (0) { }

    When I'd expect 2.0 to be sent to my getMiles method and return a value around 1.2
  3. In Topic: Web Service Problems

    Posted 20 Oct 2014

    Haha wow I can't believe I couldn't see that... Should be...

    require('converter.php');
    
    $server = new SoapServer('wsdl.wsdl');
    $server->setClass('Converter');
    $server->handle();
    
    
  4. In Topic: Web Service Problems

    Posted 20 Oct 2014

    View PostArtificialSoldier, on 20 October 2014 - 10:23 AM, said:

    Is that error message coming from client.php?


    Yeah especially if I add code like this
    $client->getMiles(15.0);
    


    Heres the whole error;

    object(SoapFault)#2 (10) { ["message":protected]=> string(33) "looks like we got no XML document" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(44) "C:\xampp server\htdocs\webservice\client.php" ["line":protected]=> int(6) ["trace":"Exception":private]=> array(2) { [0]=> array(6) { ["file"]=> string(44) "C:\xampp server\htdocs\webservice\client.php" ["line"]=> int(6) ["function"]=> string(6) "__call" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(8) "getMiles" [1]=> array(1) { [0]=> float(15) } } } [1]=> array(6) { ["file"]=> string(44) "C:\xampp server\htdocs\webservice\client.php" ["line"]=> int(6) ["function"]=> string(8) "getMiles" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> float(15) } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(33) "looks like we got no XML document" ["faultcode"]=> string(6) "Client" ["faultcodens"]=> string(41) "http://schemas.xmlsoap.org/soap/envelope/" }
  5. In Topic: Identifying Classes For my Login?

    Posted 9 Oct 2014

    View PostDormilich, on 09 October 2014 - 05:27 AM, said:

    keep it separate, pass it into the class. cf. Dependency Injection. (if you adhere to that you’ll open the connection only once (on first use))


    So code like this is better?

    $someUser = new UserLogin("Username", "password");
    $connection = new DbConnect("localhost","root","","login_db");
    $someUser->verify("Username", "password", $connection->link);
    
    


    Where verify is inside the user login class and being passed the link of the database connection?

    View PostDormilich, on 09 October 2014 - 05:27 AM, said:

    you should have a look how others (i.e. frameworks like Zend, Symfony, Laravel) do it. those (the frameworks) are written by professional programmers that knew what they did.


    I have heard the word ZendFramework passed around quite a lot, I will check it out later..

    cheers for your help.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

UnknownCodester hasn't added any friends yet.

Comments

UnknownCodester has no profile comments yet. Why not say hello?