Java Code Examples for com.sun.xml.internal.ws.model.CheckedExceptionImpl#getDetailBean()
The following examples show how to use
com.sun.xml.internal.ws.model.CheckedExceptionImpl#getDetailBean() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SOAPFaultBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 2
Source File: SOAPFaultBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 3
Source File: SOAPFaultBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 4
Source File: SOAPFaultBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 5
Source File: SOAPFaultBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); if (ce.getExceptionClass().equals(detailBean)) return exception; Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 6
Source File: SOAPFaultBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 7
Source File: SOAPFaultBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }
Example 8
Source File: SOAPFaultBuilder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) { Class detailBean = ce.getDetailBean(); Field[] fields = detailBean.getDeclaredFields(); try { Object detail = detailBean.newInstance(); for (Field f : fields) { Method em = exception.getClass().getMethod(getReadMethod(f)); try { Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType()); sm.invoke(detail, em.invoke(exception)); } catch(NoSuchMethodException ne) { // Try to use exception bean's public field to populate the value. Field sf = detailBean.getField(f.getName()); sf.set(detail, em.invoke(exception)); } } return detail; } catch (Exception e) { throw new SerializationException(e); } }