1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.soap.axiom;
18
19 import java.util.Arrays;
20 import java.util.Iterator;
21 import java.util.List;
22
23 import org.springframework.util.ObjectUtils;
24 import org.springframework.ws.soap.SoapHeaderElement;
25 import org.springframework.ws.soap.soap11.Soap11Header;
26
27 import org.apache.axiom.soap.RolePlayer;
28 import org.apache.axiom.soap.SOAPFactory;
29 import org.apache.axiom.soap.SOAPHeader;
30 import org.apache.axiom.soap.SOAPHeaderBlock;
31
32
33
34
35
36
37
38 class AxiomSoap11Header extends AxiomSoapHeader implements Soap11Header {
39
40 AxiomSoap11Header(SOAPHeader axiomHeader, SOAPFactory axiomFactory) {
41 super(axiomHeader, axiomFactory);
42 }
43
44 @SuppressWarnings("unchecked")
45 public Iterator<SoapHeaderElement> examineHeaderElementsToProcess(final String[] actors) {
46 RolePlayer rolePlayer = null;
47 if (!ObjectUtils.isEmpty(actors)) {
48 rolePlayer = new RolePlayer() {
49
50 public List<?> getRoles() {
51 return Arrays.asList(actors);
52 }
53
54 public boolean isUltimateDestination() {
55 return false;
56 }
57 };
58 }
59 Iterator<SOAPHeaderBlock> result = (Iterator<SOAPHeaderBlock>)getAxiomHeader().getHeadersToProcess(rolePlayer);
60 return new AxiomSoapHeaderElementIterator(result);
61 }
62 }