Gravatar for christopher.gutmanis@aurora.org

Question by cmgutmanis, Feb 3, 2015 2:09 PM

Rest Endpoint 400 error: Unexpected error when performing SOAP call

Hi,

I am using Coveo for Sitecore free edition and have been struggling with getting our deployed environment set up.

The current environment is 2 Azure virtual machines.

  • VM #1: CES 7
  • VM#2 Coveo Search Api + the Sitecore instance

I have installed Coveo and have been able to set up the connections insofar as content is currently being indexed. However, when I go to the content tree in sitecore and try to add a Coveo search page, I get the "Oops! Something went wrong on the server." page.

Digging into the network calls, the call to /coveo/rest seems to return a 200 status code, but digging into the actual HttpResponse headers shows a 400 error with a message of "Unexpected error while performing SOAP call."

I checked the sitecore instance and specific coveo folders in IIS - both have anonymous authentication enabled. My Config.yml reads as follows:

server:
  uri: https://[mysearchvirtualmachine].cloudapp.net:52810/7.0/configsearchservice?wsdl
  serverCertificatePath: C:\[PATH]\cert-ca.pem
  clientCertificatePath: C:\{PATH]\cert-iis.p12

basicAuthentication:
  enabled: false
  provider: Active Directory

windowsAuthentication:
  enabled: true
  provider: Active Directory

guest:
  enabled: false
  name: DOMAIN\user
  provider: Active Directory

Any help would be greatly appreciated.

Thanks!

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Feb 3, 2015 2:17 PM

Your server uri should not end with wsdl. WSDL is the webservice definition. It should be like:

https://[mysearchvirtualmachine].cloudapp.net:52810

You should also have the allowImpersonate attribute set to true in the applications section:

applications:
    allowImpersonate: true

Normally we install CES and the Coveo Search API on the same server to avoid copying the certificates to other servers but your setup is also supported. Also ensure the 52810 port is open in the firewall of the VM #1.

Gravatar for christopher.gutmanis@aurora.org

Comment by cmgutmanis, Feb 3, 2015 3:43 PM

this plus an api service restart resolved the issue, thank you.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Feb 3, 2015 3:58 PM

Yes, a restart of the service is needed when modifying this file.

Gravatar for nona.durham@fmcti.com

Comment by ndurham12, Feb 4, 2015 4:30 PM

Hi,

I've been having the same problem on my development box. I've uninstalled and reinstalled the API without resolving. I'm triple checked the yml file and restarted the service multiple times.

server:
  uri: http://webcmdev.net.fmcti.com:52810
  serverCertificatePath: C:\CES7\Config\Certificates\cert-ca.pem
  clientCertificatePath: C:\CES7\Config\Certificates\cert-iis.p12

basicAuthentication:
  enabled: false
  provider: Active Directory

windowsAuthentication:
  enabled: true
  provider: Active Directory

guest:
  enabled: true
  name: S-1-1-0
  provider: Active Directory
  type: Group

tokens:
  sharedKey: replace this by your own secret shared key

applications:
  - name: Sample Application
    secret: LongNumber
    allowImpersonate: true

I still get the 400 error when using either http://localhost:8080/rest/search or http://HostName:8080/rest/search

{
  "statusCode" : 400,
  "message" : "Unexpected error while performing SOAP call",
  "type" : "UnexpectedSoapErrorException",
  "executionReport" : {
    "type" : "RootReport",
    "description" : "",
    "duration" : 5,
    "result" : "Query(null,null,null,null,null,SortByRelevancy(),[],[],null,null,null,5,false,true,false,false,false,false,0,10,200,0,false,false,[])",
    "childs" : [ {
      "type" : "ExpressionEvaluationReport",
      "description" : "Executing expression ",
      "duration" : 0,
      "result" : "",
      "expression" : "",
      "childs" : [ ]
    }, {
      "type" : "ExpressionEvaluationReport",
      "description" : "Executing expression ",
      "duration" : 0,
      "result" : "",
      "expression" : "",
      "childs" : [ ]
    }, {
      "type" : "ExpressionEvaluationReport",
      "description" : "Executing expression ",
      "duration" : 0,
      "result" : "",
      "expression" : "",
      "childs" : [ ]
    }, {
      "type" : "ExpressionEvaluationReport",
      "description" : "Executing expression ",
      "duration" : 0,
      "result" : "",
      "expression" : "",
      "childs" : [ ]
    } ]
  }
}
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Feb 23, 2016 5:09 PM

Hi Nona,

The Coveo Search Service URI to set in the server/uri setting on the second line of the YAML file should be https://webcmdev.net.fmcti.com:52810

The Coveo Search Service is always running on the HTTPS protocol because it is secured by that cert-iis.p12 certificate.

Change the value, stop and start the Coveo Search API service and you should be running.

Ask a question