SOAP Messages on iPhone

Posted by CocoaNewBee on Stack Overflow See other posts from Stack Overflow or by CocoaNewBee
Published on 2010-03-11T18:08:11Z Indexed on 2010/03/13 6:05 UTC
Read the original article Hit count: 310

Filed under:
|
|
|

Hello everyone !!

I have to use several SOAP messages to get data from a web service. I got some examples how to do that but they all have the XML (http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/)

    // ----   LOGIN   -----
NSString *soapMessage = [NSString stringWithFormat:                         
@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\n"
"<soap12:Body>\n"
"<Login xmlns=\"http://tempuri.org/\">\n"
"<sUserID>USER</sUserID>\n"
"<sUserPw>PASSWORD</sUserPw>\n"
"<sDomain>SERVER</sDomain>\n"
"</Login>\n"
"</soap12:Body>\n"
"</soap12:Envelope>\n"
];
NSString *urlToSend  = [[NSString alloc] initWithString:@"http://SERVER/DIRECTORY/WSDL_FILE.ASMX"];
NSString *callTOMake = [[NSString alloc] initWithString:@"http://WEBSERVER/Login"];

TWO questions: 1) Does it make sense to read the SOAP Message from a class or a file into xcode?? or sould I just define them thru the code ??

2) I used SOAPUI & .NET to query the service. It works fine... but when I do it from the iphone simulator it returns the following:

2010-03-10 15:13:54.773 Hello_SOAP[91204:207] soap:ClientServer did not recognize the value of HTTP Header SOAPAction: http://WEBSERVER/DIRECTORY/Login

How can I figure out what the issue is that's causing the said error on the simulator??

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode