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 6782177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:42:37+00:00 2026-05-26T16:42:37+00:00

this is the web service method and the info retrieved… why cant the string

  • 0

this is the web service method and the info retrieved…
method SOAP 1.1

method HTTP POST

data retrieved

why cant the string of words in UserFullname cant be retrieved?

xmlparsing in xcode:

        //connect to webservice
    NSString *soapMsg = [NSString stringWithFormat:
                         @"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
                         "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
                         "<soap:Body>"
                         "<RetrieveUser xmlns=\"http://dev.cel.nie.edu.sg/\">"
                         "<password>%@</password>"
                         "</RetrieveUser>"
                         "</soap:Body>"
                         "</soap:Envelope>", passWordField.text];


    //requesting
    NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://dev.cel.nie.edu.sg/projects/VideoApp/VideoWebService.asmx"]];
    //message length??
    NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMsg length]];

    //building the post xml
    [req addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
    [req addValue:@"http://dev.cel.nie.edu.sg/RetrieveUser" forHTTPHeaderField:@"SOAPAction"];
    [req addValue:msgLength forHTTPHeaderField:@"Content-Length"];
    [req setHTTPMethod:@"POST"];
    [req setHTTPBody:[soapMsg dataUsingEncoding:NSUTF8StringEncoding]];

    //connection
    conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];

    //[req release];
    if(conn){
        webData = [[NSMutableData data] retain];

    }




        -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
[webData setLength:0];


        }

        -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
[webData appendData:data];

        }

        -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
[conn release];
[webData release];

NSString * errorString = [NSString stringWithFormat:@"Please connect to the internet to continue."];

UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"" message:errorString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[errorAlert show];
[errorAlert release];
        }

        -(void)connectionDidFinishLoading:(NSURLConnection *)connection{


xmlParser = [[NSXMLParser alloc] initWithData:webData];
[xmlParser setDelegate:self];
[xmlParser setShouldProcessNamespaces:NO];
[xmlParser setShouldReportNamespacePrefixes:NO];
[xmlParser setShouldResolveExternalEntities:NO];
[xmlParser parse];

[conn release];
[webData release];
        }

        -(void)parserDidStartDocument:(NSXMLParser *)parser{
        }

        -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{

//retrieve lecturer's ID, name and photo according to the password. Retrieve from web service

currentElement = [elementName copy];
if ([elementName isEqualToString:@"UserID"]) {
    // clear out our story item caches...
    currentID = [[NSMutableString alloc] init];
    currentName = [[NSMutableString alloc] init];
    lectFullName = [[NSMutableString alloc] init];
    currentImg = [[NSMutableString alloc] init];

}

        }

        -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
// save the characters for the current item...
if ([currentElement isEqualToString:@"UserID"]) {
    [currentID appendString:string];

}else if([currentElement isEqualToString:@"Username"]){
    [currentName appendString:string];
    NSLog(@"lect username: %@", currentName);


}else if([currentElement isEqualToString:@"UserFullname"]){
    [lectFullName appendString:string];
    NSLog(@"lectname: %@", lectFullName);

}else if([currentElement isEqualToString:@"UserImage"]){
    [currentImg appendString:string];
    NSLog(@"lect img: %@", currentImg);

}

        }


        -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{

        }

Output:

        2011-11-04 16:45:16.314 MyLauncher[4538:707] lect username: tom
        2011-11-04 16:45:16.317 MyLauncher[4538:707] lect img: http://dev.cel.nie.edu.sg/projects/VideoApp/LecturerImages/ID2--DaPe--2011-11-03-Ti7e--04-07-38.jpg

i just dont understand y its not retrieving the data string for UserFullname… is there some error in my codes or something? thx for ur help…

  • 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-05-26T16:42:38+00:00Added an answer on May 26, 2026 at 4:42 pm

    Ok solved it… in the ftp server i not only need to add the webservice .asmx file but in the ftp http docs folder I have to put the webservice .dll and .pbd files into the bin folder…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a web service: http://machine001/Services/conversionService.asmx This web service has one method in it
I am getting this error when calling a web service method which writes to
I am using Cache in a web service method like this: var pblDataList =
I am developing web method for webservice in java. In this web method I
I have this web service : using System.Web.Services; namespace Contracts { [WebService(Namespace = http://tempuri.org/)]
I have a simple web service like this: @WebService public class MyWebService { @WebMethod
I am executing a method of a SOAP web service which receives 3 string
All the generated webservice-stubs from our backend have an equals-method similar to this one:
I have a Web Service and an Android application that uses this web service.
In sharepoint my web part is calling a web service. This web service does

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.