soapclient 0.0.1
A simple client to connect to and interact with SOAP services.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
soapclient.d
Available methods
getEndpoint()
- string
- Return the endpoint URI the client is connecting to.
setHeader(string key, string value)
- void
- Set a header to be sent along when the client calls a method.
getHeaders()
- array
- Return an associative array of all headers that have been set.
clearHeaders()
- void
- Clear all SOAP headers that may have been set up to this point.
getHeader(string key)
- string
- Return the value of a specific header key.
getMethods()
- array
- Return an array of available SOAP methods.
call(string method, Element payload)
- void
- Call a specific method on the endpoint, feeding it a valid XML Element.
getResult()
- string
- Return the result of our call.
Example usage
import std.stdio;
import std.xml;
import soapclient;
void main() {
auto client = new SoapClient("http://10.0.10.2/wsa/wsa1");
auto payload = new Element("GetDeliveryLines");
payload ~= new Element("customer", "35754");
payload ~= new Element("addressNumber", "0");
payload ~= new Element("daysInThePast", "50");
// Optionally set a namsepace
payload.tag.attr["xmlns"] = "urn:acme:orderservice";
// Optionallpy set SOAP headers
client.setHeader("user", "john doe");
client.setHeader("pass", "supersecret");
client.call("GetDeliveryLine", payload);
writeln(client.getResult());
}
- 0.0.1 released 8 years ago
- flugelfoxes/oss-dlang-soapclient
- MIT
- Copyright © 2016, Jethro Van Thuyne
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.1 2016-Oct-16 ~master 2016-Oct-19 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
49 downloads total
-
- Score:
- 0.0
- Short URL:
- soapclient.dub.pm