Skip to main content
Published: March 01 2007, 10:59:00 AMUpdated: November 28 2020, 1:18:29 PM

Can I get the raw SOAP request and response of a call when I use the SDK?


Yes, you can get the raw SOAP request and response of a call by making use of the call ApiBaseCall object.

Detailed Description

Here is a C# code example of how you can get the SOAP request and response for GeteBayOfficialTime:
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());
    //Get the raw SOAP request
    string request = apicall.ApiCallBase.SoapRequest;
    //Get the raw SOAP response
    string response = apicall.ApiCallBase.SoapResponse;

    public ApiContext GetContext()
       ApiContext context = new ApiContext();

  // 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
  context.SoapApiServerUrl = ""; 

  // Set logging
  context.ApiLogManager = newApiLogManager();
  context.ApiLogManager.ApiLoggerList.Add(new eBay.Service.Util.FileLogger("Messages.log", true, true, true));
  context.ApiLogManager.EnableLogging = true;

  // Set the version
  context.Version = "495";

  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

How well did this answer your question?
Answers others found helpful