You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using RpcHelper;
using Test.webservice;
namespace Test {
class Program {
static void Main(string[] args) {
var web = new Service();
var r= InsertPlan(web);
Console.WriteLine(r);
Console.Read();
}
private static string InsertPlan(Service web) {
var o = new Gatherings();
var bill = new Gathering();
bill.Head.CustomerCode = "0036";
bill.Head.Time = "2016-04-06 12:00";
bill.Head.RequestId = "201604061200001";
bill.Head.Money = "100";
o.Bills.Add(bill);
var data = RpcHelperUtil.ObjToXml(o, Formatting.Indented, Encoding.GetEncoding("gb2312"));
//var xx = RpcHelper.ParseXmlToMsg<FeedPlans>(data);
Console.WriteLine(data);
//web.Url = "http://203.86.48.90:81/bwprpc/Service.asmx";
// web.Url = "http://192.168.1.2/bwprpc/Service.asmx";
web.Url = "http://localhost:2100/WanFuSale/Service.asmx";
var xml = web.InsertGathering(data);
return xml;
}
}
}