zend-soap

SOAP - nillable=“true”

对着背影说爱祢 提交于 2020-01-03 03:38:10
问题 I am building a web service using the Zend Framework. I am using the Zend_Soap_AutoDiscover class for the generation of my WSDL. I am using various complex type in this web service form example: StockItemEntity Class class StockItemEntity { /** @var string */ public $sStockCode; /** @var string */ public $sQty; public function __construct($sStockCode, $sQty){ $this->sStockCode = $sStockCode; $this->sQty = $sQty; } } WSDL Definition <xsd:complexType name="StockItemEntity"> <xsd:all> <xsd

Return object with Zend_Soap

拥有回忆 提交于 2019-12-13 05:27:29
问题 I would like to return an object using Zend_Soap. I also want the object given in the WSDL file. But I can't get both to work together. It's either one or the other. 1. WSDL working, but object not returning If in the phpdoc of my function on the soap server script, I write @return Application_Model_Soap_Test I can see it in the WSDL file <message name="getPostcodeOut"> <part name="return" type="tns:Application_Model_Soap_Test"/> </message> but when I run the script, it returns an empty class

zf 1.9.6 zend_soap: Function (“doString”) is not a valid method for this service

人盡茶涼 提交于 2019-12-13 04:45:37
问题 Duplicate of this question I'm trying to work with Zend_Soap using zend framework 1.9.6 and php 5.3.1. soap.php (wsdl generator) <?php require_once('Zend/Soap/Server.php'); require_once('Zend/Soap/AutoDiscover.php'); require_once('Soaping.php'); $_WSDL_URI="http://server/soap/soap.php?wsdl"; if(isset($_GET['wsdl'])) { hadleWSDL(); } else { handleSOAP(); } function hadleWSDL() { $autodiscover = new Zend_Soap_AutoDiscover(); $autodiscover->setClass('Soaping'); $autodiscover->handle(); }

Zend Framework 2 SOAP AutoDiscover and complex types

╄→尐↘猪︶ㄣ 提交于 2019-12-12 08:44:50
问题 I'm preparing the SOAP server and generating my WSDL using the follow code: //(... Controller action code ...) if (key_exists('wsdl', $params)) { $autodiscover = new AutoDiscover(); $autodiscover->setClass('WebServiceClass') ->setUri('http://server/webserver/uri'); $autodiscover->handle(); } else { $server = new Server(null); $server->setUri($ws_url); $server->setObject($this->getServiceLocator()->get('MyController\Service\WebServiceClass')); $server->handle(); } //(... Controller action code

Create SOAP request with element attribute using Zend_Soap_Client and stdObject

孤街浪徒 提交于 2019-12-11 10:34:14
问题 I'm calling a service witch among many other parameters demands an entry like (Taken from soapUI): <v110:ReadWorkerRequest> <v111:Key v111:type="INITIALS">RKM</v111:Key> </v110:ReadWorkerRequest> How do I get the Zend_Soap_Client to send the type-attribute in the Key element? As this is just part of a rather big service, I've been creating classes to create the datastructure, like: class Key { public $_ = 'RKM; public $type = 'INITIALS'; } class Body { public $ReadWorkerRequest; public

PHP SOAP Server method receive a set of parameters

本小妞迷上赌 提交于 2019-12-11 06:15:57
问题 I have setup a SOAP Server with php. The problem is that, as per the WSDL, the client which calls the server method, is supposed to pass a set of parameters (more than 50). I got to know this from SOAP UI. But how do i handle all those parameters in my Server method? Should i go on and declare each and every parameter for my Server method, as below? public function addMessage($a, $b, $c, $d, .................) { } But I hope there must be a simpler approach to this. Preferably, i would like

zend soap server response set custom ns1 namespace

一曲冷凌霜 提交于 2019-12-06 05:29:04
问题 I am using Zend_Soap_Server (WSDL mode) for outputting an xml response to the client calls. However, i want to set a custom name for the ns1 namespace in the response. I noticed that the namespace in the response is set by default like: ' ns1:getDoubleResponse ' where ' getDouble ' is the server method being called. Here is my controller and SOAP server setup: class TestController extends Zend_Controller_Action { public function testAction() { // diable laoyouts and renderers $this->getHelper

zend soap server response set custom ns1 namespace

心不动则不痛 提交于 2019-12-04 10:07:46
I am using Zend_Soap_Server (WSDL mode) for outputting an xml response to the client calls. However, i want to set a custom name for the ns1 namespace in the response. I noticed that the namespace in the response is set by default like: ' ns1:getDoubleResponse ' where ' getDouble ' is the server method being called. Here is my controller and SOAP server setup: class TestController extends Zend_Controller_Action { public function testAction() { // diable laoyouts and renderers $this->getHelper ( 'viewRenderer' )->setNoRender ( true ); $server = new Zend_Soap_Server ('http://example.com/public

Zend Framework 2 SOAP AutoDiscover and complex types

与世无争的帅哥 提交于 2019-12-04 03:12:20
I'm preparing the SOAP server and generating my WSDL using the follow code: //(... Controller action code ...) if (key_exists('wsdl', $params)) { $autodiscover = new AutoDiscover(); $autodiscover->setClass('WebServiceClass') ->setUri('http://server/webserver/uri'); $autodiscover->handle(); } else { $server = new Server(null); $server->setUri($ws_url); $server->setObject($this->getServiceLocator()->get('MyController\Service\WebServiceClass')); $server->handle(); } //(... Controller action code ...) But in one of my WebService method I have a parameter of type Array in which each element is of

Zend Soap Server with wsdl autodiscovery doesn't work as expected

微笑、不失礼 提交于 2019-12-02 07:57:40
问题 Duplicate of this question I'm trying to create a web service with Zend_Soap_Server in wsdl autodiscovery mode, but I obtain very strange effects... here the code: server: <?php require_once('Zend/Soap/AutoDiscover.php'); require_once('Zend/Soap/Server.php'); require_once('Zend/Soap/Wsdl.php'); require_once('library/SoapActions.php'); $wsdl = new Zend_Soap_Autodiscover(); $wsdl->setClass('SoapActions'); if (isset($_GET['wsdl'])) { $wsdl->handle(); } else { $server = new Zend_Soap_Server('http