webservice的参数赋了值但是post的时候值就没了

李敢敢 2019-06-13 04:41:37
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:AuthHeader xmlns:h="http://api.sogou.com/sem/common/v1" xmlns="http://api.sogou.com/sem/common/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<username>******************</username>
<password>*************</password>
<token>*****************</token>
<apiusertype xsi:nil="true"/>
</h:AuthHeader>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<getReportIdRequest xmlns="https://api.sogou.com/sem/sms/v1">
<reportRequestType xmlns="">
<performanceData>cost</performanceData>
<performanceData>cpc</performanceData>
<performanceData>click</performanceData>
<performanceData>impression</performanceData>
<performanceData>ctr</performanceData>
<startDate>2019-06-12T00:00:00</startDate>
<endDate>2019-06-12T23:59:59</endDate>
<reportType>5</reportType>
</reportRequestType>
</getReportIdRequest>
</s:Body>
</s:Envelope>


后面是用fiddler抓到的数据,求大佬帮忙
...全文
234 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
李敢敢 2019-06-14
  • 打赏
  • 举报
回复
引用 9 楼 懒懒懒源 的回复:
webservice地址名错误,是sogou不是sougou
已解决 感谢回复 原因是Specified可能是false,我把Specified值改成了true
  • 打赏
  • 举报
回复
webservice地址名错误,是sogou不是sougou
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
com.sogou.agent.api.ReportService rs = new com.sogou.agent.api.ReportService();
rs.getReportId(new com.sogou.agent.api.ReportRequestType() { platform=1});

不知道为啥platform就是传不出来
<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: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>0</reportType>
</reportRequestType>
</getReportIdRequest>
</soap:Body>
</soap:Envelope>
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
引用 5 楼 娃都会打酱油了 的回复:
是wcf方式生成,还是ws方式生成?最好是ws方式生成

下载“http://api.agent.sougou.com/sem/sms/v1/ReportService?wsdl”时出错。
- 未能解析此远程名称: 'api.agent.sougou.com'
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
引用 5 楼 娃都会打酱油了 的回复:
是wcf方式生成,还是ws方式生成?最好是ws方式生成
添加服务引用加进来的,我试试ws生成
  • 打赏
  • 举报
回复
是wcf方式生成,还是ws方式生成?最好是ws方式生成
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
引用 2 楼 娃都会打酱油了 的回复:
你是通过ws代理生成的,还是自己拼接的xml报文,然后post传递的?
引用服务生成的
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
引用 2 楼 娃都会打酱油了 的回复:
你是通过ws代理生成的,还是自己拼接的xml报文,然后post传递的?
直接引用服务的生成的
  • 打赏
  • 举报
回复
你是通过ws代理生成的,还是自己拼接的xml报文,然后post传递的?
李敢敢 2019-06-13
  • 打赏
  • 举报
回复
图片不知道为啥没了

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧