Abdullah
Abdullah

Reputation: 5575

Using Fixed WSDL file with PHP SOAP

I' developing a Soap Server using php nusoap library, however , I don't need to use dynamic generated WSDL file feature that's generated by nusoap, I just want to tell nuSoap to use the Fixed WSDL file that's written manully by an another team.

What do you suggest ?

Upvotes: 0

Views: 541

Answers (1)

DaveyBoy
DaveyBoy

Reputation: 2924

My suggestion - give up. I'm not entirely sure that you can do what you want.

As you know, NuSOAP creates the WSDL on the fly only from the functions that you specify and then returns the resultant WSDL when requested.

If you could use an external fixed WSDL, what would happen if it is changed later on without your knowledge? A call to a SOAP method which is not handled by one of your functions could provide unknown results and would need to be handled by the calling machine in a nice, non-customer impacting way. Conversely, if you provide a new functionality but the other team won't adjust the WSDL for you, what do you do? Try and shoe-horn it into some other function?

Trying to match your functions to a pre-defined WSDL without errors would far out-strip any benefit you could get.

Stick with the "on-the-fly" generation for consistency and lack of headaches. Use the pre-generated WSDL as a reference but don't bother investigating whether you can use it

Also, I agree with @chrfin. If they are available on your server, consider using the native PHP SOAP functions - they are noticeably faster than NuSOAP as they are compiled rather than interpreted. The only reason I used NuSOAP in the first place was that (about 5 years ago) the native SOAP had problems communicating with a provider I needed (incorrect variable types etc). Now though, I will be re-factoring all of my code to native PHP SOAP

Upvotes: 1

Related Questions