SOAP, proxy class generation

    Preamble:

    SOAP is a structured messaging protocol in a distributed computing environment. Initially, SOAP was intended primarily for implementing remote procedure calls (RPC), and the name was abbreviated: Simple Object Access Protocol - a simple protocol for accessing objects. Now the protocol is used for exchanging arbitrary messages in XML format, and not just for calling procedures. The official specification of the latest version 1.2 of the protocol does not decrypt the name SOAP. SOAP is an extension of the XML-RPC protocol.


    So, do the proxy-class


    So, I ran into the problem of where to use the web service.
    Generally speaking, PHP5 developers have simplified the work with the service as much as possible.
    Introduced SoapClient and use is simple. Nothing, but you need to know the function names this time. Second, when programming in a thread of the IDE, there is an autocommit that shows the functions of the class. I started digging in the direction of this, because it is stupid to remember functions as a memory. But unfortunately I did not find anything. I rummaged through pear, but there is essentially nothing to help me. As a result, I decided to write a script that, based on the given WSDL, creates a class with methods, parameters and phpDoc for convenience. For example, we set the simplest WSDL file and see how it would be done simply and through the class generator.
    <?
    $cl = new SoapClient("wsdl");
    $cl->functionname();
    ...












    Usually we write (an example is taken from here ): Conveniently, not a question. But to learn ALL WSDL functions is hard. Now let's run the same wsdl and get a class. As a result, we received: Conveniently? Yes. Moreover, this feature has long been in VS. But for example, we set WSDL to check the validity of email and in the IDE it turned out like this compliment I don’t know about you, but I don’t have this feature. Dear ALL, tell me, maybe I am creating a bicycle, but I have not seen the creation of a proxy class on PHP? Is there such a tool? Because at the moment you have to finish the script and come up with crutches to make everything work well. Thank you for your attention, I am waiting for answers - Does it make sense to move in this direction?
    <?
    $cl = new SoapClient("http://www.freewebs.com/jimmy_cheng/CurrencyExchangeService.wsdl");
    echo $cl->getRate("us", "russian");
    ?>










    $WSDL = "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl";









    or already have one?
    Crosspost

    UPD WSDL ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl contains more functions, I know, but due to the fact that the PHP does not support overloading functions, at the moment I ignore repeats. In the future I will introduce fucn1, func2, func3 which will be essentially func but with different parameters. Thank you for understanding

    Also popular now: