Web Services

Syndicate content 13 

I've mentioned the QEWD project in this group before: it's a Node.js-based platform for web, Native and REST applications which tightly integrates with Cache.  It uses a somewhat different philosophy to the use of Node.js than the norm, and I've now published an article that explains this approach and the unique benefits that arise as a result.

It turns out that, integrated via QEWD, Cache is an ideal bed-fellow for Node.js.  QEWD makes the integration of Cache and Node.js exceptionally fast, simple and intuitive to use, but also extremely powerful.

Read the article here: 

https://robtweed.wordpress.com/2017/04/18/having-your-node-js-cake-and-e...

If you're interested in using Cache with Node.js, you really need to take a look at QEWD!

Last comment 25 September 2017
+ 4   0 4
292

views

+ 4

rating

 

1. Scope and Objective:

 

Recently we supported a few NHS cases that required TIE (Trust Integration Engine) integration with the PKB service.   Hence this article is meant to be a 10-minute quick guide to describe a demo solution (simple configurations and end-2-end implementation steps) for Health Connect (Ensemble) Integration with PKB (Patient-Knows-Best) service.

+ 5   0 1
0

comments

464

views

+ 5

rating

a.k.a..  "The World of Widgets Returns!" or "Paternity leave damages Instructional Series momentum"

In our last lesson, we combined 2 separate classes to appear as the same property.  We now have the ability to Update our Widget catalog, but what if we want to Create a Widget?  Thankfully, we've already done 90% of what we need, just by implementing Edits

As we mentioned when creating the REST Services for PUT and POST, the only real difference between creating and updating a record is whether we are passing in an existing ID or creating a %New record.  The actual content of the Widget JSON is exactly the same, so this allows us to be a little lazy and reuse the form and controller code we have previously written, with just some minor edits to allow it to work for New Widget

0   0 1
0

comments

331

views

0

rating

In the first article I started discussing RESTForms - REST API for your persistent classes. We talked about basic features, now, I'd like to discuss advanced features - mainly queries capabilites:

  • Basic queries
  • Query arguments
  • Custom queries

Queries

Queries allow getting slices of data, based on arbitrary criteria. There are two query types in RESTForms:

  • Basic queries work for all RESTForms classes once defined and they differ only by the field list
  • Custom queries work only for the classes in which they are specified and available, but the developer has full access to query text
Last comment 5 September 2017
+ 3   0 5
615

views

+ 3

rating

Is it possible to dynamically adjust the RetryInterval andFailureTimeout settings in a BPL?

I've got a business process that calls a web service operation to get a session ID from an external system.  There is a string property returned in the body of the response that indicate an exception occurred in the external system. I have code in the BPL that examines the property and sets the status property to an error status when that occurs.

Depending on what the value is I want to adjust the RetryInterval and FailureTimeout values used in by the system when the ReplyCodeActions is set to E=RD.

Example: If the string is "No sessions currently available" I want to retry every 15 seconds for 10 minutes before disabling the process and raising an alert.

If instead the string is "System is down for nightly maintenance"  I want to retry every 5 minutes for 4 hours before disabling the process and raising an alert.

Suggestions?

Last answer 30 August 2017 Last comment 31 August 2017
0   0 1
246

views

0

rating

 

Quite a few enhancements have appeared over recent months in QEWD for easing and simplifying the creation of REST-based services.  It's now even more slick and powerful,  allowing you to very quickly create very high-performance, highly-scalable REST (and Web) services that make use of Cache.

I've therefore updated the training presentation deck (Part 31 on developing REST Services with QEWD).  It describes all the new features with worked examples.  See:

https://www.slideshare.net/robtweed/ewd-3-training-course-part-31-ewdxpr...

 

Last comment 17 August 2017
+ 2   0 4
303

views

+ 2

rating

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? Rewriting the WSDL is not an option as it includes over 900 objects which all refer to at least 10 other objects.

Here is the error

Last answer 15 August 2017 Last comment 15 August 2017
0   0 3
307

views

0

rating

Hi everyone,

I have a project which requires the sending of JSON messages to an external service provider using REST. The service provider requires the message contents to be signed.

Their instructions:

  1. Add a header called "Date" with the the date and time in a specific format - done
  2. Add the client's certificate password in a field in the header - done
  3. Create a string which consist of the {Date}{newline}{Password}{newline}{etc}{Message Body}.
    1. Convert to a UTF8 byte array
    2. SHA256 sign the value with the certificate and private key and use RSA PSS padding
    3. Base 64 Encode the value and place it in a Signature field in the header.

I've done the following

Last answer 11 July 2017 Last comment 13 July 2017
0   0 1
4538

views

0

rating

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?

Last answer 14 June 2017 Last comment 14 June 2017
0   0 5
259

views

0

rating

I'm asking this best-practices question on behalf of a customer.

They have a Caché-based application, and an Ensemble production deployed in front as an ESB to provide web service API access to the back end application. They're looking for a best practice approach for the scenario where the Caché back end is calling a third-party web service. Should that go through Ensemble too? It's sort of a philosophical design question/debate.

The current approach without going through Ensemble would be for Caché to import the service WSDL into proxy classes and invoke those directly from the application code. If the answer to the above question is yes (third-party WS calls SHOULD go through the ESB), what is the best way? One option would be to invoke a restful service in Ensemble from the Caché app. Another would be to expose a web service from Ensemble. That would mean both Ensemble and the back-end application would have to import a WSDL.

Thank you,

Steve

Last answer 1 May 2017
0   0 2
0

comments

229

views

0

rating

I wonder if you could help me? I have a regular cache class that accepts a variable number of arguments in one of the methods. It works fine so I decided to add a method to my web service to make the call to the cache class. I get a compile error on the web service with error#5130.

Here is the cache clas

Last answer 20 April 2017
0   0 2
0

comments

342

views

0

rating

In this article I'll cover testing and debugging Caché web applications (mainly REST) with external tools. Second part covers Caché tools.

You wrote server-side code and want to test it from a client or already have a web application and it doesn't work. Here comes debugging. In this article I'll go from the easiest to use tools (browser) to the most comprehensive (packet analyzer), but first let's talk a little about most common errors and how they can be resolved.

+ 7   0 1
0

comments

896

views

+ 7

rating

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?

Any insight or ideas would be helpful.

Last answer 12 April 2017 Last comment 13 April 2017
0   0 0
163

views

0

rating

We are planning to use Caché users on a SOAP web-service, so the WS-security tokens will be used.
It will be username and password only for now.
The passwords should expire on a regular basis and this will be configured in the system-wide security settings.
The consumer of the web-service should be able to change their password on-demand or when it has expired, via a web-service call.

For the on-demand change, I can create a service method which can be called by the consumer to change the password.

In the case of an expired password, I am unable to figure out how the password can be changed via a service call, once it has expired. There is an option for a Password Change Page on the CSP application configuration, but this will not work, as it is a system connecting to the service and not an end-user.
Does Caché provide a mechanism for password changes on the CSP application security for inbound web-services

Last answer 2 April 2017 Last comment 3 April 2017
0   0 3
389

views

0

rating

Hello us !

I want to use webservice CLS in Netbeans and use PHP development tool.

 

I create this

try {
    $wsdl_url = '[URL].ClassPatientServices.cls?WSDL=1&CacheUserName=[USER]&CachePassword=[PWD];
    $client = new SOAPClient($wsdl_url);
    $params = array(
        'ClsINOUTContext' => array('AccesCode'=>'CWP','username'=>''),
        'strINPatientIPP' => "91005573",
        'ClsOUTInfosPatient' => "patient",
    );
    $return = $client->GetPatientInfo($params);
    print_r($return);
} catch (Exception $e) {
    echo "Exception occured: " . $e;
}

 

Can you help me to use this webservice ?

Last answer 29 March 2017
0   0 4
0

comments

166

views

0

rating

Goal:

  • Take an HL7 message, parse some data from it
  • Call a web service to get an authorization key, comes back as a simple string
  • Create a request object with data from the HL7 message and send it to the Web Service

The main web method call requires that key I received as a Soap Header element. All I can pass to the SOAP Operation business class is the request object with the data I plucked from the HL7 payload. Nothing in that particular request message has anything in it that tells anything to send the header, too.

So what are my options to pass a message to the SOAP Operation that contains both the object that is the message body AND the SOAP header? Or do I not use the generated operation classes - I have to roll my own and use something like a pass thru operation and set some flags to get it to use the header?

Thoughts? Am I missing something totally simple?

Thanks!!

Last answer 23 March 2017
0   0 0
0

comments

622

views

0

rating

I have a number of Business Process and due to the complexity these were created as "custom code" instead of BPL.

These processes currently invoke other components using SendRequestSync. For a couple of reasons I would like to be able to change these to use SendRequestAsync

Last answer 22 March 2017 Last comment 23 March 2017
0   0 0
533

views

0

rating

Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.

I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.

- This can be slow/bad in applications with large data?

- It's better/recommended to use ZenReports even with ZenMojo applications?

- Or Zen Mojo, like any other applications based on HTML, JS and PHP can support this with any problem?

- The preparation of the JSON is very fast because the use of %DynamicObject and %DynamicArray; ZenReport can be slower than it?

 

Thanks,

Andrei L. Nenevê

Last answer 24 February 2017
+ 1   0 0
0

comments

193

views

+ 1

rating

Hopefully this is a simple questions to respond to.  Can you do Delegated Authentication for SOAP web service calls.  I ask as I am not seeing this work as expected.  I have this authentication turned on and enabled in for he CSP Web Application yet I keep getting a "Security Token could not be Authenticated.  And a global I was setting to capture some of the available data is not being loaded.

Last answer 17 February 2017
0   0 0
0

comments

375

views

0

rating

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

So I wonder... is there kind of encoding parameter I could use within the "WebMethod", so it'd return the correct output?

--

Last answer 31 January 2017 Last comment 2 February 2017
+ 1   0 2
2043

views

+ 1

rating

Hi-

Im curious if there is any specific configuration that has to be done on an IIS web server to serve up RESTful web services.

I have a server that has IIS installed, with the CSP gateway.  a second server that has Cache installed on it.

I have configured a web application using the Cache System Management Portal for the web services that has a dispatch class pointing to my dispatch class.

I have created an application mapping in my CSP Gateway Management Portal on the web server such that url's with /webservices prefix are routed to my cache server.

There is a virtual directory created on the web server in IIS for /webservices that has appropriate extensions configured for .csp and .cls.

However, when I try to use the REST tool within Chrome to access a working restful web service it is timing out with no response

Last answer 31 January 2017
0   0 1
0

comments

1689

views

0

rating