fazer um pedido de sabão no iphone

Estou tentando usar um serviço da web de sabão que só me retorna uma data (teste). Mas não consigo me conectar ao serviço da web. Estou recebendo apenas o wsdl do serviço da web, mas não consigo obter os dados desejados. A seguir está o meu código no objetivo c

 NSString *soapMessage = @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<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/\">\n"
"<soap:Body>\n"
"<getDate xmlns:type=\"xsd:string\">\n"
"</getDate>\n"
"</soap:Body>\n"
"</soap:Envelope>\n";
NSURL *url = [NSURL URLWithString:@"http://10.1.6.5/gnosis2/public/wslogin/"];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]];
[req addValue:@"text/xml; charset=utf-8"  forHTTPHeaderField:@"Content-Type"];
[req addValue:@"http://10.1.6.5/gnosis2/public/wslogin/" forHTTPHeaderField:@"SOAPAction"];
[req addValue:msgLength forHTTPHeaderField:@"Content-Length"];
[req setHTTPMethod:@"POST"];
[req setHTTPBody:[soapMessage dataUsingEncoding:NSUTF8StringEncoding]];

NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self];

Eu quero usar o método getDate no serviço da web. Alguém por favor pode me ajudar

Edita
O código acima fornece o seguinte xml, que é o mesmo que o wsdl visualizado no navegador:

<?xml version="1.0"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://10.1.6.5/gnosis2/public/wslogin/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="MyWebService" targetNamespace="http://10.1.6.5/gnosis2/public/wslogin/"><types><xsd:schema targetNamespace="http://10.1.6.5/gnosis2/public/wslogin/"/></types><portType name="MyWebServicePort"><operation name="getDate"><documentation>Get the server date and time</documentation><input message="tns:getDateIn"/><output message="tns:getDateOut"/></operation><operation name="getAgeString"><documentation>Get a nicely formatted string of a person's age</documentation><input message="tns:getAgeStringIn"/><output message="tns:getAgeStringOut"/></operation></portType><binding name="MyWebServiceBinding" type="tns:MyWebServicePort"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="getDate"><soap:operation soapAction="http://10.1.6.5/gnosis2/public/wslogin/#getDate"/><input><soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.6.5/gnosis2/public/wslogin/"/></input><output><soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.6.5/gnosis2/public/wslogin/"/></output></operation><operation name="getAgeString"><soap:operation soapAction="http://10.1.6.5/gnosis2/public/wslogin/#getAgeString"/><input><soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.6.5/gnosis2/public/wslogin/"/></input><output><soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.6.5/gnosis2/public/wslogin/"/></output></operation></binding><service name="MyWebServiceService"><port name="MyWebServicePort" binding="tns:MyWebServiceBinding"><soap:address location="http://10.1.6.5/gnosis2/public/wslogin/"/></port></service><message name="getDateIn"/><message name="getDateOut"><part name="return" type="xsd:string"/></message><message name="getAgeStringIn"><part name="name" type="xsd:string"/><part name="age" type="xsd:int"/></message><message name="getAgeStringOut"><part name="return" type="xsd:string"/></message></definitions>

Obrigad
Pankaj

questionAnswers(3)

yourAnswerToTheQuestion