× 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.



There is a whole lot wrong here Darryl- starting with the XML you supplied being invalid - I hope that is just a paste error. I ran it through a couple of XML validators and both rejected it - mostly I think the omission of quotes around the namespace references.

But once we get past that ...

Namespaces are supported by XML-INTO but you have to specify it correctly. It is ns=remove _not_ ns=*remove.

Also your XML-INTO never specified the source document - you appear to have tried to specify a path.

I placed the xml into a varchar variable called xmlData and then parsed it into your DS with this:

xml-into Envelope %xml( xmlData: 'case=any ns=remove');

And it works just fine.

I can't comment on your DATA-INTO attempt because I'm not familiar with the parser you used - MDRFRAME(PARSER)- I'm surprised anyone bothered to write one since we already have XML-INTO.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



On Jun 27, 2025, at 12:02 PM, dfreinkel@xxxxxxxxxxxxxxxxx wrote:

I have the following structure returned by a web service. I am on a v7.4
system.



The named spaces are not supported by IBMi, at least on this release.



How can I get this to work?



TIA, Darryl Freinkel



<?xml version='1.0' encoding='UTF-8'?>

<S:Envelope xmlns:S=http://schemas.xmlsoap.org/soap/envelope/>

<S:Body>

<ns2:sendFaxResponse xmlns:ns2=http://ws.xm.faxserver.com/>

<result>


<broadcastId>AC2ED502-7B51-4CDF-8FD6-410D6C02F15A-12143998-BR</broadcastId>


<transactionId>AC2ED502-7B51-4CDF-8FD6-410D6C02F15A-12144001-OF</transaction
Id>

</result>

</ns2:sendFaxResponse>

</S:Body>

</S:Envelope>





I have created the following defined data structure.



Dcl-ds Envelope qualified;

Dcl-DS Body ;

Dcl-ds sendFaxResponse;

Dcl-DS Result ;

broadcastId varchar(128);

transactionId varchar(128);

End-DS;

End-DS;

end-ds;

End-DS;



I have tried using the following ways to get the data into the data
structure.



data-into sendFaxResponse %data('': 'case=convert +

countprefix=num_ +

allowmissing=yes allowextra=yes')

%parser('MDRFRAME(PARSER)':handle);

or

xml-into Envelope %xml(Envelope.body.sendFaxResponse: 'case=any
ns=*remove');









Darryl Freinkel

A4G

Telephone: 770.321.8562



--
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.



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-2025 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.