Skip to content
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

Remove __construct method from WSDL #5

Closed
stasicki opened this issue Mar 7, 2014 · 7 comments
Closed

Remove __construct method from WSDL #5

stasicki opened this issue Mar 7, 2014 · 7 comments
Assignees
Labels

Comments

@stasicki
Copy link

stasicki commented Mar 7, 2014

Magic methods shuld be removed from WSDL.

@piotrooo
Copy link
Owner

piotrooo commented Mar 7, 2014

What is the reason to remove constructor?

@stasicki
Copy link
Author

stasicki commented Mar 7, 2014

As far as i know this method is called on object initialization by php SoapServer before object will do any web service called method. This is object internal method. There is no need to be callable by webservice consumer. If this method is declared in WSDL it is public and visible for webservice consumer, but is unuseful.

@piotrooo
Copy link
Owner

piotrooo commented Mar 7, 2014

I don't know I exactly understand you, but class \WSDL\WSDLCreator has noting to do with the SoapServer. This class is only used to the generate WSDL document.

@stasicki
Copy link
Author

stasicki commented Mar 7, 2014

Yes you are right but why this WSDL is generated?

@piotrooo
Copy link
Owner

piotrooo commented Mar 8, 2014

You mean why on SOAP request the WSDLCreator object is created? In example https://github.com/piotrooo/wsdl-creator/blob/master/examples/SimpleExampleSoapServer.php when you want to show service information by the renderWSDLService method you must have this object. If you don't want to render service information this class can be in the if structure:

if (isset($_GET['wsdl'])) {
    $wsdl = new WSDL\WSDLCreator('SimpleSoapServer', 'http://localhost/wsdl-creator/examples/SimpleExampleSoapServer.php');
    $wsdl->setNamespace("http://foo.bar/");
    $wsdl->renderWSDL();
    exit;
}

And this create object only on http://localhost/wsdl-creator/examples/SimpleExampleSoapServer.php?wsdl.

@stasicki
Copy link
Author

stasicki commented Mar 8, 2014

Yes that's all true. I think you did not understand me properly. This magic method __contruct should be in WSDLCreator class also could be in SimpleSoapServer class. But there is no reason to be on the list of methods in the webservice wsdl file. This method is specific for php. When You make webservice request by SOAP, before Your aplication will handle request, object of SimpleSoapServer class will be created automatically by the server software. It could be an php SoapServer http://www.php.net/manual/pl/class.soapserver.php or any other software. Możemy rozmawiać po polsku? Może wtedy uda mi się wyjaśnić o co mi chodzi.

@piotrooo
Copy link
Owner

piotrooo commented Mar 9, 2014

You are mean the magic methods are also generated with normal methods? OK napisz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants