View Poll Results:

Voters
0. You may not vote on this poll
  • 0 0%
Results 1 to 3 of 3
  1. #1


    Member Since
    Mar 21, 2012
    Posts
    2
    Post How to send HTTPS synchronous request to server using SOAP web services
    NSString *urlString=@"http://projdemo.com/MobileWebServices/Service.asmx";
    soapRequestStr = [self CreateRequest];
    NSString* soapAction;
    soapAction =@"http://www.projdemo.com/FetchAll";
    urlRequest=NULL;
    responseData=NULL;
    httpBodyData=[soapRequestStr dataUsingEncoding: NSUTF8StringEncoding];
    url=[[NSURL alloc]initWithString: urlString];
    urlRequest = [NSMutableURLRequest requestWithURL:url];
    [urlRequest setHTTPMethod:@"POST"];
    [urlRequest setHTTPBody:httpBodyData];
    [urlRequest setValue:@"projdemo.com" forHTTPHeaderField:@"Host"];
    [urlRequest setValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
    [urlRequest setValueNSString stringWithFormat:@"%d",[soapRequestStr length]]
    forHTTPHeaderField:@"Content-Length"];
    [urlRequest setValue:soapAction forHTTPHeaderField:@"SOAPAction"];
    responseData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil
    error:nil];
    response = nil;
    error = nil;
    responseString=NULL;
    responseString = [[NSString alloc] initWithData:responseData
    encoding:NSASCIIStringEncoding];
    NSLog(@"data is %@",responseData);
    NSLog(@"Response string is %@",responseString);


    soapRequestStr is the XML file formatted string we are going to pass to server. Here its working fine, when URL changed to https its getting response as

    Error Response:

    <html><head>
    <title>400 Bad Request</title>
    </head><body>
    <h1>Bad Request</h1>
    <p>Your browser sent a request that this server could not understand.<br />
    </p>
    <hr>
    <address>Apache/2.2.20 (Ubuntu) Server at projdemo.com Port 443</address>
    </body></html>

    My problem is how to send soap request to https server

  2. #2

    RavingMac's Avatar
    Member Since
    Jan 07, 2008
    Location
    In Denial
    Posts
    7,892
    Specs:
    4GB Mac Mini 2012, 13" MBA, 15" MacBook Pro OSX 10.7, 32 GB iPhone 3GS, iPad2 64gb 3G
    POLL Deleted

    You will get better response and help by clearly stating your question/request for help at the beginning of your post.
    I've always wanted to be smart, handsome and modest. But, I guess I'll have to be satisfied with two out of three . . .

  3. #3


    Member Since
    Mar 21, 2012
    Posts
    2
    Quote Originally Posted by Razormac View Post
    POLL Deleted

    You will get better response and help by clearly stating your question/request for help at the beginning of your post.
    I need to send Synchronous request to https server, i am able to send sync request to http server, but same code is not working for https server

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Viewing https:// secure web pages issue
    By ShadowDan in forum Switcher Hangout
    Replies: 16
    Last Post: 01-04-2012, 10:30 AM
  2. Adium ICQ Registration request send
    By coolman in forum OS X - Apps and Games
    Replies: 0
    Last Post: 11-27-2011, 04:10 PM
  3. Help with SL Server Web Services
    By Goetch in forum OS X - Operating System
    Replies: 0
    Last Post: 12-16-2009, 02:09 PM
  4. How to send message from iphone to web server ?
    By manvin in forum OS X - Apps and Games
    Replies: 2
    Last Post: 08-12-2009, 04:43 AM
  5. Web page server request problem (online banking)
    By echosa in forum OS X - Apps and Games
    Replies: 0
    Last Post: 05-08-2007, 11:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •