`

BlazedsUtil 测试类

阅读更多
package cn.ishion.util;
//很简单,这样可以让客户端收到报错信息
import flex.messaging.MessageException;
import flex.messaging.messages.Message;
import flex.messaging.services.remoting.adapters.JavaAdapter;

public class DebugAdapter extends JavaAdapter {

	@Override
	public Object invoke(Message arg0) {
		
		Object result=null;
		try{
			result=super.invoke(arg0);
		}catch(Exception e){
			e.printStackTrace();
			MessageException me = new MessageException(e.getMessage());
	         me.setCode("远程调用失败"+e.getMessage());
	         throw me;
		}
		return result;
		
		
	}
}

 remote-config.xml

  <adapter-definition id="java-object" class="

cn.ishion.util.DebugAdapter 

.JavaAdapter" default="true"/>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics