Topic: 我用AXIS开发Web services时,自己定制的handler不能调用???

  Print this page

1.我用AXIS开发Web services时,自己定制的handler不能调用??? Copy to clipboard
Posted by: sssmaan
Posted on: 2004-09-17 16:26

我用AXIS开发Web services时,自己定制的handler不能调用???
1。public class showSOAP_HAND implements Handler {
public showSOAP_HAND() {
}
public boolean handleRequest(MessageContext context) {
//作用就是把SOAPMessage 写到 server_soap.txt;
if(context instanceof SOAPMessageContext)
{
SOAPMessageContext msg=(SOAPMessageContext)context;
SOAPMessage soap=msg.getMessage();
//soap.writeTo(System.out);

FileOutputStream out=new FileOutputStream ("c:\\server_soap.txt",true);
PrintWriter pw=new PrintWriter(out);
pw.print(soap.toString());
pw.close();

soap.writeTo(out) ;

throw new java.lang.UnsupportedOperationException("Method handleRequest() not yet implemented.");
}

2.进行make,然后更改server-config.wsdd:
<service name="webservices_Bean" type="" regenerateElement="true"
provider="java:RPC" style="rpc" use="encoded">
<parameter name="scope" value="Request" regenerateElement="false"/>
<parameter name="className" value="webservices_Bean" regenerateElement="false"/>
<parameter name="allowedMethods" value="*" regenerateElement="false"/>
<requestFlow>

<handler type="DefaultNamespace.showSOAP_HAND"/>

</requestFlow>

</service>

注意:DefaultNamespace是showSOAP_HAND的包!!
3。应用客户端调用;
问题:服务器端好像没有执行这个showSOAP_HAND,因为没有任何信息显示,并且server_soap.txt文件中没有任何东西!!我现在不知道我那儿出问题了??请求你的帮忙,再次感谢!!!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923