use of org.apache.axiom.ts.soap.BooleanAttributeAccessor in project webservices-axiom by apache.
the class TestSetBooleanAttribute method runTest.
@Override
protected void runTest() throws Throwable {
SOAPHeaderBlock soapHeaderBlock = createSOAPHeaderBlock();
BooleanAttributeAccessor accessor = attribute.getAdapter(BooleanAttributeAccessor.class);
accessor.setValue(soapHeaderBlock, value);
assertEquals(value, accessor.getValue(soapHeaderBlock));
Iterator<OMAttribute> it = soapHeaderBlock.getAllAttributes();
assertTrue(it.hasNext());
OMAttribute att = it.next();
OMNamespace ns = att.getNamespace();
assertEquals(spec.getEnvelopeNamespaceURI(), ns.getNamespaceURI());
assertEquals(attribute.getName(spec), att.getLocalName());
assertEquals(spec.getCanonicalRepresentation(value), att.getAttributeValue());
assertFalse(it.hasNext());
}
Aggregations