01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.axis2.jaxws.dispatchers;
20:
21: import org.apache.axiom.soap.SOAPEnvelope;
22: import org.apache.axiom.soap.SOAPHeaderBlock;
23: import org.apache.axis2.AxisFault;
24: import org.apache.axis2.context.MessageContext;
25: import org.apache.axis2.description.AxisOperation;
26: import org.apache.axis2.description.Parameter;
27: import org.apache.axis2.jaxws.description.OperationDescription;
28: import org.apache.commons.logging.Log;
29: import org.apache.commons.logging.LogFactory;
30:
31: import javax.xml.namespace.QName;
32:
33: import java.util.ArrayList;
34: import java.util.Iterator;
35:
36: /**
37: * Plugin to remove "understood" headers for the JAXWS related headers. This class must
38: * be configured in the axis2.xml file on both the client and the server.
39: *
40: * Understood headers (per JAXWS 2.0 Section 10.2) include
41: * - Headers that correspond to SEI method parameters.
42: */
43: public class MustUnderstandChecker extends
44: org.apache.axis2.handlers.AbstractHandler {
45: private static final Log log = LogFactory
46: .getLog(MustUnderstandChecker.class);
47:
48: public InvocationResponse invoke(MessageContext msgContext)
49: throws AxisFault {
50: // Get the list of headers for the roles we're acting in, then mark any we understand
51: // as processed.
52: MustUnderstandUtils.markUnderstoodHeaderParameters(msgContext);
53: return InvocationResponse.CONTINUE;
54: }
55: }
|