-
Niagara "web services" client?
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.
-
 Originally Posted by MatrixTransform
try GetHTTP from the AxCommunity jar
GetHTTP looks like it is just grabbing the source of a requested webpage, and returning it as a string.
I was really hoping to find some SOAP framework code which could accept the .wsdl file, parse the schema and return the elements that are specified in it.
-
 Originally Posted by jrevans
Any tips on implementing a "Web Services" client in Niagara (either R2 or G3)?
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/
-
 Originally Posted by digo
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....
-
 Originally Posted by jrevans
Cost is going to be an issue, since I can develop a .NET / OPC application for free....
Great, If I ever need an app developed... now I know who to talk to
Mike started the AxCommunity project on sourceforge, perhaps you can persuade him to include the web services client in the community module.
-
 Originally Posted by digo
Great, If I ever need an app developed... now I know who to talk to 
I can do Modbus/TCP too. 
 Originally Posted by digo
Mike started the AxCommunity project on sourceforge, perhaps you can persuade him to include the web services client in the community module.
I'll start out by emailing him first.
-
...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.
-
 Originally Posted by MatrixTransform
...cant you take the String returned or ByteArray or whatever and parse it for XML elements etc etc
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.
-
 Originally Posted by pault
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:
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
Can anyone point me to a good Java / Niagara tutorial?
-
Niagara / Java development
 Originally Posted by jrevans
It appears that we have an error at Eclipse startup which I have to figure out:
I read some stuff over on Niagara Central, and that error was apparently fixed in later versions of the plugin. I upgraded the plugin from 7.1.3 to 7.1.6 and the error went away.
Now, off to learn how to use this stuff.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Related Forums
The place where Electrical professionals meet.
|