110,473
社区成员
发帖
与我相关
我的任务
分享
com.sogou.agent.api.ReportService rs = new com.sogou.agent.api.ReportService();
rs.AuthHeaderValue = new com.sogou.agent.api.AuthHeader() { username="111",password="333"};
rs.getReportId(new com.sogou.agent.api.ReportRequestType() { reportType=10 ,platform=1});
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthHeader xmlns="http://api.sogou.com/sem/common/v1">
<username>111</username>
<password>333</password>
<apiusertype xsi:nil="true"/>
</AuthHeader>
</soap:Header>
<soap:Body>
<getReportIdRequest xmlns="https://api.sogou.com/sem/sms/v1">
<reportRequestType xmlns="">
<startDate>0001-01-01T00:00:00</startDate>
<endDate>0001-01-01T00:00:00</endDate>
<reportType>10</reportType>
</reportRequestType>
</getReportIdRequest>
</soap:Body>
</soap:Envelope>
public bool platformSpecified {
get {
return this.platformFieldSpecified;
}
set {
this.platformFieldSpecified = value;
}
}
get值修改为true<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthHeader xmlns="http://api.sogou.com/sem/common/v1">
<username>111</username>
<password>333</password>
<apiusertype xsi:nil="true"/>
</AuthHeader>
</soap:Header>
<soap:Body>
<getReportIdRequest xmlns="https://api.sogou.com/sem/sms/v1">
<reportRequestType xmlns="">
<startDate>0001-01-01T00:00:00</startDate>
<endDate>0001-01-01T00:00:00</endDate>
<reportType>10</reportType>
<platform>1</platform>
</reportRequestType>
</getReportIdRequest>
</soap:Body>
</soap:Envelope>
Sogou.ReportService r = new Sogou.ReportService();
r.AuthHeaderValue =new Sogou.AuthHeader() { username = "111", password = "333" };
r.getReportId(new Sogou.ReportRequestType() { reportType = 10, platform = 1 });
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><AuthHeader xmlns="http://api.sogou.com/sem/common/v1"><username>111</username><password>333</password><apiusertype xsi:nil="true" /></AuthHeader></soap:Header><soap:Body><getReportIdRequest xmlns="https://api.sogou.com/sem/sms/v1"><reportRequestType xmlns=""><startDate>0001-01-01T00:00:00</startDate><endDate>0001-01-01T00:00:00</endDate><reportType>10</reportType></reportRequestType></getReportIdRequest></soap:Body></soap:Envelope>
用ws代理类也一样,值传不进来wsdl.exe /l:cs /n:Sogou /out:D:/ReportService.cs http://api.agent.sogou.com/sem/sms/v1/ReportService?wsdl
在vs开发人员命令符中生成ws的代理文件