# OPC-UA - Method call with "complex" input values

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205>\
**Category:** Ignition\
**Created:** [January 10, 2020, 9:35am UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205 "2020-01-10T09:35:35Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![Adam\_Shannon](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Adam\_Shannon](https://forum.inductiveautomation.com/u/Adam_Shannon)\
**Post date:** [July 7, 2025, 2:40pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205/41 "2025-07-07T14:40:12Z")

</div>

> [@Kevin.Herron](#):
>
> u’ll have to do something annoying like this to create an array value for n

Ok Thanks for the quick responses!  
So that worked, though I had to write  
password = jarray.array(, **Integer** )  
as  
password = jarray.array(, **'i'** ) to pass the java type.

Now, to extract the results. I see the values I want in the "Raw Outputs" of the log

 ![MethodCallLog_SemiSuccess](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e8a2166e2654f2bc61392df42713f18292687574.jpeg)

But in my scripting I am getting the coerced outputs as results[2] from callMethod. Is there a way to pull the raw outputs into an array?

Adam S

---

<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:** [July 7, 2025, 2:50pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205/42 "2025-07-07T14:50:44Z")

</div>

No, the raw outputs are often types from the OPC UA library and need to be converted into types that can be used from Ignition / scripting. They're only printed there for debugging purposes.

The corresponding representation of an OPC UA ByteString in Ignition is a Short Array (`java.lang.Short[]`).

---

<div class="post-metadata">

**Author:** ![Adam\_Shannon](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Adam\_Shannon](https://forum.inductiveautomation.com/u/Adam_Shannon)\
**Post date:** [July 7, 2025, 4:49pm UTC](https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205/43 "2025-07-07T16:49:03Z")

</div>

Excellent  
I was able to get the array back!

resultArray = system.opcua.callMethod(connectionName, objectID, methodID, inputs)[2][0]

I know [2] here is the list of output values from the callMethod Function.  
If I didn't then take [0] from that my result was returning as the whole Object with the value [[Ljava.lang.Short;@xxxxxxxx, 0].

Then I converted this data to a string with:  
resultString = ''.join(chr(character) for character in resultArray) since my RFID data is ascii bytes.  
In case someone else in the future needs that.

Adam S

[Previous page](https://forum.inductiveautomation.com/t/opc-ua-method-call-with-complex-input-values/31205.md?page=2)
