| 1 |
package test.wsdl.axis2098; |
| 2 |
|
| 3 |
import java.io.ByteArrayOutputStream; |
| 4 |
|
| 5 |
import org.apache.axis.AxisFault; |
| 6 |
import org.apache.axis.MessageContext; |
| 7 |
import org.apache.axis.handlers.BasicHandler; |
| 8 |
|
| 9 |
public class TestHandler extends BasicHandler { |
| 10 |
public void invoke(MessageContext msgContext) throws AxisFault { |
| 11 |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| 12 |
|
| 13 |
try { |
| 14 |
msgContext.getCurrentMessage().writeTo(baos); |
| 15 |
} catch (Exception e) { |
| 16 |
throw new AxisFault("exception", e); |
| 17 |
} |
| 18 |
String msg = baos.toString(); |
| 19 |
System.out.println("msg = " + msg); |
| 20 |
if (msg.indexOf("xsi:type") >= 0) { |
| 21 |
throw new AxisFault("message contains xsi:type"); |
| 22 |
} |
| 23 |
} |
| 24 |
} |