1
votes

I have a Java Soap service with method

public void helloStudentsName(String[] names)

And user robot framework (SudsLibrary) to call this, because i didn't fine Array in Robot so i use List in code

 ${names}    Create List    name1    name2    name3
    Call Soap Method    helloStudentsName    ${names}

I got error

TypeNotFound: Type not found: 'arg0'

And replace $ by @ in list declare

@{names}    Create List    name1    name2    name3
    Call Soap Method    helloStudentsName    @{names}

No error but in Java method receive an empty array.

Can you show me how to call this method?

1

1 Answers

1
votes

I think you need to create a special WSDL array object, rather than using a plain robot list. SudsLibrary has a keyword for this, and uses it in an example.

Assuming your WSDL defines a type of ArrayOfString, you might do something like this:

| | ${string array}= | Create Wsdl Object | ArrayOfString
| | Append To List | ${string array} | name1
| | Append To List | ${string array} | name2
| | Append To List | ${string array} | name3
| | ${result}= | Call Soap Method | helloStudentsName | ${string array}

This will only work if your WSDL defines a type of ArrayOfString. Your actual WSDL might call it by some other name.