public void setHeaderChild ( Stub soapClient , String parentHeaderName , String childName , Object childValue ) { SOAPHeaderElement headerElement = ( SOAPHeaderElement ) getHeader ( soapClient , parentHeaderName ) ; Object headerObject = Preconditions . checkNotNull ( headerElement , "Parent header named %s does not exist" , parentHeaderName ) . getObjectValue ( ) ; try { BeanUtils . setProperty ( headerObject , childName , childValue ) ; } catch ( IllegalAccessException e ) { throw new ServiceException ( "Failed to set header child " + childName , e ) ; } catch ( InvocationTargetException e ) { throw new ServiceException ( "Failed to set header child " + childName , e ) ; } }
Updates the child attribute of headerName named childName to childValue .