Hello everyone!
In my Web Services Transformer, after sending a request I am getting the following response:
<ns0:RetrieveTicketRS xmlns:ns0 = "http://company/CORPORATE/RetrieveTicketRS">
<ns0:Errors>
<ns0:Error Code = "310.PT" ShortText = "Not Found" Type = "F">401 - </ns0:Error>
</ns0:Errors>
</ns0:RetrieveTicketRS>
From the response I am capturing the output with the following xpath:
/ns0:RetrieveTicketRS/ns0:Errors/ns0:Error/text() -->"401 - "
/ns0:RetrieveTicketRS/ns0:Errors/ns0:Error/@ShortText -->"Not Found"
In DataStage version 8 this works fine, but after migrating this job to version 9.1 I can no longer capture attributes (those with @). This is what happens:
/ns0:RetrieveTicketRS/ns0:Errors/ns0:Error/text() -->"401 - "
/ns0:RetrieveTicketRS/ns0:Errors/ns0:Error/@ShortText --> empty
Has anyone experienced this? Known bug, workaround?
Thanks in advance!
Pedro
Capture attribute from webservice response
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 35
- Joined: Wed Jun 15, 2005 9:27 am
Anything is possible, but that would be a blatantly horrible anomaly if it doesn't work in general......and I recall no problems that serious in 9.1....
I would check some additional things first....
a) check another simple test xml document...see if attributes are working for you at all.
b) send this snippet of xml to disk and look at it using a hex editor...make sure there aren't any bizarre characters in there where you are expecting spaces between the attributes
c) where is the repetition element...I suspect it is element "Error"....just something else to check.
Ernie
I would check some additional things first....
a) check another simple test xml document...see if attributes are working for you at all.
b) send this snippet of xml to disk and look at it using a hex editor...make sure there aren't any bizarre characters in there where you are expecting spaces between the attributes
c) where is the repetition element...I suspect it is element "Error"....just something else to check.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>