@SuppressWarnings("nls")
    @Override
    public void apply(final ApiRequest request, final IPolicyContext context, final Object config,
            final IPolicyChain<ApiRequest> chain) {
        try {
            SOAPEnvelope soapPayload = context.getAttribute(PolicyContextKeys.REQUEST_PAYLOAD, (SOAPEnvelope) null);
            if (soapPayload != null) {
                SOAPHeader header = soapPayload.getHeader();
                SOAPHeaderElement header1 = (SOAPHeaderElement) header.examineAllHeaderElements().next();
                String prop1 = header1.getTextContent();
                request.getHeaders().put("X-Property-1", prop1);
                header.addHeaderElement(new QName("urn:ns5", "Property5")).setTextContent("value-5");
            }
            chain.doApply(request);
        } catch (Exception e) {
            chain.throwError(e);
        }
    }
@see io.apiman.gateway.engine.policy.IPolicy#apply(io.apiman.gateway.engine.beans.ApiRequest, io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object, io.apiman.gateway.engine.policy.IPolicyChain)
gateway/test/src/test/java/io/apiman/gateway/test/policies/SimpleSoapPayloadPolicy.java