[ https://issues.apache.org/jira/browse/OFBIZ-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Imhof updated OFBIZ-746: -------------------------------- Attachment: patch746.txt > ObjectType does not recognize arrays!! > -------------------------------------- > > Key: OFBIZ-746 > URL: https://issues.apache.org/jira/browse/OFBIZ-746 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: SUSE Linux 10.1 & MySQL 5.0.18 > Reporter: Michael Imhof > Attachments: patch746.txt > > > We're using ByteArrays (byte[]) in our services: > <service name="processImage" engine="simple" > default-entity-name="Archivindex" > location="ch/nowhow/isgate/archiv/ArchivServices.xml" > invoke="processImage" export="true"> > <attribute name="image" type="byte[]" mode="IN" > optional="false"></attribute> > </service> > Sending a SOAP envelope (from the generated WSDL) to the server, ofbiz > could not find the byte array!!!! > (Remind that a ByteArray is not supported by OfBiz WSDL!!! We're using > Java2WSDL to generate a WSDL) > Class: > ===== > ObjectType.java > Method: > ====== > public static Class loadInfoClass(String typeName, ClassLoader loader) > Solution: > ======= > Adding array support at the beginning of the method: > public static Class loadInfoClass(String typeName, ClassLoader loader) { > // Array support > if (typeName.endsWith("[]")) { > if (Character.isLowerCase(typeName.charAt(0)) && > typeName.indexOf(".") < 0) { > typeName = "[" + typeName.substring(0, 1).toUpperCase(); > } else { > Class arrayClass = loadInfoClass(typeName.replace("[]", ""), > loader); > typeName = "[L" + arrayClass.getName().replace("[]", "") + > ";"; > } > } > // End array support > > //Class infoClass = null; > try { > return ObjectType.loadClass(typeName, loader); > } catch (SecurityException se1) { -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.