publicar mensaje en el servicio web
Frecuentes
Visto 126 veces
0
Good day! I have a problem to post register message to web service. I have never been worked with wsdl in ios and so there is a code
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 service post me an error 415 that means content type error. Is there any solutions?
1 Respuestas
0
I think a mistake was made there
value:@"xmlns:tns=""http://tempuri.org/"
^^
respondido 15 nov., 13:08
What are you writing in your request ? I believe @"tempuri.org/"
may not be right. Try with @"text/plain"
for exemple ? - brillantex
Can you please show what's in your request's body ? Or the code from your buildPostBody método? - brillantex
that is the problem - i don't have equest's body i thought it will be automatically created. how can i write the body? - Paul
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ios web-services http-post or haz tu propia pregunta.
how can i post message body? i did this on this tutorial: raywenderlich.com/2965/… - Pavel
download that sample code and check whether it working - Preetam Jadakar
i have had tried it already. there is something else - Pavel