× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I was going to tell you that the path was wrong (has to include the top level being drilled into) and - as you have discovered - the top level DS name doesn't have to match the document.

My problem was that the dang thing ran but produced an empty structure - which is why I hadn't responded until now.

Mine looks like yours so goodness knows what i've done wrong. Trying to work out how I get a "missing" error when I've said to allow missing!


JOn

On Jan 6, 2021, at 10:43 AM, Brad Stone <bvstone@xxxxxxxxx> wrote:

I think I figured it out.. here's what I did:

dcl-ds Response;
ErrorCode char(1024);
ErrorMessage char(1024);
end-ds;

xml-into(e) Response
%xml(%trimr(payloadFQFile):'doc=file case=any ns=remove ' +
'allowextra=yes ' +
'path=Envelope/Body' +
'/COREEnvelopeBatchResultsAckSubmissionResponse');

On Wed, Jan 6, 2021 at 9:18 AM Brad Stone <bvstone@xxxxxxxxx> wrote:

Looking for some assistance here.. .having a bugger of a time with some
XML parsing... I've been doing JSON so much lately I think I've forgotten
something.

Here's the XML:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
<soap:Body>
<ns3:COREEnvelopeBatchResultsAckSubmissionResponse xmlns:[other stuff
here]>
<ns3:TimeStamp>2021-01-06T15:10:03Z</ns3:TimeStamp>
<ns3:SenderID>Company1</ns3:SenderID>
<ns3:ReceiverID>Company2</ns3:ReceiverID>
<ns3:CORERuleVersion>2.2.0</ns3:CORERuleVersion>
<ns3:ErrorCode>Success</ns3:ErrorCode>
<ns3:ErrorMessage>None</ns3:ErrorMessage>
</ns3:COREEnvelopeBatchResultsAckSubmissionResponse>
</soap:Body>
</soap:Envelope>

All I really want is the ErroCode and ErrorMessage.

I've got this defined:
dcl-ds COREEnvelopeBatchResultsAckSubmissionResponse;
ErrorCode char(1024);
ErrorMessage char(1024);
end-ds;

code:
xml-into(e) COREEnvelopeBatchResultsAckSubmissionResponse
%xml(%trimrFile):'doc=file case=any ns=remove ' +
'allowextra=yes ' +
'path=Envelope/Body');

I'm sure it's something simple that I am just forgetting... I only found
one other question like this that Jon and Barbara answered, but I must
still be missing something...

Does the DS NEED to be qualified? (I didn't because the name is so
frigggin long lol).

Thanks!

I keep getting error 353.

Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any
Cloud Provider!

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.