Question Olivier Champion · May 20, 2018

https config error xml.reader

Hi

on this code

set reader=##class(%XML.Reader).%New()
    set statuscode=reader.OpenFile(file)
    if $$$ISERR(statuscode) {do $System.Status.DisplayError(statuscode) quit $$$NULLOREF}

I got this error "unable to open file 'https://www.musicxml.org/dtds/partwise.dtd'"

or using the xml schema wisard i got the error  https is active but no configuration found.

where do I have configure it?

Comments

Robert Cemper · May 20, 2018

To use httpS://  in xml schema wizard you need to definde an  SSL configuration in  SMP  System > Security Management > SSL/TLS Configuration.

0
Robert Cemper · May 20, 2018

but I doubt that XML Schema Wizard will do anything useful with a .dtd definition.

0
Eduard Lebedyuk · May 21, 2018

It's a url not a file so you need to use OpenURL for that:

set reader=##class(%XML.Reader).%New()
set httprequest=##class(%Net.HttpRequest).%New()
set httprequest.SSLConfiguration="...."
set status=reader.OpenURL("https://.....",,httprequest)

But as @Robert Cemper pointed out it's a dtd file and so would not be parsed by XML reader.

If you want to generate classes automatically from XML schema, you'll need XSD files. Documentation.

0