try GetHTTP from the AxCommunity jar
Any tips on implementing a "Web Services" client in Niagara (either R2 or G3)?
I need to communicate with an electrical utility service via a SOAP/1.1 compliant connection, to poll for command info about our zone.
They supplied us with a .wsdl file (and .NET code), but I don't know which Niagara module or framework I would base this off of. The Obix stuff is implemented in Web Services, but the utility isn't using Obix.
Searching Niagara Central only seems to show me ways to implement a Web Services server.
I could implement this in C#/VB.NET and use OPC to communicate the event with R2/G3, but it would be much cleaner if I could just do it all within Niagara.
try GetHTTP from the AxCommunity jar
1 + 1 = 3 ( *** for very large values of 1)
...everybody wants a box of chocolates and long stemmed rose
Be brave. You cannot get eaten by an imaginary tiger.
Check with Mike Arnott at Kors Engineering, they have a Web Services server for AX. It uses Java 1.5 libraries, which would prevent you from running this on QNX JACEs with the J9 JVM (J2ME libraries)
http://70.40.199.119/products/web-se...or-niagara-ax/
I read of the Kors module, but it appeared to be for serving Web Services, not consuming Web Services.
But, in this thread: https://www.niagaraframework.com/ord...ionThread/9276
he mentions a utility for consuming.
I suppose I could drop him an email.
Cost is going to be an issue, since I can develop a .NET / OPC application for free....
...cant you take the String returned or ByteArray or whatever and parse it for XML elements etc etc
1 + 1 = 3 ( *** for very large values of 1)
...everybody wants a box of chocolates and long stemmed rose
Be brave. You cannot get eaten by an imaginary tiger.
Indeed I could, but I was under the impression that when properly using Web Services, the server would only return the requested data elements. (Then again, I've never used Web Services, so I don't know much....)
I'm supposed to be polling every five seconds, and didn't really want to be grabbing too much data every time.
yeah, so you send the appropriate request with a POST/PUT and the server will respond ... and you can pull apart the XML
1 + 1 = 3 ( *** for very large values of 1)
...everybody wants a box of chocolates and long stemmed rose
Be brave. You cannot get eaten by an imaginary tiger.
You could use any generic Java web service library (e.g. JAX-WS 2.0) to build SOAP client for Niagara.
Thanks pault. I just looked at the JAX-WS stuff. Interesting.
My biggest problem is that I've never done Java development for Niagara (and haven't seriously written in Java for ten years....)
We do have Eclipse setup on our server, and another developer did some stuff with it, so I'll have to take a look at how it is done.
It appears that we have an error at Eclipse startup which I have to figure out:
Can anyone point me to a good Java / Niagara tutorial?An internal error occurred during: "Loading Niagara Plug-in".
java.lang.IllegalArgumentException: Attempted to beginRule: MultiRule[P/axCommunity,P/.org.eclipse.jdt.core.external.folders], does not match outer scope rule: com.tridium.niagara.project.rules.NreRule@121bfd6
That might be a problem
Niagara is a quite big framework with some not so simple mechanisms.
I recommend you to build a very simple command line WS client first (without any Niagara stuff) just to understand SOAP and Java WS.
Then you could take a look on Niagara services on how to transmit WS data to Niagara objects.
A fully functional Niagara driver seems to be an overkill here.