I want to consume external websocket api, URL looks like this:

wss://site.com/ws/v2/?&token=<token>

Checked with external tool (Simple WebSocket Client) that websocket works and I can consume the data.

In Cache the relevant functionality is offered by %IO.Socket class.

set sock = ##class(%IO.Socket).%New()
set sock.SSLConfig = "MyEmptySSLConfig"
set sock.TranslationTable="UTF8"
do sock.Open("site.com/ws/v2/?&token=<token>","443", 10,.sc)

However I get this error:

0 17
0 1.3K

Hello guys,

I've got this piece of code which runs the method "WebMethod", that belongs to %SOAP.WebBase.cls.

It grabs the outcome from an internal webservice we have and after that, it writes into a file.

The thing is, when I browse the file contents, I realize that in the place where a special character should be, I see a question mark.

By querying the same webservice from a special soap tool called "SoapSonar" (I've been using this for years), the outcome shows up this special character (shows it properly).

1 16
0 4.9K

I cannot connect to Cache from node.js

I have installed in Windows 10 the following: CACHE 2016, node.js v 4.4.7 and express .

- where can I get cache.node? The link in the Intersystmes documentation http://globalsdb.org/downloads/ doesn't work. I found cache0100.node and cache0120.node in my Cache instance's \bin directory. But I am not sure if I can use them or not.

- how to install cache.node ? Where do I place it exactly?

Can anyone recommend any tutorial or code example with installation instructions?

1 12
1 3.4K

Hi,

I create a WebService in Machine One, with some process, i tested this webservice with SOAPUI, worked.

After that i create a simple Business Operation, SOAP Adapter, based on WebClient created with SOAP Wizzard, the problem with that is on response var, i have empty var on my operation, somebody have some Ideas ?

0 11
0 622
Question
· Jul 27, 2021
How To Pass Custom Class

I've created a custom class that extends to the standard HS.Message.PatientSearchRequest. Inside the custom class i just want to pass the data as input only.

But i am getting ERROR #6277: Type attribute, s01:AcoPatientSearchRequest, does not specify valid type for XML input tag: pRequest (ending at line 5 character 171)
</error>

I tried adding Parameter XMLIGNOREINVALIDTAG = 1; and

0 8
0 467
Question
· Apr 20, 2018
Special Character API

Hi

Made a request for API REST.

Using HTTP Request adapter.

Adapter As EnsLib.HTTP.OutboundAdapter

Outside the Ensemble an API response is JSON (CORRECT)

Answer in Ensemble: =?Á
Â0
?_eä,cÒ
'=
*^<YÙF¡í$í¼ÈÞÝt
oÉ÷ý$?|
¤1¡{Dâhà°Ý?Öù)2ós??R?¸¼?ºd?$,ñD+»??
?
ÔºQZéýNÕ V{C?óò?b¢?éÍ )$
²5Å?wEë? ??©tÖã1z×2FëÊnôeË æ??]Zßq ܺ?á

Help me.

Thank you

0 8
0 420
Question
· May 17, 2017
Soap Wizard

HI,

Please let us know the solution to the below error:

ERROR:#5388 - You do not have write permission on the database class .
%SOAP.WebClient is in , so class lock cannot be obtained .

Thanks,
Shobha

0 8
0 860
Question
· Nov 1, 2016
WebSocket proxy to telnet

Is there any easy way to create a WebSocket to Telnet proxy within the Cache environment?

I would like to use a html5 telnet emulator to connect to cache, but need to create a proxy,

Is this a simple task?

0 8
0 1.4K

This might be a very simple rookie question but I'm trying to create couple of web services in Ensemble and using document below as my tutorial, I do manage to do it:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

But instead of doing it as described above, where method signature is like this:

Method GetCustomerInfo(ID As %Numeric) As ESOAP.SOAPResponse [WebMethod]

I would like it to be:

0 7
0 726

I am trying to import the SalesForce Enterprise WSDL in InterSystems Ensemble Studio using the SOAP Add-In. However, when I do so I receive a class dependency loop, Error #5316 during compilation. The WSDL is the standard WSDL provided with SalesForce and works fine in SoapUI. In the SalesForce WSDL it is allowed for an object A to include an object B as an element, while at the same time object B is allowed object A as an element. I think this is what causes the class dependency loop for InterSystems. Does anyone has any suggestion how I can circumvent this error?

0 7
0 716

I am trying to use the %ListOfDataTypes functionality, but am hitting a limit of 50 characters for each entry, when being used in a Web Service. Is there a way to increase the number of characters that can be used in the %ListOfDataTypes through a web service?

1 7
1 425

Does anyone have any experience with getting, unfortunately, an older version of Cache to authenticate via SMTP to send email? I have verified that the settings are set up properly on the mailbox as I have successfully sent an email from a LAMP server, which comes from the same IP address.

If you have any thoughts, I would greatly appreciate it.

This is the error I receive

ERROR #6034: SMTP server connection failed during MAIL FROM command: <READ>zSend+105^%Net.SMTP.1.

0 6
0 2.4K

I'm using %SOAP.WebRequest to send SOAP requests:

  1. Populate %SOAP.WebRequest object (by setting Request and HeadersOut properties)
  2. Call SendSOAPBody method to send request

Currently the XML I send looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP-ENV:Header>
<SomeCustomHeader/>  </SOAP-ENV:Header>
  <SOAP-ENV:Body><SomeCustomBody/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

However, I want XML to be generated differently:

  • No new lines
  • No whitespaces between <SomeCustomHeader/> and </SOAP-ENV:Header>

How can I tweak XML generation to achieve that?

0 6
0 523

I am trying to read an xml document using %XML.TextReader and that's is all well and l can get my elements values but would like to determine where the next record start on the xml without referring to the document path in essence would like to use the same method to read different xml docs. I would like to know if is there a way or a function that I can use to get the start and end of a record in xml as I would to get the start and end element.

0 6
0 666

Hi all-

We used to have this Java applet in our CSP page to "print all" and "download all" PDF medical reports. We want this applet so that the user won't have to open each PDF in the browser just to print it.

But now most browsers do not support Java applets anymore due to security concerns, so that Java application is down. We tried to migrate to Java Web Start but don't know how to invoke the JNLP file from the CSP page. I am new to Cache so any help would be greatly appreciated.

0 6
0 801

We are using an F5 load balancer to route public traffic to our IS server. My goal is to block public access to the Management Portal, and only allow what we want to expose, such as REST/SOAP services. At the F5, they can block URL wildcards or specific ports, so those are our options.

Since the URLs for the web services are in the same path ([host]/csp/healthshare/[namespace]/*), I can't see any URL wildcards happening. That leads me to ports; is there a way to put services on a specific port for all services, and everything else stay on a standard web port?

0 5
0 335

Hi All,

I have created a REST class in which have the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'http://localhost:52773/IrisVSCode/app/test' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

0 5
0 15.6K