publicar mensaje en el servicio web

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:@""];
    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    [request setRequestMethod:@"Register"];
    [request addRequestHeader:@"Content-type" value:@"xmlns:tns="""];
//    [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?

preguntado el 15 de noviembre de 13 a las 08:11

how can i post message body? i did this on this tutorial:… -

download that sample code and check whether it working -

i have had tried it already. there is something else -

1 Respuestas

I think a mistake was made there


respondido 15 nov., 13:08

What are you writing in your request ? I believe @"" 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 or haz tu propia pregunta.