• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Handle mulitple exceptions from xml in Coldfusion

Explorer ,
Oct 30, 2013 Oct 30, 2013

Copy link to clipboard

Copied

Hi All

How to handle the multiple exceptions in the SOAP Response block as shown below

tes.png

currently i can the handle the description of the first exception by

['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception']['description']['XmlText']

How to access both the exception description in the same manner ??

Views

550

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Nov 01, 2013 Nov 01, 2013

@gokul,

If you dump ['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'] . You will find an array object. So simply looping over the array object you can get your attribute values.

Example:

['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'][1]

['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'][2]

Will give you first and second exception object.

Votes

Translate

Translate
Enthusiast ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

You should be able to loop through the structure when using XMLSearch() to access the parent object, only processing the "exception" items. Can you post the entire XML fragment?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 01, 2013 Nov 01, 2013

Copy link to clipboard

Copied

LATEST

@gokul,

If you dump ['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'] . You will find an array object. So simply looping over the array object you can get your attribute values.

Example:

['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'][1]

['soapenv:Envelope']['soapEnv:Body']['maintainUserResponse']['exception'][2]

Will give you first and second exception object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation