Hi Michael, I'm sorry but I'm a bit confused. I don't know how to relate the instructions that you provided in the first post to accomplish the task of passing an object as a parameter with the ones that you are pointing now to return an array of objects. In order to return an array of objects, Should I still follow the instructions that you provided in the first place? If so, would you be so kind of provide an extended version of the instructions, please? Thank you very much
Michael Imhof wrote: > > Hi Alfredo, > > we're using successfully arrays of objects in SOAP services. > The ObjectType.class in the trunk should support arrays > (https://issues.apache.org/jira/browse/OFBIZ-1008). > > This should work for simple data types. If you're using complex types then > it will be more > complicated because you have to register the > BeanSerializer/BeanDeserializer for the type. > Set a breakpoint in the method SOAPEventHandler.invoke(..) and try to > understand what > happens there... > > Regards, > Michael > > > > Alfredo Rueda wrote: >> >> Hello Michael! >> >> Have you manage to handle arrays of objects as output parameters of an >> ofbiz service exported via soap? >> >> Thank you very much! >> >> Alfredo >> >> >> Michael Imhof wrote: >>> >>> After a while a found a way to create and process SOAP request >>> with complex types in OfBiz: >>> >>> 1). Use Java2WSDL to create a WSDL. This allows you to use complex >>> types. >>> javac: Compile the class with option -g to get debug infos (e.g. >>> real argument names instead of arg0, arg1,...) >>> Java2WSDL: Use parameter -A OPERATION. >>> >>> 2). Property: axis.doAutoTypes should be true. If not, no serializer >>> could be found. >>> I put this in Start.java: >>> System.setProperty("axis.doAutoTypes", Boolean.TRUE.toString()); >>> >>> 3). The complex type class should implement: >>> public static org.apache.axis.description.TypeDesc >>> getTypeDesc(): >>> For a class ComplexType with a string attribute <name>, TypeDesc >>> should look like this: >>> >>> org.apache.axis.description.TypeDesc typeDesc =new >>> org.apache.axis.description.TypeDesc(ComplexTest.class, true); >>> typeDesc.setXmlType(new >>> javax.xml.namespace.QName("http://types.archiv.isgate.nowhow.ch", >>> "ComplexTest")); >>> org.apache.axis.description.ElementDesc elemField = new >>> org.apache.axis.description.ElementDesc(); >>> elemField.setFieldName("name"); >>> elemField.setXmlName(new javax.xml.namespace.QName("", "name")); >>> elemField.setXmlType(new >>> javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", >>> "string")); >>> typeDesc.addFieldDesc(elemField); >>> >>> Now you can generate Services with a complex type ComplexType. >>> <service name="testService" engine="java" >>> location="ch.nowhow.isgate.archiv.ArchivServices" >>> invoke="testService" export="true"> >>> <namespace>http://nowhow.ch/isgate/</namespace> >>> <attribute name="inList" >>> type="ch.nowhow.isgate.archiv.types.ComplexTest" mode="IN" >>> optional="false"/> >>> </service> >>> >>> If you want to use arrays of complex types (or simply array of string), >>> you should enhance ObjectType.java to support arrays...but this is >>> another story and >>> I'm still testing my changes >>> (https://issues.apache.org/jira/browse/OFBIZ-746):-) >>> >>> Regards >>> Michael >>> >> >> > > -- View this message in context: http://www.nabble.com/Using-SOAP-complex-types-with-OfBiz-tp9180865p20628539.html Sent from the OFBiz - User mailing list archive at Nabble.com.
