POST HTTP SENDER

Sorry. The misunderstanding is because I have only posted the POST shipping code, here we show full

#include <SPI.h>
#include <Ethernet2.h>


byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

byte server[] = { 192, 168, 0, 101 };

// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 0, 177);

// 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) {
  ; // wait for serial port to connect. Needed for native USB port only
}

// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
  Serial.println("Failed to configure Ethernet using DHCP");
  // try to congifure using IP address instead of DHCP:
  Ethernet.begin(mac, ip);
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
Serial.println(Ethernet.localIP());

// if you get a connection, report back via serial:

if (client.connect(server, 8312)) {
      soapEnvelope();
} else {
  // if you didn't get a connection to the server:
  Serial.println("connection failed");
}
}



String soapEnvelope()
{
Serial.println("In SOPA");
  Serial.println("Connected to Server");
  client.println(F("POST /WS_PLANILLA.Service1.svc?wsdl HTTP/1.1"));
  client.println(F("Host:192.168.0.101:8312")); 
  client.println(F("Content-Type:text/xml; charset=utf-8"));
  client.println(F("Content-Length:204"));
  client.println();  
  client.print(F("<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"));
  client.print(F("<soapenv:Header/>"));

  client.print(F("<soapenv:Body>"));
  client.print(F("<tem:ConsultaID/>"));
  client.print(F("</soapenv:Body>"));
  client.print(F("</soapenv:Envelope>"));  
  client.println();
  Serial.println("MAKE REQUEST DONE");

}

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:
if (!client.connected()) {
  Serial.println();
  Serial.println("disconnecting.");
  client.stop();

  // do nothing forevermore:
  while (true);
}
}