Microsoft 开发人员网络 >
论坛主页
>
Microsoft adCenter: Development
>
soap trace - response p3p - is information encoded
soap trace - response p3p - is information encoded
- Hi,
recently we received adcenter credentials (after over an year of struggle :)
we use .net 2/c# for our application. webservices are a main part of it.
currently we connect to a number of channels, some of which are adwords and ysm.
I invested a lot of effort in the past, making generic solutions, regarding soap tracing for webservices. this is a very important issue for us, since each channel support team, require nothing less but the soap trace log (in case of problems).
after i got adcenter credentials, i started working on it, thinking that it'll take me a couple of hours and we'll have at least the adcenter reports in our system. now, here i am after a couple of days, instaling .net 3+, learning about WCF, finding out and implementing a soap trace mechanism from scratch, etc.
here are a part of the questions I wanted to ask:
1. I tried the good old soapextension (http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension.aspx). it didn't work for the proxy generated by svcutil. (it works though for proxies generated by wsdl.exe - all over there inherits from System.Web.Services.Protocols.SoapHttpClientProtocol, while this is not the case using svcutil) am i missing something, since i have a great interest in using the soapextension, rather than the new system.serviceModel.diagnostics.messageLogging?
2. below is a soap log, generated using wcf system.serviceModel.diagnostics.messageLogging. What I want to know is:
a) the SubmitGenerateReportResponse object (of adcenter reporting module) has an attribute named ReportRequestId. I don't directly see it in the soap response. Nevertheless, I DO see the TrackingId attribute. I am not familiar with the p3p protocol, but could it be encoded in this part <P3P> CP= " BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo " </P3P>? Or does the p3p do even a more complicated maneuver in order to get the value for ReportRequestId?
b) can I somehow bypass all that? I really miss the wsdl.exe, the soapextension and i really don't need all that "hi tech" policy stuff (p3p).
c) in the config file, generated by svcutil, i tried using the BasicHttpBinding_IReportingService1 binding (rather than BasicHttpBinding_IReportingService). It's supposed to use a non-secure mode (i hoped this will save me at least the p3p protocol). It just doesn't work. I get a reject from the server at http://adcenterapi.microsoft.com/Api/Advertiser/V6/Reporting/ReportingService.svc.
3. I hope i won't offend anyone by this post, but i feel really frustrated and back in first grade. I thought I've passed first grade a long time ago.
<MessageLogTraceRecord Time="2009-06-23T13:37:19.4521250+03:00" Source="TransportSend" Type="System.ServiceModel.Dispatcher.OperationFormatter+OperationFormatterMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<Addressing>
<Action>
SubmitGenerateReport
</Action>
<To>
https://adcenterapi.microsoft.com/Api/Advertiser/V6/Reporting/ReportingService.svc
</To>
</Addressing>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ApplicationToken xmlns:h="https://adcenter.microsoft.com/v6">
xxx
</h:ApplicationToken>
<h:CustomerAccountId i:nil="true" xmlns:h="https://adcenter.microsoft.com/v6" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></h:CustomerAccountId>
<h:CustomerId i:nil="true" xmlns:h="https://adcenter.microsoft.com/v6" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></h:CustomerId>
<h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v6">
xxx
</h:DeveloperToken>
<h:Password xmlns:h="https://adcenter.microsoft.com/v6">
xxx
</h:Password>
<h:UserName xmlns:h="https://adcenter.microsoft.com/v6">
xxx
</h:UserName>
</s:Header>
</s:Envelope>
</MessageLogTraceRecord>
<MessageLogTraceRecord Time="2009-06-23T13:37:21.6865000+03:00" Source="TransportReceive" Type="System.ServiceModel.Channels.BufferedMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<HttpResponse>
<StatusCode>
OK
</StatusCode>
<StatusDescription>
OK
</StatusDescription>
<WebHeaders>
<Content-Length>
372
</Content-Length>
<Cache-Control>
private
</Cache-Control>
<Content-Type>
text/xml; charset=utf-8
</Content-Type>
<Date>
Tue, 23 Jun 2009 10:37:26 GMT
</Date>
<P3P>
CP=
"
BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo
"
</P3P>
<Server>Microsoft-IIS/6.0
</Server>
<X-AspNet-Version>
2.0.50727
</X-AspNet-Version>
<X-Powered-By>
ASP.NET
</X-Powered-By>
</WebHeaders>
</HttpResponse>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:TrackingId xmlns:h="https://adcenter.microsoft.com/v6">
24e690a8-f69a-484d-9abd-3a4501717929
</h:TrackingId>
</s:Header>
</s:Envelope>
</MessageLogTraceRecord>
全部回复
- We have instructions here on capturing SOAP:
http://community.microsoftadvertising.com/blogs/api/archive/2009/01/08/soap-capture-training-video.aspx
http://social.msdn.microsoft.com/Forums/en-US/adcenterdev/thread/0061ea66-f58e-484b-a668-0aadd3d8dcd6/
Hope this helps. And our SOAP response is not encoded.
Jeff Dillon, API Support

