nusoap

how to retrieve the values using php variable/array (nusoap)

别来无恙 提交于 2019-12-13 21:17:14
问题 Scenario: I'm using a nusoap.php and connect to a microsoft web service. It returns a result in an array. And it works. Problem: How to retrieve the value of the DeviceId that is return from the nusoap which is an array? (Because I need to loop this array row by row and get the value of the DeviceId.). Here's my code: (I print the whole value of an array and the xml) <?php require_once('nusoap.php'); $client = new nusoap_client('http://xxx.xxx.xx.xxx:8060/iapps/Service1.asmx?WSDL', true);

Register class methods with nusoap

送分小仙女□ 提交于 2019-12-13 16:23:41
问题 I've a php class and i want to use it with Nusoap. Can I register the class method's that already exists inside the nusoap with the register command? Sample : Here we register a function that we defined inside this script. But if we've a class that we maybe develop months ago and we want to use it as a webservice using the WSDL. Is there a way to register the methods of that class so that Nusoap creates a WSDL of it's stucture (methods inside)? require_once("nuSOAP/lib/nusoap.php"); $server =

complexType with nuSoap

断了今生、忘了曾经 提交于 2019-12-13 05:04:02
问题 I have this WDSL <xsd:element name="elementname"> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" ref="miref"/> </xsd:sequence> </xsd:complexType> </xsd:element> Now I have to create that via nuSoap but I can't find anyway to omit de type and name on the complexType and set the complexType inside of an element. So if I want to create an element I use this code: $server->wsdl->AddElement( array('name' => 'example1', 'type' => '' ) ); And if I want to create a

NuSoap PHP webservice with soap headers [closed]

旧巷老猫 提交于 2019-12-13 04:29:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 months ago . I am wondering how to implement soap header authentication in a soap web service server using NuSoap library. I have seen lots of examples about NuSoap Client but want to implement this in a server. 回答1: $client->setHeaders('<wsse:Security S:mustUnderstand="1"> <wsu:Timestamp

Nusoap set and get headers in both client and server side

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:17:26
问题 I am developing a simple web service using Nusoap and having problem when adding authentication. Currently I am using setCredentials() method to attach username and password to request and getting them using $_SERVER['PHP_AUTH_USER'] in server side. It works fine, but I don't want to authenticate the user for every call. So I need to maintain a session and according to my research, after the first authentication, the server needs to send something like 'session id' attached to the response

Not getting response using SOAP and PHP

十年热恋 提交于 2019-12-12 01:32:23
问题 I'm using PHP5 and NuSOAP - SOAP Toolkit for PHP. I created the server using the code below: <?php function getStockQuote($symbol) { mysql_connect('localhost','user','pass'); mysql_select_db('test'); $query = "SELECT stock_price FROM stockprices WHERE stock_symbol = '$symbol'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); echo $row['stock_price']; } $a=require('lib/nusoap.php'); $server = new soap_server(); $server->configureWSDL('stockserver', 'urn:stockquote'); $server-

Consume a .Net web service using PHP

家住魔仙堡 提交于 2019-12-11 19:45:39
问题 This is my first time with web services/SOAP...i have been trying to consume .Net web services using PHP but to no avail. I have searched and read all pages that google throws up for anything related to this but i am still lost. The thing is the SOAP service i am trying to call has an authorization header and i can't figure out a way to authenticate my request. I have tried the php-soapclient and NuSoap both but there is no sample code available that would help. So any help would be great.

EWS - php sending email with attachment

泄露秘密 提交于 2019-12-11 16:54:00
问题 I'm new to using EWS from Exchangeclient classes. I'm looking for a simple example how to send an email with an attachment. I've found examples about how to send an email but not sending an email with an attachment. This is my script: $exchangeclient = new Exchangeclient(); $exchangeclient->init($username, $password, NULL, 'ews/Services.wsdl'); $exchangeclient->send_message($mail_from, $subject, $body, 'HTML', true, true); function - PHP Classes: function send_message($to, $subject, $content,

why sometime can get error 404 not found (soapclient- response has contents of the response), how to solve

我与影子孤独终老i 提交于 2019-12-11 16:06:30
问题 i have a NUSOAP webservice when i run from client it visbile the error wsdl error: Getting http://carvilshoe.cz.cc/index.wsdl.php?wsdl - HTTP ERROR: Unsupported HTTP response status 404 Not Found (soapclient->response has contents of the response) below is my code at client i have to client (mitra) mitra = http://pakalolosepatu.cu.cc/ mitra1 = http://carvilshoe.cz.cc/ -- //wsdl configuration $wsdl = mitra . 'index.wsdl.php?wsdl'; $ws_client_pakalolo = new nusoap_client ( $wsdl, true ); $wsdl

PHP Nusoap - SOAP Request not working

女生的网名这么多〃 提交于 2019-12-11 06:28:49
问题 Hello i am very new to webservice, in php with below code i am trying to make soap request as shown in below XML, but it says Error HTTP Error: Unsupported HTTP response status 405 Method Not Allowed (soapclient->response has contents of the response) Questions: How to pass headers? How to pass FetchCalendarRequest with request like in XML? I have used Nusoap here but if you have a SOAP PHP class solution it is also invited. My code: <?php require_once('../lib/nusoap.php'); $client = new