yes it is... here is the full sketch
/*
Web client
*/
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address for your controller below.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
IPAddress server(192,168,2,90); // numeric IP (no DNS)
//char server[] = "http://toponet.zapto.org:90"; // using DNS
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192,168,2,105);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
;
}
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
Ethernet.begin(mac, ip);
}
delay(1000);
Serial.println("connecting...");
if (client.connect(server, 80)) {
Serial.println(F("connected"));
// Make a HTTP request:
/*
POST /WebServiceSQL/WebServiceSQL.asmx HTTP/1.1
Host: toponet.zapto.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<logactivation xmlns="http://toponet.zapto.org">
<pinnumber>int</pinnumber>
</logactivation>
</soap12:Body>
</soap12:Envelope>
*/
client.println(F("POST /WebServiceSQL/WebServiceSQL.asmx HTTP/1.1"));
client.println(F("Host: 192.168.2.90"));
client.println(F("Content-Type: text/xml; charset=utf-8"));
client.println(F("Content-Length: 350"));
client.println(F("Connection: close"));
client.println(F("SOAPAction: \"http://toponet.zapto.org/logactivation\""));
client.println();
client.println(F("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
client.println(F("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"));
client.println(F("<soap:Body>"));
client.println(F("<logactivation xmlns=\"http://toponet.zapto.org\">"));
client.println(F("<pinnumber>3</pinnumber>"));
client.println(F("</logactivation>"));
client.println(F("</soap:Body>"));
client.println(F("</soap:Envelope>"));
}
else {
// kf you didn't get a connection to the server:
Serial.println("connection failed");
}
}
void loop()
{
// if there are incoming bytes available
// from the server, read them and print them:
if (client.available()) {
char c= client.read();
Serial.print(c);
}
// if the server's disconnected, stop the client:
while (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
// do nothing forevermore:
while(true);
}
}