検索

記事
· 2023年8月17日 1m read

Download Globals as XML using CSP

Inspired by a Question from @Evgeny Shvarov and a Reply from @Ashok Kumar T
I have created a base for Global download as XML file

How to use:
 
just call the page like http://<your_server>/csp/samples2/dc.Gdown.cls?GBL=global_name

gbl-name  without the initial ^ (caret)

The output has a default name <global_name>.XML  Your choice is available.

Known Limits:

  • you have to install it at your sourcing server
  • it is not tested/working across namespaces
  • there is no partial download
  • error handling is just basic or missing

There is space for personal improvements.

and this is it:

Class dc.Gdown Extends %CSP.Page
{

ClassMethod OnPreHTTP() As %Boolean [ ServerOnly = 1 ]
{
  #dim %response as %CSP.Response
  set %rcc=$Get(%request.Data("GBL",1),"")
  if %rcc]"" {
    set %rcd=$D(@("^"_%rcc))
    if %rcd {
      set %response.ContentType="application/xml"
      set %response.Headers("Content-Disposition")="attachment; filename="""_%rcc_".xml"""
    }
  }
  else  { 
    set %rcd=0
    set %rcc="Parameter GBL"
  }  
  quit $$$OK
}

ClassMethod OnPage() As %Status
{
  if '%rcd {
  &html<<html><head></head><body>
   #(%rcc)# &gt;&gt; not found </body></html>>
  quit $$$OK
  }
  do $system.OBJ.Export(%rcc_".GBL")
  Quit $$$OK
}
}





 





 

2 Comments
ディスカッション (2)2
続けるにはログインするか新規登録を行ってください
質問
· 2023年8月16日

Web client from SOAP Service

I created a web service and used the Studio SOAP Wizard to generate a client from the WSDL file of the service. But the client is throwing the error as shown below

 WebServiceClientClass '' could not be instantiated, or the WebServiceURL Location could not be determined

What have I missed?

Is there a better way to create a client?

2 Comments
ディスカッション (2)2
続けるにはログインするか新規登録を行ってください
質問
· 2023年8月15日

Zen reports documentation or learning material question

We need to generate a PDF file from an HL7 message as it passes through an Ensemble production. Looking for examples, tutorials, documentation aligned to our scenario.

We are currently using Ensemble (so can't use InterSystems Reports at the moment). Thinking Zen reports...

We can get from HL7 to XML OK, following Introduction to InterSystems Health Connect - YouTube (see c.1:11:00-1:13:00)

We can follow the Zen tutorials to a point - but they mostly get the data being presented in the report from SQL queries rather than from an in-bound XML stream. And as they illustrate using web-pages, we are struggling to see how to send the find the generated PDF (or whatever) so we can send it on to a downstream system.

Searching the documentation, learning site, YouTube channel, etc is getting me InterSystems Reports materials, rather than Zen. Anyone know of a tutorial or documentation that is more closely aligned to our intended use?

(Specifically ORU_R01 lab results, if that makes a difference.)

2 Comments
ディスカッション (2)1
続けるにはログインするか新規登録を行ってください
質問
· 2023年8月9日

VS Code : unable to save file to server

When I open a class in VS Code and I want to save it I'm getting the following error : Non-JSON response to /api/atelier/v7/DEV/doc/API.Mollie.Execute.cls?ignoreConflict=0 request. Is the web server suppressing detailed errors?

Also I always get a popup when I open VS Code "The extension wants to sign in using InterSystems Server Credentials."

3 Comments
ディスカッション (3)4
続けるにはログインするか新規登録を行ってください
質問
· 2023年8月4日

Azure Databricks JDBC connection to Intersystems

We encountered difficulties while attempting to establish a JDBC connection to Intersystems using AZURE Databricks, resulting in an inability to retrieve data. The JDBC version utilized was intersystems-jdbc-3.3.1.jar. If anyone has successfully employed Databricks for establishing a connection, we would appreciate information regarding the libraries you used

 

Error Message:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 3) (10.140.70.71 executor driver): java.sql.SQLException: [SQLCODE: <-25>:<Input encountered after end of query>]

7 Comments
ディスカッション (7)3
続けるにはログインするか新規登録を行ってください