cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to connect to Discovery Accelerator API

TimothyDilbert
Level 2

Hello Everyone,

I'm trying to connect to the Discovery Accelerator API but keep getting the following error when I call the GetConfigurationData() method. Here is the code i'm using to connect.


DiscoverySoapClient c = new DiscoverySoapClient();
c.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
c.Open();

try
{
   
var con = c.GetConfigurationData();
    int offset = 0;
   
int count = con.MaximumItemChunkSizeBytes;
   
string temp = Path.GetTempFileName();

   
using (FileStream fs = File.OpenWrite(temp))
   
{
       
while (true)
       
{
           
byte[] data = c.GetItem(28390389021, offset, count, out contentInfo);
            
fs.Write(data, 0, data.Length);
            
offset += data.Length;

           
if (data.Length < count)
               
break;
        
}
    
}

   
FileInfo fi = new FileInfo(temp);
   
fi.MoveTo(fn);
   
Assert.IsTrue(File.Exists(fn));
}
catch
{
   
c.Close();
}
 


Here is my web.config file;


<?xml version="1.0" encoding="utf-8" ?>

<configuration>
    <system.serviceModel>
       
<bindings>
           
<basicHttpBinding>
               
<binding name="DiscoverySoap" closeTimeout="00:01:00" openTimeout="00:01:00"
                       
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                       
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                       
maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
                       
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                       
useDefaultWebProxy="false">
                   
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                               
maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
                   
<security mode="TransportCredentialOnly">
                       
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
                       
<message clientCredentialType="UserName" algorithmSuite="Default" />
                   
</security>
               
</binding>
           
</basicHttpBinding>
        </bindings>
       
<client>
           
<endpoint address=http://NAME.OF.THE.SERVER/generalsearch/discovery.asmx
                    binding="basicHttpBinding" bindingConfiguration="DiscoverySoap"
                   
contract="SymantecWS.DiscoverySoap" name="DiscoverySoap" />
       
</client>
    </system.serviceModel>
</configuration>


The error I'm getting is the following;

 

1 REPLY 1

TimothyDilbert
Level 2

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> KVS.Accelerator.Common.AccServerUnavailableException: There are no servers available at the moment, please try again later.

Server stack trace:


Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at KVS.Accelerator.Interfaces.IRBO_WebServiceAPI.GetConfigurationData()
   at KVS.Accelerator.WebService.Discovery.GetConfigurationData()
   --- End of inner exception stack trace ---