Call HTTP url using UNO & WIFI shield

Hi,

I trying calling the yahoo weather API web service, using the sample code and it worked. Now I am trying to call a service specific to my project with the same logic which seems to be not working. Below is my code,

This is the method i call which seems to be not working correctly,

void callService(float temp)
{
if (client.connect(XYZ, 9980)) {

Serial.println("Connected to server, preparing request.");
Serial.println("Connect to Non SAP Network...");

client.println("GET /&msgType=UPDATE_F&macAddress=62281224-C2E5-485B-A0EB-B642E62BCB53&deviceName=testDevice&deviceType=testDeviceType&groupId=iPhone5&param=testParam&value=89&valueDimension=testDim&eventTime=abc HTTP/1.1");
client.println("HOST:XYZ:9980\n\n");
Serial.println(client.status());
client.println();
client.println("Connection: close");
Serial.println("Connection closed");
}
else
Serial.println(client.status());

}

When the code is executed, this is the output i get,

Connected to server, preparing request
Connect to Non SAP Network...
0
Connection closed

0 is the client status
When i check the data base no record is created. What could be going wrong? Please help.

Regards,
Suresh

P.S
The complete Webservice url im using is,

http://XYZ:9980/?msgType=UPDATE_F&macAddress=62281224-C2E5-485B-A0EB-B642E62BCB53&deviceName=testDevice&deviceType=testDeviceType&groupId=iPhone5&param=testParam&value=89&valueDimension=testDim&eventTime=ABC

       client.println("HOST:XYZ:9980\n\n");

The :9980 bit is to connect to the server on a non-standard port (typically 80). Is it NOT part of the host name.

Are you able to look at the web logs on the server? They may give a clue as to the problem, if fixing the HOST statement isn't the answer.

Thanks for your reply
Yes, the 9980 is the port to the server. And if the program control is going into the if loop it means the connection is happening?

I am using a SAP Hana server and when i check the logs i do not see any entry being made there.

Could this issue be due to

client.println("GET /&msgType=UPDATE_F&macAddress=62281224-C2E5-485B-A0EB-B642E62BCB53&deviceName=testDevice&deviceType=testDeviceType&groupId=iPhone5&param=testParam&value=89&valueDimension=testDim&eventTime=abc HTTP/1.1");

I don't know if this is all the problem, but...

// the first ampersand
client.println("GET /&msgType=UPDATE_F...
// should be a question mark
client.println("GET /?msgType=UPDATE_F...

And the "Connection: close" should be in the header (before the blank line).

        client.println("HOST:XYZ");
        Serial.println(client.status());
        client.println("Connection: close");
        client.println();