36 $this->WSDLXML =
new CXMLCreator(
"wsdl:definitions");
40 $this->WSDLXML->setAttribute(
"xmlns:http",
"http://schemas.xmlsoap.org/wsdl/http/");
41 $this->WSDLXML->setAttribute(
"xmlns:mime",
"http://schemas.xmlsoap.org/wsdl/mime/");
42 $this->WSDLXML->setAttribute(
"xmlns:tm",
"http://microsoft.com/wsdl/mime/textMatching/");
43 $this->WSDLXML->setAttribute(
"xmlns:xsd",
"http://www.w3.org/2001/XMLSchema");
44 $this->WSDLXML->setAttribute(
"xmlns:soap",
"http://schemas.xmlsoap.org/wsdl/soap/");
45 $this->WSDLXML->setAttribute(
"xmlns:soap12",
"http://schemas.xmlsoap.org/wsdl/soap12/");
46 $this->WSDLXML->setAttribute(
"xmlns:soapenc",
"http://schemas.xmlsoap.org/soap/encoding/");
47 $this->WSDLXML->setAttribute(
"xmlns:wsdl",
"http://schemas.xmlsoap.org/wsdl/");
88 if (isset($param[
"varType"])
89 and isset($this->typensVars[$param[
"varType"]]))
92 if (isset($param[
"arrType"]))
94 $arrType = $param[
"arrType"];
96 $maxOccurs =
"unbounded";
97 if (isset($param[
"maxOccursA"])) $maxOccurs = $param[
"maxOccursA"];
99 $this->typensXSDType[$param[
"varType"]] =
"type";
100 $this->typensDefined[$param[
"varType"]] = $param[
"varType"];
101 $this->typensVars[$param[
"varType"]] =
array(
102 $param[
"varType"].
"El" =>
104 "varType" => $param[
"arrType"],
105 "maxOccurs" => $maxOccurs)
108 if (isset($param[
"nillableA"]))
109 $this->typensVars[$param[
"varType"]][$param[
"varType"].
"El"][
"nillable"] =
270 global $xsd_simple_type;
271 if (!$this->classes or !
count($this->classes))
return 0;
273 foreach ($this->classes as $class=>$methods) {
276 foreach ($methods as
$method=>$components)
278 if ($components[
"type"] ==
"public") {
281 $pbs[$class][
$method][
"documentation"] = $components[
"description"];
282 $pbs[$class][
$method][
"input"] = $components[
"input"];
283 $pbs[$class][
$method][
"output"] = $components[
"output"];
296 if (is_array($this->typensDefined) &&
count($this->typensDefined) > 0) {
299 $xsdSchema->setAttribute(
"elementFormDefault",
"qualified");
300 $xsdSchema->setAttribute(
"targetNamespace", $this->targetNamespace);
302 $xsdtype =
"element";
303 if (isset($this->typensXSDType[
$typensDefined])) $xsdtype =
"type";
305 if ($xsdtype ==
"element") {
310 if ($xsdtype ==
"type")
320 foreach ($this->typensVars[
$typensDefined] as $varName=>$varType) {
325 $element->setAttribute(
"minOccurs", 0);
327 if (is_array($varType) and isset($varType[
"maxOccurs"]))
328 $element->setAttribute(
"maxOccurs", $varType[
"maxOccurs"]);
330 $element->setAttribute(
"maxOccurs", 1);
332 if (is_array($varType) and isset($varType[
"nillable"]))
333 $element->setAttribute(
"nillable", $varType[
"nillable"]);
335 $element->setAttribute(
"name", $varName);
337 if (is_array($varType)) $varType = $varType[
"varType"];
339 if ($varType ==
'any')
343 $sequence->addChild($any);
344 $element->addChild($sequence);
345 $complexType->setAttribute(
'mixed',
"true");
349 $varType = isset($xsd_simple_type[$varType]) ?
"xsd:".$xsd_simple_type[$varType] :
"tns:".$varType;
350 $element->setAttribute(
"type", $varType);
353 $all->addChild($element);
357 $complexType->addChild($all);
359 if ($xsdtype ==
"element") {
360 $elroot->addChild($complexType);
361 $xsdSchema->addChild($elroot);
363 $xsdSchema->addChild($complexType);
366 $types->addChild($xsdSchema);
367 $this->WSDLXML->addChild($types);
371 foreach ($this->messages as
$message) {
376 foreach ($this->portTypes as $portType) {
377 $this->WSDLXML->addChild($portType);
381 foreach ($this->bindings as $binding) {
382 $this->WSDLXML->addChild($binding);
387 $s->setAttribute(
"name", $this->serviceName);
388 foreach ($this->services as
$service) {
391 $this->WSDLXML->addChild($s);
393 $this->WSDL =
"<?xml version='1.0' encoding='UTF-8'?>\n";
394 $this->WSDL .= $this->WSDLXML->getXML();