對於除了作爲參數的對象之外的wcf webservice方法的請求應該如何?我有一個接受類employee的對象的方法。下面的請求給出了一個錯誤:服務器無法處理請求。 --- >未將對象引用設置爲對象的實例。將對象傳遞給iphone中的wcf webservice
int id1=100;
NSString *soapMsg = [NSString stringWithFormat:
@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"<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/\">"
"<soap:Body>"
"<TestEmployee xmlns=\"http://body.com/\">"
"<Employee>"
"<id>%d</id>"
"<Name>%@</Name>"
"</Employee>"
"</TestEmployee>"
"</soap:Body>"
"</soap:Envelope>",id1,@"abc"];
非常感謝UPT!這是有益的.. – Kunila