# OPC-UA Method Call from Java API

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365>\
**Category:** Module Development\
**Created:** [March 28, 2025, 12:09pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365 "2025-03-28T12:09:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam3](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sam3](https://forum.inductiveautomation.com/u/sam3)\
**Post date:** [March 28, 2025, 12:09pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365/1 "2025-03-28T12:09:09Z")

</div>

Is it possible to call an OPC-UA method from the Java API?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 28, 2025, 12:17pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365/2 "2025-03-28T12:17:54Z")

</div>

Hmm, no, it doesn't look like it.

Not without doing something really janky like trying to execute a script that in turn calls `system.opcua.callMethod` or something...

---

<div class="post-metadata">

**Author:** ![sam3](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sam3](https://forum.inductiveautomation.com/u/sam3)\
**Post date:** [March 28, 2025, 12:47pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365/3 "2025-03-28T12:47:29Z")

</div>

I am open to that if it is the only way...

Can you point me to any examples?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 28, 2025, 12:58pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365/4 "2025-03-28T12:58:43Z")

</div>

No, I'm not sure that's even a supported thing to do. I just assumed it was possible without looking... but I'll have to dig in a little.

What is your module trying to do? Why does it need to call OPC UA methods?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 28, 2025, 4:12pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-from-java-api/104365/5 "2025-03-28T16:12:17Z")

</div>

Calling via ScriptManager is a dead end I think - you wouldn't be able to get or use any of the results.

I think the only possibility will be if your module makes and manages its own OPC UA connections to whatever server you need to call methods on it.
