|
Stored process (no input
required) /programs/timeAndDate
|
Stored process (input
required) /programs/addfloats
|
Generated Web service
addfloatsWS contains stored process /programs/addfloats
|
|
|
http://host:port/SASBIWS/services/programs/timeAndDate
|
http://host:port/SASBIWS/services/programs/addfloats
|
http://host:port/SASBIWS/services/addfloatsWS
|
|
http://host:port/SASBIWS/services/programs/timeAndDate?wsdl
|
http://host:port/SASBIWS/services/programs/addfloats?wsdl or http://host:port/SASBIWS/services/programs/addfloats.wsdl
|
http://host:port/SASBIWS/services/addfloatsWS?wsdl or http://host:port/SASBIWS/services/addfloatsWS.wsdl
|
|
POST http://host:port/SASBIWS/services/
programs/timeAndDate
HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction:
“http://www.sas.com/xml/namespace/
biwebservices/timeAndDate”
Host: host:port
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/"
xmlns:biw="http://www.sas.com/xml/
namespace/biwebservices">
<soapenv:Header/>
<soapenv:Body>
<biw:timeAndDate>
<biw:parameters />
</biw:timeAndDate>
</soapenv:Body>
</soapenv:Envelope>
|
POST http://host:port/SASBIWS/services/
programs/addfloats
HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction:
“http://www.sas.com/xml/namespace/
biwebservices/addfloats”
Host: host:port
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/"
xmlns:biw="http://www.sas.com/xml/
namespace/biwebservices">
<soapenv:Header/>
<soapenv:Body>
<biw:addfloats>
<biw:parameters>
<biw:num1>2.3</biw:num1>
<biw:num2>4.2</biw:num2>
</biw:parameters>
</biw:addfloats>
</soapenv:Body>
</soapenv:Envelope>
|
POST http://host:port/SASBIWS/services/
addfloatsWS
HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction:
“http://tempuri.org/addfloatsWS/
addfloats”
Host: host:port
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/"
xmlns:add="http://tempuri.org/
addfloatsWS">
<soapenv:Header/>
<soapenv:Body>
<add:addfloats>
<add:parameters>
<add:num1>2.3</add:num1>
<add:num2>4.2</add:num2>
</add:parameters>
</add:addfloats>
</soapenv:Body>
</soapenv:Envelope>
|
|
HTTP/1.1 200 OK
SOAPAction: ""
Accept: text/xml
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/">
<soapenv:Body>
<n:timeAndDateResponse
xmlns:n="http://www.sas.com/xml/namespace/
biwebservices">
<n:timeAndDateResult>
<n:Parameters>
<n:time>13:24:20</n:time>
<n:date>06Mar2011</n:date>
</n:Parameters>
</n:timeAndDateResult>
</n:timeAndDateResponse>
</soapenv:Body>
</soapenv:Envelope>
|
HTTP/1.1 200 OK
SOAPAction: ""
Accept: text/xml
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/">
<soapenv:Body>
<n:addfloatsResponse
xmlns:n="http://www.sas.com/xml/namespace/
biwebservices">
<n:addfloatsResult>
<n:Parameters>
<n:Sum>6.5</n:Sum>
</n:Parameters>
</n:addfloatsResult>
</n:addfloatsResponse>
</soapenv:Body>
</soapenv:Envelope>
|
HTTP/1.1 200 OK
SOAPAction: ""
Accept: text/xml
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/">
<soapenv:Body>
<n:addfloatsResponse
xmlns:n="http://tempuri.org/addfloatsWS">
<n:addfloatsResult>
<n:Parameters>
<n:Sum>6.5</n:Sum>
</n:Parameters>
</n:addfloatsResult>
</n:addfloatsResponse>
</soapenv:Body>
</soapenv:Envelope>
|
|
|
http://host:port/SASBIWS/rest/storedProcesses/programs/timeAndDate
|
http://host:port/SASBIWS/rest/storedProcesses/programs/addfloats
|
http://host:port/SASBIWS/rest/addfloatsWS/addfloats
|
Sample RESTful XML request
|
GET http://host:port/SASBIWS/rest/
storedProcesses/programs/timeAndDate
HTTP/1.1
Accept: application/xml
Host: host:port
|
POST http://host:port/SASBIWS/rest/
storedProcesses/programs/addfloats
HTTP/1.1
Accept: application/xml
Content-Type: application/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: host:port
<addfloats>
<parameters>
<num1>2.3</num1>
<num2>4.2</num2>
</parameters>
</addfloats>
|
POST http://host:port/SASBIWS/rest/
addfloatsWS/addfloats HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Host: host:port
<addfloats xmlns="http://tempuri.org/
addfloatsWS">
<parameters>
<num1>2.3</num1>
<num2>4.2</num2>
</parameters>
</addfloats>
|
Sample RESTful XML response
|
HTTP/1.1 200 OK
Content-Type: text/xml
Transfer-Encoding: chunked
<timeAndDateResponse>
<timeAndDateResult>
<Parameters>
<time>13:24:20</time>
<date>06Mar2011</date>
</Parameters>
</timeAndDateResult>
</timeAndDateResponse>
|
HTTP/1.1 200 OK
Content-Type: text/xml
Transfer-Encoding: chunked
<addfloatsResponse>
<addfloatsResult>
<Parameters>
<Sum>6.5</Sum>
</Parameters>
</addfloatsResult>
</addfloatsResponse>
|
HTTP/1.1 200 OK
Content-Type: text/xml
Transfer-Encoding: chunked
<n:addfloatsResponse
xmlns:n="http://tempuri.org/addfloatsWS">
<n:addfloatsResult>
<n:Parameters>
<n:Sum>6.5</n:Sum>
</n:Parameters>
</n:addfloatsResult>
</n:addfloatsResponse>
|
|
|
http://host:port/SASBIWS/json/storedProcesses/programs/timeAndDate
|
http://host:port/SASBIWS/json/storedProcesses/programs/addfloats
|
http://host:port/SASBIWS/json/addfloatsWS/addfloats
|
Sample RESTful JSON
request
|
GET http://host:port/SASBIWS/json/
storedProcesses/programs/timeAndDate
HTTP/1.1
Accept: application/json
Host: host:port
|
POST http://host:port/SASBIWS/json/
storedProcesses/programs/addfloats
HTTP/1.1
Accept: application/json
Content-Type:
application/x-www-form-urlencoded
Host: host:port
num1=2.3&num2=4.2
|
POST http://host:port/SASBIWS/json/
addfloatsWS/addfloats
HTTP/1.1
Accept: application/json
Content-Type:
application/x-www-form-urlencoded
Host: host:port
num1=2.3&num2=4.2
|
Sample RESTful JSON
response
|
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{"outputParameters":{"date":"06Mar2011",
"time":"13:24:20"}}
|
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{"outputParameters":{"Sum":"6.5"}}
|
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
{"outputParameters":{"Sum":"6.5"}}
|