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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:13:01+00:00 2026-06-09T22:13:01+00:00

I have this response: <soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/> <soap:Body> <ns2:SurfaceElementListResponse xmlns:ns2=http://isiows.isiom.fr/schema/DmdCreation xmlns:ns3=http://isiows.isiom.fr/schema/Error xmlns:ns4=http://isiows.isiom.fr/schema/DmdDetail> <SurfaceElementListResult> <idSurfaceElement>9482</idSurfaceElement> <name>R04-</name>

  • 0

I have this response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:SurfaceElementListResponse xmlns:ns2="http://isiows.isiom.fr/schema/DmdCreation" xmlns:ns3="http://isiows.isiom.fr/schema/Error" xmlns:ns4="http://isiows.isiom.fr/schema/DmdDetail">
         <SurfaceElementListResult>
            <idSurfaceElement>9482</idSurfaceElement>
            <name>R04-</name>
            <type>NIVEAU</type>
         </SurfaceElementListResult>
         <SurfaceElementListResult>
            <idSurfaceElement>9486</idSurfaceElement>
            <name>Zone A</name>
            <type>ZONE</type>
         </SurfaceElementListResult>
      </ns2:SurfaceElementListResponse>
   </soap:Body>
</soap:Envelope>

I am waiting each object to be deserialized to NSDictionary, as it works on all the other WS response except one above.
In comparison with other responses, in SOAP.m:+ (id) deserialize: (CXMLNode*) element method, all the responses for the statement NSString* type = [Soap getNodeValue:element withName:@"type"]; return nil, so it is continues with return [Soap deserializeAsDictionary:element]; and I get the necessary result.
In my case when I reach to NSString* type = [Soap getNodeValue:element withName:@"type"]; the statement returns “NIVEAU” for the first object and “ZONE” for the other object, which does not allow the application go and execute [Soap deserializeAsDictionary:element]; and I get a string object instead of NSDictionary as parse result.

Could you please help me solving this issue?

  • 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-09T22:13:02+00:00Added an answer on June 9, 2026 at 10:13 pm

    In

    // Deserialize an object as a generic object
    + (id) deserialize: (CXMLNode*) element{
    
        // Get the type
        NSString* type = [Soap getNodeValue:element withName:@"type"];
    

    looking into the [Soap getNodeValue]… I figured out, that the use of this function is rather too general. It is used as for getting the attributes of the field, as the values of the fields.

    // Gets the value of a named node from a parent node.
    
    + (NSString*) getNodeValue: (CXMLNode*) node withName: (NSString*) name {
    
        // Set up the variables
        if(node == nil || name == nil) { return nil; }
        CXMLNode* child = nil;
    
        // If it's an attribute get it
        if([node isKindOfClass: [CXMLElement class]])
        {
            child = [(CXMLElement*)node attributeForName: name];
            if(child != nil) {
                return [child stringValue];
            }
        }
    
        // Otherwise get the first element
        child = [Soap getNode: node withName: name];
        if(child != nil) {
            return [child stringValue];
        }
        return nil;
    }
    

    In this care I created a new method which is getting only the attribute value:

    // Gets the value of a node attribute
    + (NSString*) getNodeAttributeValue: (CXMLNode*) node withName: (NSString*) name{
        // Set up the variables
        if(node == nil || name == nil) { return nil; }
        CXMLNode* child = nil;
    
        // If it's an attribute get it
        if([node isKindOfClass: [CXMLElement class]])
        {
            child = [(CXMLElement*)node attributeForName: name];
            if(child != nil) {
                return [child stringValue];
            }
        }
        return nil;
    }
    

    and replaced it in Soap:deserialize:

    // Deserialize an object as a generic object
    + (id) deserialize: (CXMLNode*) element{
    
        // Get the type
        NSString* type = [Soap getNodeAttributeValue:element withName:@"type"];
    //  NSString* type = [Soap getNodeValue:element withName:@"type"];
        if(type == nil || type.length == 0) {
    

    And it works perfectly for me, till now. Hope it will help others with the same situation.

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

Sidebar

Related Questions

I have the following SOAP response: <?xml version=1.0?> <env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/> <env:Header/> <env:Body> <GetSalesResponse xmlns=http://api.dgm-uk.com/Publisher/schemas>
I have a soap request returning a response like below: <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
Here is a sample soap response from my SuperDuperService: <soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <soap:Body>
I have a XML Like this: <?xml version=1.0 encoding=utf-8?> <soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <soap:Body>
I have an SOAP response that looks similar to this: <?xml version=1.0 encoding=UTF-8?> <soapenv:Envelope
I have this response from a Java web service: HTTP/1.1 200 OK Date: Mon,
I have this JSON response string: {d:{\ID_usuario\:\000130\,\Nombre\:null,\Vipxlo\:0,\Provmun\:null,\Descuentos\:null,\Listaviplocal\:null}}` With this code: - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
If i have this json response {error:repeated} Why the alert is not showed? It
I have this code in the end of link button click: Response.ContentType = application/zip;
I have this form. Basically what I want is to send a auto-response with

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.