@Test public void testSetChildHeader_failParentMissing() { thrown.expect(NullPointerException.class); axisHandler.setHeaderChild(stub, "parent", "child", "123"); }
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); } }
AxisHandler extends SoapClientHandler<Stub> { 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); } } }
AxisHandler extends SoapClientHandler<Stub> { 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); } } @Inject  AxisHandler(EngineConfigurationFactory engineConfigurationFactory,
      RequestInfoXPathSet requestInfoXPathSet,
      ResponseInfoXPathSet responseInfoXPathSet); }
AxisHandler extends SoapClientHandler<Stub> { 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); } } @Inject  AxisHandler(EngineConfigurationFactory engineConfigurationFactory,
      RequestInfoXPathSet requestInfoXPathSet,
      ResponseInfoXPathSet responseInfoXPathSet); @Override void setEndpointAddress(Stub soapClient, String endpointAddress); @Override void setRequestTimeout(Stub soapClient, int timeout); @Override Object getHeader(Stub soapClient, String headerName); @Override void clearHeaders(Stub soapClient); @Override void setHeader(Stub soapClient, String namespace, String headerName,
      Object headerValue); void setHeaderChild(Stub soapClient, String parentHeaderName, String childName,
      Object childValue); @Override void putAllHttpHeaders(Stub soapClient, Map<String, String> headersMap); @Override void setCompression(Stub soapClient, boolean compress); @Override Stub createSoapClient(SoapServiceDescriptor soapServiceDescriptor); @Override RemoteCallReturn invokeSoapCall(SoapCall<Stub> soapCall); @Override String getEndpointAddress(Stub soapClient); @Override javax.xml.soap.SOAPHeaderElement createSoapHeaderElement(QName qName); }
AxisHandler extends SoapClientHandler<Stub> { 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); } } @Inject  AxisHandler(EngineConfigurationFactory engineConfigurationFactory,
      RequestInfoXPathSet requestInfoXPathSet,
      ResponseInfoXPathSet responseInfoXPathSet); @Override void setEndpointAddress(Stub soapClient, String endpointAddress); @Override void setRequestTimeout(Stub soapClient, int timeout); @Override Object getHeader(Stub soapClient, String headerName); @Override void clearHeaders(Stub soapClient); @Override void setHeader(Stub soapClient, String namespace, String headerName,
      Object headerValue); void setHeaderChild(Stub soapClient, String parentHeaderName, String childName,
      Object childValue); @Override void putAllHttpHeaders(Stub soapClient, Map<String, String> headersMap); @Override void setCompression(Stub soapClient, boolean compress); @Override Stub createSoapClient(SoapServiceDescriptor soapServiceDescriptor); @Override RemoteCallReturn invokeSoapCall(SoapCall<Stub> soapCall); @Override String getEndpointAddress(Stub soapClient); @Override javax.xml.soap.SOAPHeaderElement createSoapHeaderElement(QName qName);  }