Search code examples
phpsoapxsdwsdlnusoap

how to incorporate types from a XSD to the WSDL in NuSOAP


I'm trying to create a webservice for a PHP app (with CodeIgniter) using NuSOAP, and I'm finding some difficulties since creating a WS from scratch is new to me. I have some XSDs that I should use to validate the input (which will be an XML with many records of one of 3 complexTypes just inside the root). Now, I know I could use the addComplexType method and put each one of these myself, but isn't there an easy way to import the definitions from the XSD? besides, isn't there any Nusoap reference? I can't find one! just tutorials and question threads =/


Solution

  • You can just add the xsd directly into the <wsdl:types> tag in the WSDL, that would add all the complex types. By the way, if you have a fixed WSDL, then you're probably better off not using NuSOAP at all.