Home
Find the answer to your question
Can I get the raw SOAP request and response of a call when I use the SDK?
Summary
Yes, you can get the raw SOAP request and response of a call by making use of
the call ApiBaseCall object.
using System; using eBay.Service.Call; using eBay.Service.Core.Sdk; using eBay.Service.Util; using eBay.Service.Core.Soap; namespace eBayWebServices
public class SDKSample }
{
public void GetSoapRequestResponse(string
uuid)
{ GeteBayOfficialTimeCall apicall = new GeteBayOfficialTimeCall(GetContext()); apicall.Execute(); //Get the raw SOAP request string request = apicall.ApiCallBase.SoapRequest; //Get the raw SOAP response string response = apicall.ApiCallBase.SoapResponse; } public ApiContext
GetContext()
// Credentials for the call
}
context.ApiCredential.ApiAccount.Developer = "devID"; context.ApiCredential.ApiAccount.Application = "appID"; context.ApiCredential.ApiAccount.Certificate = "certID"; context.ApiCredential.eBayToken = "token"; // Set the URL // Set logging // Set the version return context; } |
Version Info
The code example above was based on the versions specified below:
API Schema Version | 495 |
.NET SDK Version | .NET SDK v495.0 full release |