Pesquisar

Pergunta
· Abr. 9

Validate XML message against XSD schema

I'm trying to validate a %Stream.GlobalCharacter with an XML content against an XSD schema, to validate mandatory nodes, etc...

I'm trying to use the Ens.Util.XML.Validator class, as suggested on this post:

https://community.intersystems.com/post/validate-xml-message-against-xsd...

However, when calling the ValidateStream method, if schemaSpec is left empty, it just validates that is a "valid XML".

When specifying anything on schemaSpec, i receive the error "SAX XML Parser Error: Unable to Resolve SystemId"

Any examples  with the right specification on schemaSpec for ValidateStream? (a filepath to the XSD file, for example, or an XML schema imported on the namespace)

 

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar
Pergunta
· Abr. 9

Validacion de un XML contra un esquema XSD

Estoy intentando validar el contenido de un XML contra un esquema XSD, para validar la estructura (nodos obligatorios, etc...)

Estoy intentando utilizar la clase Ens.Util.XML.Validator, como se sugiere en este post:

https://community.intersystems.com/post/validate-xml-message-against-xsd...

Pero al invocar al metodo ValidateStream, si en el schemaSpec le dejo el parametro vacio, simplemente valida que sea una estructura XML correcta.

Al pasarle cualquier valor en schemaSpec, da un error de "SAX XML Parser Error: Unable to Resolve SystemId"

 

¿Algun ejemplo de como indicar el schemaSpec en la validacion? (la ruta del XSD en el disco, por ejemplo, o un esquema XML cargado en el namespace)

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar
Artigo
· Abr. 8 2min de leitura

Setting Up an ODBC/JDBC Linked Table Connection to MySQL from Iris

Due to MySQL's interpretation of SCHEMA differing from the common SQL understanding (as seen in IRIS/SQL Server/Oracle), our automated Linked Table Wizard may encounter errors when attempting to retrieve metadata information to build the Linked Table.

(This also applies to Linked Procedures and Views)

When attempting to create a Linked Table through the Wizard, you will encounter an error that looks something like this:

ERROR #5535: SQL Gateway catalog table error in 'SQLPrimaryKeys'. Error: ' SQLState: (HY000) NativeError: [0] Message: [MySQL][ODBC 8.3(a) Driver][mysqld-5.5.5-10.4.18-MariaDB]Support for schemas is disabled by NO_SCHEMA option
 

To create a Linked Table to a MySQL database which employs “no-schema” structure (the default behavior), please follow the instructions below:

  1. Create an SQL Gateway Connection:
  • Set up the SQL Gateway connection as usual.
  • Ensure the "Do not use delimited identifiers by default" checkbox is checked.
  • Click "Test Connection" to confirm the connection is successful.

  1. Use the Terminal based API to Create the Linked Table:
  • Utilize the following API $SYSTEM.SQL.Schema.CreateLinkedTable() The CreateLinkedTable() method  uses the following parameters:

CreateLinkedTable(dsn As %String, externalSchema As %String, externalTable As %String, primaryKeys As %String, localClass As %String = "User.LinkedClass", localTable As %String, ByRef columnMap As %String = "")

  • Example: In this example, we use the MySQL system table help_keyword with name as the primary key:

USER>do $SYSTEM.SQL.Schema.CreateLinkedTable("MyDSN", "", "help_keyword", "name", "User.LinkedClass", "LocalTable")

Please ensure all parameters are correctly specified to avoid any errors during the setup process.

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Abr. 8 2min de leitura

Ei Chat, o que está rolando com a minha Interoperabilidade?

E se você pudesse conversar em um chat para verificar o que acontece na Interoperabilidade, se há algum erro e até mesmo resolver alguns tipos de problemas?

Com o servidor MCP, você pode conectar qualquer um de seus Clientes MCP por exemplo, Claude, ao IRIS e pedir para verificar a Interoperabilidade.

O que você precisa é de uma configuração simples do Claude.

  • Instale o próprio Claude Desktop 
  • instale o uv, que ajuda com pacotes Python

As configurações do Claude na seção de Desenvolvedor podem ajudar a encontrar um arquivo de configuração

Com uma configuração simples, como aqui, requer apenas acesso ao IRIS, nada precisa ser instalado no IRIS.

{
  "mcpServers": {
    "iris": {
      "command": "uvx",
      "args": [
        "mcp-server-iris"
      ],
      "env": {
        "IRIS_HOSTNAME": "localhost",
        "IRIS_PORT": "1972",
        "IRIS_NAMESPACE": "USER",
        "IRIS_USERNAME": "_SYSTEM",
        "IRIS_PASSWORD": "SYS"
      }
    }
  }
}

Após reiniciar o Claude, ele deverá exibir que algumas ferramentas MCP estão agora disponíveis. Clicar ali mostrará todas as ferramentas disponíveis.

Com o Claude sabendo sobre as ferramentas disponíveis e, pela instrução (prompt) que você fornecer, ele pode selecionar qual ferramenta melhor se adapta para ajudar com a consulta.

 

Acho que funciona bem, vamos verificar se há erros.

Somos capazes de ver a resposta real da ferramenta. E o Claude analisou a saída e extraiu os erros que encontrou, sugerindo por que os erros podem acontecer e até oferecendo maneiras de resolvê-los.

Atualmente, a implementação deste Servidor MCP não oferece nenhuma capacidade de edição de código, não vamos pedir para corrigir o código. Mas podemos tentar recuperar a produção

Restart pode ajudar

Aqui estamos, tudo certo agora..

Bem, já que nossa produção está funcionando bem agora, vamos dar uma olhada nos dados que já podemos ter coletado.

Para ajudar com isso, o Claude usará uma ferramenta que pode executar consultas SQL.

Mesmo que eu tenha colocado o nome da classe em vez do nome da tabela, ele descobriu que não existe tal tabela, mas não desistiu e, em uma única sessão, conseguiu descobrir o nome real da tabela e buscar alguns dados.

Quando tenta obter mais informações sobre os dados coletados, tenta até adivinhar os nomes das colunas.

Encontrou as colunas reais, mas teve dificuldades com palavras-chave reservadas e não tentou usar "FOUND".

E com uma tentativa final...

Decidiu simplificar, mas usando o conhecimento sobre os nomes das colunas, acertou e forneceu um resumo.

 

Neste estágio, o MCP parece estar no início de sua jornada, mas ainda assim temos uma ferramenta muito boa.

Se você gostou desta ferramenta, por favor, vote na atual OpenExchange Contest

Discussão (0)1
Entre ou crie uma conta para continuar
Anúncio
· Abr. 8

Online Meetup with the Winners of the AI Programming Contest

Hi Community,

Let's meet at the online meetup with the winners of the AI Programming Contest: Vector Search, GenAI and AI Agents! It's a great opportunity to chat with the InterSystems Experts team and our contestants.

Winners' demo included!

Date & Time: Thursday, April 10, 12:00 pm EDT | 6:00 pm CEST

Join us to learn more about winners' applications and to have a talk with our experts.

➡️ REGISTER TODAY

See you all at our virtual meetup! 

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar