function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rajanrajan 

Error when calling new Metadata spring pre relies 2008 API

    Hi ,

I am trying to call the retrive API of new Metadata spring pre relies 2008 API.My code is

  1.                 binding_MS = new MetadataService();
  2.                 binding_MS.SessionHeaderValue = new         Automation_Tool_1._1.NewMetaSforce.SessionHeader();
  3.                 binding_MS.Url = binding.Url;
  4.                 binding_MS.SessionHeaderValue.sessionId = binding.SessionHeaderValue.sessionId;
  5.                 DescribeGlobalResult aa = binding.describeGlobal();
  6.                 RetrieveRequest RR = new RetrieveRequest();
  7.                 RR.packageNames = new string[] { "testingPack" };
  8.                 RR.singlePackage = true;
  9.                 AsyncResult Aresult = binding_MS.retrieve(RR);
  10.                 DescribeMetadataResult abc = binding_MS.describeMetadata();


But at the retrive  call (bold line in code line 9 ) I get the exception
No operation available for request {http://soap.sforce.com/2006/04/metadata}retrieve

any idea anybody ,please help

Thanks,
Rajan

SuperfellSuperfell
The metadata endpoint URL is not the same as the enterprise or partner URLs (where you seem to be copying it from).
rajanrajan

Yah I got the probe just change the line

binding_MS.Url =ninding.url

with

binding_MS.Url = loginResult.metadataServerUrl;

 

 

 

HeatherTHeatherT
I am getting the exact same thing all of a sudden using the getUserInfo API. 
 
I get the following exception in .Net {"No operation available for request {urn:enterprise.soap.sforce.com}getUserInfo" }