How to call OPCUA Method hosted in an OPCUA Server using Milo Stack? - opc-ua

I have an OPCUA Server written in Python, which hosts Variables, Properties as well as Methods. This server runs and works as it should. Reading & Writing of Variables & Properties as well as calling those Methods with arguments have all been tested using another OPCUA Client (written in Python).
However, the final aim is to write a similar OPCUA Client using Java and the milo stack, which should connect to the given server and perform all these Reading & Writing of Variables & Properties as well as call OPCUA Methods with arguments.
Reading & Writing of Variables & Properties work with the milo api calls but calling OPCUA Methods seems to not work somehow.
I have been trying to solve the same using examples on the eclipse/milo [git][1] page. But could not get it working.
Can anyone help with a very basic client code example, written in Java using the milo stack that calls a simple OPCUA Method with input arguments and prints out the output argument from the OPCUA Method?
Note: I am using the Milo 0.3.3 version and not the latest 0.6. Since, the project I am working in uses 0.3.3.
Thanks & Regards,
[1]: https://github.com/eclipse/milo/blob/master/milo-examples/client-examples/src/main/java/org/eclipse/milo/examples/client/MethodExample2.java

If you go back in time to the release/0.3.3 branch there is a method example that you can use: https://github.com/eclipse/milo/blob/release/0.3.3/milo-examples/client-examples/src/main/java/org/eclipse/milo/examples/client/MethodExample.java
The current example you linked will not work unless you update the version of Milo you are using.

Related

Jasper-reports and Dart

So I've been searching for 1 hour on Google and this website if I can generate reports using Jasper reports in Dart.
Anyone know if it is possible?
Is there any plug-in?
Thanks in advance
You can make a request from the browser (might be Dart) to the server (probably in Dart according to your question) and the server has to forward the request to a service running in Java or an application built in Java which generates the PDF file and returns the file (or the path to the file) to the Dart server which itself serves it to the browser.
You can make a Java service that accepts HTTP requests directly and skip the Dart server. The Browser can then directly access the Java service that generates the PDF and receive it from there.
It all depends how your infrastructure looks like.
(I don't know Jasper Reports, it might offer some functionality that makes this easier. This is just a generic answer).
You might take a look at this site
http://community.jaspersoft.com/questions/818313/which-best-way-use-jasperreport-php-application
I suppose this will apply mostly to Dart as well.
I found that Jasper Reports offers a standalone server which allows both above described scenarios
http://community.jaspersoft.com/project/jasperreports-server
There seems not to be a dedicated Dart client available (like this one for PHP) but Dart is quite capable of accessing a REST API. It's just a bit more manual labor to access the server than with customized a client library.

Comet with scala

I am developing one application with GWT as client and my server side code written in Java servelt and I am fetching some data from another server. that another server code is in Scala. so the question is how can i push data from another server to my main server and display that data to client using comet ( gwt-comet.jar)
Please help me.
Thanks
Comet is something that your web server must support, via continuations or some other implementation (see this as an example). Usually web frameworks (like Lift) have some wrapper around this mechanism to facilitate using it.
I'm no expert on GWT, but for what you say it seems it has a Comet library. Using it should be as simple as to implement classes following this library specifications and using a server that supports Comet.

Applets and liftweb in scala

My goal is to create an applet on a client machine which somehow is able to communicate back and forth with the same server that deployed the applet. One way of doing this would of course be through some kind of AJAX code, but if it's possible I'd very much like to keep everything in Scala.
So far I've used remote actors which have the unfortunate consequence that the applet needs to be signed. Which isn't an optimal solution either. I'm searching for alternate solutions.
Is there any way to make an applet deployed by liftweb communicate with lift directly via Scala?
Communication through remote actors is directly via Scala.
Now, Lift enables one to run JavaScript code on the client, communicating with the Scala server seamlessly (and without having to write a single line of JavaScript code). See the many Lift examples for that (for instance, the wizard).

Adding methods to a SOAP webservice in production use

I have a SOAP webservice running in production and being used by multiple different client implementations (written in .NET, PHP, Java, Ruby, Delphi...) and I need to add a method to the webservice.
My question is: is it possible that adding something to the current WSDL can break any of the client implementations? What I mean is there some SOAP-framework which goes berserk if the WSDL suddenly changes server side? I know that modifying an existing method (e.g. changing a parameter's type) will break stuff but what about adding a totally new method?
I'm guessing it should be OK but thought I'd ask if someone has run into problems when doing this.
should be OK, since the WSDL is normally used upon method stub generation, not during each call to a web service. Just make sure you don't change any parameter or return type

Calling Native(C++) Code in GWT

I am developing an application in GWT which needs to call a native C++ code in Directshow to do some multimedia processing.I am guessing that I cant use JNI because GWT converts code to javascript.I did have a look at similar posts on the forum(and on GWT site about JSNI) but cant find a example that specifically talks about calling C++ code from GWT(its mostly about calling Java code from Javascript).Can anyone throw some light on this or direct me to a tutorial?
Where exactly is this code supposed run? Surely not on the client-side. Client-side native code is nowhere near mass adoption.
GWT can either interface with JSNI in order to write native JS code inside your GWT Java code, or to interface with Java back-ends, whilst the framework handles the RPC. Even without GWT you have no way to run native code from within the browser (at least in the near future).
Bottom line - if you can't do it in plain vanilla Javascript on the client side, you can't do it in GWT.
What you can do is use this native code in the back-end, and call it via classic JNI from your Java back-end classes (and then what difference does it make if it's part of a GWT project or not?), but it sounds like this is not the case.
First of all, have a clear separation of Client (HTML / Javascript running in the browser) and server components (java service servlets).
If I understood your problem statement right, You need the UI to collect parameters for your transcoders and your transcoders need to run on a Windows box.
You can look up any simple GWT application to figure out how to serve a GWT application in any container (perhaps jetty for the time being) and process basic HTML form inputs. Once you have all the parameters on the server, you need to figure out how to delegate these parameters posted from the browser (your GWT application) from the service servlet (running within a web server) to your DirectShow application. This point onwards its a java application talking to a native process problem.
You can use various ways to communicate parameters to your native directshow application. Simplest solution is to initiate the application with the exec method passing command parameters inline. Otherwise you can communicate to a running native application via TCP sockets or integrate the native app using JNI. It all depends on your architectural design, which approach you wish to take.