ManualSAMLEntry extends WssEntryBase { public void process(WSSecHeader secHeader, Document doc, PropertyExpansionContext context) { if (StringUtils.isNullOrEmpty(samlAssertion)) { return; } try { String samlAssertionValue = context.expand(samlAssertion); if (!(samlAssertionValue != null && samlAssertionValue.contains(WSConstants.SIG_NS) && samlAssertionValue.contains("SignatureValue"))) { samlAssertionValue = XmlUtils.stripWhitespaces(samlAssertionValue); } Document samlAssertionDOM = XmlUtils.parseXml(samlAssertionValue); Element samlAssertionRootElement = samlAssertionDOM.getDocumentElement(); AssertionWrapper assertion = new AssertionWrapper(samlAssertionRootElement); WSSecSAMLToken wsSign = new WSSecSAMLToken(); wsSign.build(doc, assertion, secHeader); } catch (Exception e) { SoapUI.logError(e); } }  void init(WSSEntryConfig config, OutgoingWss container); void process(WSSecHeader secHeader, Document doc, PropertyExpansionContext context); String getSamlAssertion(); void setSamlAssertion(String samlAssertion); static final String TYPE; }
@Test public void testProcess() throws XPathExpressionException, IOException { manualSAMLentry.setSamlAssertion(TestUtils.SAMPLE_SAML_1_ASSERTION); manualSAMLentry.process(secHeader, doc, contextMock); assertNotNull(xpath.evaluate(" assertEquals("1", xpath.evaluate(" assertEquals("1", xpath.evaluate(" }