Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9140033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:27:48+00:00 2026-06-17T09:27:48+00:00

I want to call SOAP request in iphone. But I do not know how

  • 0

I want to call SOAP request in iphone. But I do not know how to do it. Please give me some code of calling SOAP request in iphone as below code?

<soap:Envelope 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

    <soap:Header>
        <wsse:Security 
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
            xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
            xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" soap:mustUnderstand="1">
                <wsse:UsernameToken 
                    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
                    xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                            <wsse:Username>cbrown</wsse:Username>
                            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome</wsse:Password></wsse:UsernameToken>
        </wsse:Security>
    </soap:Header>
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/bpel/aubi/mobile/Worklist">
        <ns1:WorklistRetrievalREQ>
            <ns1:WorklistType>HR_OFFER</ns1:WorklistType>
            <ns1:Status>TODO</ns1:Status>
            <ns1:Mode/>
        </ns1:WorklistRetrievalREQ>
    </soap:Body>
</soap:Envelope>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:27:48+00:00Added an answer on June 17, 2026 at 9:27 am

    This is how you can call SOAP web services :

    In your .h file declare :

        NSMutableData       *webPortFolio;
        NSMutableString     *soapResultsPortFolio;
        NSURLConnection     *conn;
    
        //---xml parsing---
    
        NSXMLParser         *xmlParserPortFolio;
        BOOL                elementFoundPortFolio;
        NSMutableURLRequest *req;
    
        NSString            *theXMLPortFolio;
        NSString            *strSoapMsg;
        UIAlertView         *alertView;
    

    In your .m file use the following code:

    -(void)loadPortfolioData
    {
    
        strSoapMsg = [[NSString alloc] initWithFormat:
                      @"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
                      "<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\">"
                      "<soap12:Body>"
                      "<GetPortfolioList xmlns=\"http://tempuri.org/\">"
                      "<EmailID>%@</EmailID>"
                      "<Password>%@</Password>"
                      "<TradingGameID>%d</TradingGameID>"
                      "</GetPortfolioList>"
                      "</soap12:Body>"
                      "</soap12:Envelope>",gameUserName,gamePassword,gameid];
    
    
        //---print it to the Debugger Console for verification---
        NSLog(@"soapMsg..........%@",strSoapMsg);
    
        NSURL *url = [NSURL URLWithString:@"http://www.abc.sirus/Process/process.asmx"];
        req = [NSMutableURLRequest requestWithURL:url];
    
        //---set the headers---
    
        NSString *msgLength = [NSString stringWithFormat:@"%d",[strSoapMsg length]];
        [req addValue:@"application/soap+xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
        [req addValue:@"http://tempuri.org/GetPortfolioList"  forHTTPHeaderField:@"SOAPAction"];
        [req addValue:msgLength forHTTPHeaderField:@"Content-Length"];
    
        //---set the HTTP method and body---
    
        [req setHTTPMethod:@"POST"];
        [req setHTTPBody: [strSoapMsg dataUsingEncoding:NSUTF8StringEncoding]];
    
        // [activityIndicator startAnimating];
    
        conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];
        if (conn)
        {
            webPortFolio = [[NSMutableData data] retain];
        }
    }
    

    And to handle the response you can use following functions :

    -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
    {
        [webPortFolio setLength:0];     
    }
    
    -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
    {
        [webPortFolio appendData:data];
    }
    
    -(void) connection:(NSURLConnection *) connection didFailWithError:(NSError *) error
    {
    
        NSLog(@"error...................%@",[error description]);
        [webPortFolio release];
        [connection release];
    }
    
    -(void) connectionDidFinishLoading:(NSURLConnection *) connection
    {
    
        //Check the request and returns the response.
    
        NSLog(@"DONE. Received Bytes: %d", [webPortFolio length]);
    
        theXMLPortFolio = [[NSString alloc] 
                          initWithBytes: [webPortFolio mutableBytes] 
                          length:[webPortFolio length] 
                          encoding:NSUTF8StringEncoding];
    
        //---shows the XML---
    
        NSLog(@"shows the XML %@",theXMLPortFolio);
        [theXMLPortFolio release];    
    
        if(xmlParserPortFolio)
        {
            [xmlParserPortFolio release];
        }
        xmlParserPortFolio = [[NSXMLParser alloc] initWithData: webPortFolio];
        [xmlParserPortFolio setDelegate: self];
        [xmlParserPortFolio setShouldResolveExternalEntities:YES];
        [xmlParserPortFolio parse];
        [webPortFolio release];
        [connection release];
    }
    
    //---when the start of an element is found---
    -(void)  parser:(NSXMLParser *) parser 
    didStartElement:(NSString *) elementName 
       namespaceURI:(NSString *) namespaceURI 
      qualifiedName:(NSString *) qName
         attributes:(NSDictionary *) attributeDict
    {
    
        if( [elementName isEqualToString:@"GetPortfolioListResult"])
        {
            if (!soapResultsPortFolio)
            {
                soapResultsPortFolio = [[NSMutableString alloc] init];
            }
            elementFoundPortFolio = TRUE;
            NSLog(@"Registration...%@",soapResultsPortFolio);
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {
            elementFoundPortFolio = TRUE;
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {
            elementFoundPortFolio = TRUE;
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {
            elementFoundPortFolio = TRUE;
        }
    
    }
    
    -(void)parser:(NSXMLParser *) parser foundCharacters:(NSString *)string
    {
        if (elementFoundPortFolio)
        {
            [soapResultsPortFolio appendString: string];
        }      
    }
    
    - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
    {
        NSLog(@"Parser error %@ ",[parseError description]);
    }
    
    
    //---when the end of element is found---
    -(void)parser:(NSXMLParser *)parser 
    didEndElement:(NSString *)elementName 
     namespaceURI:(NSString *)namespaceURI 
    qualifiedName:(NSString *)qName
    {
        if ([elementName isEqualToString:@"GetPortfolioListResult"])
        {          
            NSLog(@"display the soap results%@",soapResultsPortFolio);
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {          
            //Perform required action
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {
            //Perform required action
        }
        else if([elementName isEqualToString:@"your_tag_name"])
        {
            //Perform required action
        }
    
        [soapResultsPortFolio setString:@""];
        elementFoundPortFolio = FALSE;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to imitate the following SOAP request using Zend Framework but I don't
I want to call a soap webservice as below. I added internet permission to
How can I call a web service directly without using soap? I basically want
I want to call a soap web service written asp.net(C#).Actually,the web method takes one
I have the following Ajax call: function ajaxCall(soap, url){ // Post SOAP request. $.ajax({
I have make a soap-call with Savon. This works fine and give the following
I have a PHP file, which sends SOAP request $client = new SoapClient('http://xyz'); $client->call('example',
I'm using the Savon gem to make a SOAP request using code similar to
I need to test some XML requests manually, i.e. I want to call a
I have constructed a full soap envelope soapEnvelopeXML and I can see the call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.