|
Hi,
Please excuse the newbie question. I've googled and tried a number of different things but keep getting various syntax errors. I'm using ws-client to consume a web service which has input and output defined as complex types. In one case I am making a call to the web service and getting a successful result. Unfortunately I am having problems reading and displaying the result. When the following code runs: def myPlaceHolder = myProxy.getListAttributes( getListAttributesAPI.listName, getListAttributesAPI.proxyID ) println "The result was:" dump(myPlaceHolder) I encounter the following error: Caught: groovy.lang.MissingMethodException: No signature of method: create-and-init.dump() is applicable for argument types: ([Lmservice.MListAttributes;) values: [[mservice.MListAttributes@7afdd15b]] Possible solutions: dump(), run(), run(), use([Ljava.lang.Object;), grep(java.lang.Object), wait() From the wsdl I know it's just an array of Java strings, but I'm stumped on how to access any particular element or iterate over each of the elements. - <complexType name="mListAttributes"> - <sequence> <element name="aceName" nillable="true" type="xsd:string" /> <element name="aceType" nillable="true" type="xsd:string" /> <element name="activeList" type="xsd:boolean" /> <element name="description" nillable="true" type="xsd:string" /> <element name="gid" nillable="true" type="xsd:string" /> <element name="group" type="xsd:boolean" /> <element name="hiddenList" type="xsd:boolean" /> <element name="listName" nillable="true" type="xsd:string" /> <element name="mailList" type="xsd:boolean" /> <element name="mailman" type="xsd:boolean" /> <element name="mailmanServer" nillable="true" type="xsd:string" /> <element name="memaceName" nillable="true" type="xsd:string" /> <element name="memaceType" nillable="true" type="xsd:string" /> <element name="modby" nillable="true" type="xsd:string" /> <element name="modtime" nillable="true" type="xsd:string" /> <element name="modwith" nillable="true" type="xsd:string" /> <element name="nfsgroup" type="xsd:boolean" /> <element name="publicList" type="xsd:boolean" /> </sequence> </complexType> I have a similar problem when I try to make up update to the attributes. If I simply create a populated array when I submit it as a parameter to the web service call I get: Could not find matching constructor for: mservice.MListAttributes org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[pbh, USER, Y, Tech TV collection ACL, , N, N, TechTV-pbh, N, N, , pbh, USER, , , , N, N]' with class 'java.util.ArrayList' to class 'mservice.MListAttributes' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: mservice.MListAttributes (java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) groovy.lang.MissingPropertyException: No such property: mservice for class: create-and-init Thanks for the help. Paul --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
