SOAP: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 45:
After importing the <tt>soap</tt> package from the [https://tapestry.tucson.az.us/unilib Unicon Code Library] this can be done with:
<lang
procedure main(A)
Line 51:
write("soapFunc: ",soap.call("soapFunc"))
write("anotherSoapFunc: ",soap.call("anotherSoapFunc"))
end</lang>
A matching SOAP server can be implemented as:
<lang unicon>import soap
procedure main()
server := SoapServer("http://example.com/soap/wsdl")
server.addService("soapFunc", soapFunc)
server.addService("anotherSoapFunc", anotherSoapFunc)
msg := server.handleRequest()
write(msg)
exit(0)
end
procedure soapFunc(A[])
every (s := " ") ||:= (!A || " ")
return "Hello" || s[1:-1]
end
procedure anotherSoapFunc(A[])
every (s := " ") ||:= (!A || " ")
return "Goodbye" || s[1:-1]
end</lang>
|