File: TestHandler.java

package info (click to toggle)
axis 1.4-29
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 52,100 kB
  • sloc: java: 129,124; xml: 10,602; jsp: 983; sh: 84; cs: 36; makefile: 18
file content (24 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package test.wsdl.axis2098;

import java.io.ByteArrayOutputStream;

import org.apache.axis.AxisFault;
import org.apache.axis.MessageContext;
import org.apache.axis.handlers.BasicHandler;

public class TestHandler extends BasicHandler {
    public void invoke(MessageContext msgContext) throws AxisFault {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
		
        try {
            msgContext.getCurrentMessage().writeTo(baos);
        } catch (Exception e) {
            throw new AxisFault("exception", e);
        }
        String msg = baos.toString();
        System.out.println("msg = " + msg);
        if (msg.indexOf("xsi:type") >= 0) {
            throw new AxisFault("message contains xsi:type");
        }
    }
}