package com.trs.web2frame.myutils;

import java.util.HashMap;
import java.util.Map;

import com.trs.web2frame.WCMServiceCaller;
import com.trs.web2frame.dispatch.Dispatch;

public class UploadTest {
	public static void main(String[] args) throws Exception {
/*		 Dispatch uploadFile = WCMServiceCaller.UploadFile("D:\\download\\rsb\\temp\\W020190704600316404555.jpg");
		 System.out.println(uploadFile);*/
		 
	    	Map<String,Object> quoteMap = new HashMap<>();
	    	quoteMap.put("ObjectId", 0);
	    	quoteMap.put("ChannelId", 4);// 目标栏目id
	    	quoteMap.put("CurrUserName", "dev");
	    	quoteMap.put("doctitle", "title1");
	    	quoteMap.put("doctype", 20);
	    	quoteMap.put("dochtmlcon", "<p>\r\n" + 
	    			"    <img src=\"https://www.baidu.com/img/flexible/logo/pc/result@2.png\" ignore=1 alt=\"\"/>sss\r\n" + 
	    			"sss\r\n" + 
	    			"</p>");
	    	Dispatch result = WCMServiceCaller.Call("gov_webdocument", "saveDocumentInWeb", quoteMap, true);

			
	}
}
