Unstoppable Domains

SOAP and XML in PHP

Spaceship Spaceship
Watch

kubativity

Established Member
Impact
49
Hello,

does anybody here have any experience with SOAP in PHP? I am creating a soap server and client to communicate data and I have few questions.

The main question is:

how can I return a dataSet such as a table result of an SQL querry?

I see a lot of examples online of a SOAP communication that returns a single value, So I am wondering how to format the response to return something like a recordset.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
With a proper delimiter between different data values you can achieve that.

Maybe the client side using this API needs to set it that way that the data grabbed will be again pass through some function and will be available as array for using it in their codes.

Thanks.
 
1
•••
Thanks nick,


So is there a way to send back an XML dataset within your soap response message:

Code:
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> 

   <soap:Body xmlns:m="http://www.example.org/stock">
    <m:GetStockPriceResponse>
      <m:Price>34.5</m:Price>

       

    </m:GetStockPriceResponse>

 [COLOR=Red]    ...... XML formatted Data SET here ?[/COLOR]
  </soap:Body>

</soap:Envelope>

*Code sample taken from W3schools
 
0
•••
Yes and with using some PHP string functions and arrays on both the client and server side you will be able to achieve the proper results.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back