再会!我在将注册消息发布到 Web 服务时遇到问题。我从来没有在 ios 中使用过 wsdl,所以有一个代码
NSURL *url = [NSURL URLWithString:@"http://monah-service.azurewebsites.net/soap"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setRequestMethod:@"Register"];
[request addRequestHeader:@"Content-type" value:@"xmlns:tns=""http://tempuri.org/"];
// [request setPostValue:@"Register" forKey:@"name"];
[request setPostValue:[loginTextField text] forKey:@"email"];
[request buildPostBody];
// [request buildRequestHeaders];
[request setDelegate:self];
[request startAsynchronous];
Web 服务向我发送错误 415,表示内容类型错误。有什么解决办法吗?