public MessagePublishResult publishMessage(String accessToken,String message, 
    		String url, String filename,Map<String,String> params)
    {
    	MessagePublishResult result = new MessagePublishResult();
        Map<String, String>data = new HashMap<String,String>();
        data.put("content", message + ' ' + url);
        data.put("access_token" , accessToken);
        data.put("oauth_consumer_key", this.clientId);
        if (this.uid != null) {
            data.put("openid", this.uid);
        } else {
            data.put("openid",params.get("uid"));
        }
        
        String resp = null;
        if (filename != null) {
        	Map<String,String> file = new HashMap<String,String>();
            resp = this.response(HTTPClientUtil.POST_METHOD, TX_PUBLISH_MESSAGE_WITH_PIC,
                data, null, file);
        } else {
            resp = this.response(HTTPClientUtil.POST_METHOD, TX_PUBLISH_MESSAGE_TEXT,
                data, null, null);
        }
        if (resp != null) {
        	Object obj = JSON.parse(resp);
    		JSONObject msg = (JSONObject)obj;
    		
    		int ret = msg.getIntValue("ret");
            
            if (ret == 0) {
                result.setRv(0);
            } else {
            	int errcode = msg.getIntValue("errcode");
                result.setRv(errcode != 0 ? errcode : ret);
                result.setErrmsg(msg.getString("msg"));
            }
            
        } else {
            result.setRv(ERROR_NETWORK_CALL);
        }
        return result;
    }