Exemple #1
0
 public function __construct(Message $message, XMLDomElement $msg)
 {
     parent::__construct($message->getWsdl(), $msg->getAttribute("name"), $message->getNs());
     if ($msg->hasAttribute("type")) {
         list($prefix, $name) = explode(":", $msg->getAttribute("type"));
         $ns = $msg->lookupNamespaceURI($prefix);
         $this->type = array($ns, $name);
     }
     if ($msg->hasAttribute("element")) {
         list($prefix, $name) = explode(":", $msg->getAttribute("element"));
         $ns = $msg->lookupNamespaceURI($prefix);
         $this->element = array($ns, $name);
     }
     $this->data = $msg;
 }
Exemple #2
0
 public function __construct(Service $service, XMLDomElement $bind)
 {
     parent::__construct($service->getWsdl(), $bind->getAttribute("name"), $service->getNs());
     $this->data = $bind;
     list($prefix, $name) = explode(":", $bind->getAttribute("binding"));
     $ns = $bind->lookupNamespaceURI($prefix);
     $this->binding = $service->getWsdl()->getBinding($ns, $name);
 }
Exemple #3
0
 public function __construct(Wsdl $wsdl, XMLDomElement $bind)
 {
     $ns = $bind->ownerDocument->documentElement->getAttribute("targetNamespace");
     parent::__construct($wsdl, $bind->getAttribute("name"), $ns);
     $this->data = $bind;
     list($prefix, $name) = explode(":", $bind->getAttribute("type"));
     $ns = $bind->lookupNamespaceURI($prefix);
     $this->portType = $wsdl->getPortType($ns, $name);
     $operations = $bind->query("wsdl:operation");
     foreach ($operations as $operation) {
         $this->operations[$operation->getAttribute("name")] = new BindingOperation($this, $operation);
     }
 }
Exemple #4
0
 public function __construct(Wsdl $wsdl, PortType $port, XMLDomElement $operation)
 {
     parent::__construct($wsdl, $operation->getAttribute("name"), $port->getNs());
     foreach (array("input", "output") as $typeMessage) {
         $r = $operation->query("wsdl:{$typeMessage}", array("wsdl" => Wsdl::WSDL_NS));
         if ($r->length) {
             list($prefix, $name) = explode(":", $r->item(0)->getAttribute("message"));
             $ns = $operation->lookupNamespaceURI($prefix);
             $this->{$typeMessage} = $wsdl->getMessage($ns, $name);
         }
     }
     $faults = $operation->query("wsdl:fault", array("wsdl" => Wsdl::WSDL_NS));
     foreach ($faults as $fault) {
         list($prefix, $name) = explode(":", $fault->getAttribute("message"));
         $ns = $fault->lookupNamespaceURI($prefix);
         $this->faults[] = $wsdl->getMessage($ns, $name);
     }
     $this->ns = $operation->evaluate("string(ancestor::wsdl:definitions/@targetNamespace)", array("wsdl" => Wsdl::WSDL_NS));
 }