private void fixNullOutputsForSOAP(CrownCounselIndexGetList_Properties fromClient) { // Transform null to "null" Class c = fromClient.getClass(); java.beans.BeanInfo beanInfo = null; try { beanInfo = java.beans.Introspector.getBeanInfo(c); } catch (Exception e) { } java.beans.PropertyDescriptor[] properties = beanInfo.getPropertyDescriptors(); for (int i = 0; i < properties.length; i++) { java.beans.PropertyDescriptor property = properties[i]; java.lang.reflect.Method readMethod = property.getReadMethod(); java.lang.reflect.Method writeMethod = property.getWriteMethod(); if ((readMethod != null) && (writeMethod != null)) { String currentvalue = new String(""); if (readMethod.getReturnType() == currentvalue.getClass()) { try { currentvalue = (String) (readMethod.invoke(fromClient, null)); } catch (java.lang.reflect.InvocationTargetException a1) // Null argument { try { Object[] args1 = new Object[1]; args1[0] = new String("null"); writeMethod.invoke(fromClient, args1); } catch (Exception e2) { } } catch (Exception e1) { } } else { } } } }
private void fixNullInputsForSOAP(CrownCounselIndexGetList_Properties fromClient) { // Transform "null" to null // Set hPubStartPoolName and hPubLinkKey to null if string < 1 Class c = fromClient.getClass(); java.beans.BeanInfo beanInfo = null; try { beanInfo = java.beans.Introspector.getBeanInfo(c); } catch (Exception e) { } java.beans.PropertyDescriptor[] properties = beanInfo.getPropertyDescriptors(); for (int i = 0; i < properties.length; i++) { java.beans.PropertyDescriptor property = properties[i]; java.lang.reflect.Method readMethod = property.getReadMethod(); java.lang.reflect.Method writeMethod = property.getWriteMethod(); if ((readMethod != null) && (writeMethod != null)) { String currentvalue = new String(""); if (readMethod.getReturnType() == currentvalue.getClass()) { try { currentvalue = (String) readMethod.invoke(fromClient, null); } catch (Exception e1) { } if (currentvalue != null) { if (currentvalue.equals("null")) { try { Object[] args1 = new Object[1]; args1[0] = null; writeMethod.invoke(fromClient, args1); } catch (Exception e2) { } } if ((currentvalue.length() < 1 || currentvalue.endsWith("/null")) && (writeMethod.getName().indexOf("PubStartPoolName") > -1)) { try { Object[] args1 = new Object[1]; args1[0] = "ICONEJB/null"; writeMethod.invoke(fromClient, args1); } catch (Exception e2) { } } if ((currentvalue.length() < 1) && (writeMethod.getName().indexOf("PubLinkKey") > -1)) { try { Object[] args1 = new Object[1]; args1[0] = null; writeMethod.invoke(fromClient, args1); } catch (Exception e2) { } } } } else { } } } }