Unexpected error invoking web service

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

robdavidsalmon
Ebase User
Posts: 4
Joined: Fri Sep 05, 2014 12:01 pm
Location: Wandsworth, London
Contact:

Unexpected error invoking web service

#1

Postby robdavidsalmon » Wed Mar 01, 2017 6:45 pm

Hi I'm trying to debug a web service call and I'm a bit stuck: Could someone clarify if the "Unexpected error invoking web service: Could not invoke service." error I'm getting in Ebase's execution logs occurs as a result of a web service literally not being called properly or is just a symptom of getting a bad response to a call? I suspect it is the latter as the execution log for one of my calls appears to show both the body of my intended request and also a 500 Internal Server error as a response, which presumably I wouldn't get if the call was never made in the first place.

I've included the execution log below not because I'm expecting anyone to work out what is wrong with my request - I can work that out with the web service provider - but to double check that the error is thrown because I get a 500 Internal Server error as response:

Code: Select all

16:59:57.095 Debug: Sending request to: https://sbsctest.e-paycapita.com:443/scp/scpws/
16:59:57.101 Debug: Outbound Message
---------------------------
ID: 55
Address: https://sbsctest.e-paycapita.com:443/scp/scpws/
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=[""], Accept=[*/*], ebase_designer_user=[681ac8cb83cb97e3fe111fe6e2dfc817]}
Messages: (message truncated to -1 bytes)

Payload&#58; <xml><soap>
  <soap>
    <sim>
      <com>
        <com>
          <com>CapitaPortal</com>
          <com>373029584</com>
          <com>SCP</com>
        </com>
        <com>
          <com>3u9l9knfkbe83wbwy6c6bg</com>
          <com>20170301165957</com>
        </com>
        <com>
          <com>Original</com>
          <com>456</com>
          <com>4z0tdt3EWazMj3S4dA2zandj2vI9wJ08Gx6rLKt4Ad0=</com>
        </com>
      </com>
      <base>payOnly</base>
      <base>12345</base>
      <base>
        <base>https&#58;//www.wandsworth.gov.uk</base>
        <base>https&#58;//www.wandsworth.gov.uk/</base>
        <base>516</base>
        <base>373029584</base>
      </base>
      <base>ECOM</base>
      <base>
        <base>
          <base>
          <base>
        </base>
        <base>SCP</base>
      </base>
      <base>
        <base>
          <base>
            <base>
            <base>
          </base>
          <base>
            <base>
            <base>
          </base>
        </base>
      </base>
      <sim>
        <base>
          <base>Stuff</base>
          <base>1234</base>
        </base>
        <base>
          <base>
            <base>
          </base>
        </base>
      </sim>
    </sim>
  </soap>
</soap>

--------------------------------------
16&#58;59&#58;57.553 Debug&#58; Inbound Message
----------------------------
ID&#58; 55
Response-Code&#58; 500
Encoding&#58; ISO-8859-1
Content-Type&#58; text/html
Headers&#58; &#123;SOAPAction=&#91;""&#93;, Accept=&#91;text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&#93;, Server=&#91;Microsoft-IIS/8.5&#93;, Cache-Control=&#91;no-cache&#93;, content-type=&#91;text/html&#93;, Expires=&#91;Thu, 01 Jan 1970 00&#58;00&#58;00 GMT&#93;, Pragma=&#91;no-cache&#93;, Content-Length=&#91;1208&#93;, Date=&#91;Wed, 01 Mar 2017 16&#58;59&#58;53 GMT&#93;, X-Powered-By=&#91;ASP.NET&#93;&#125;
Messages&#58; &#40;message truncated to -1 bytes&#41;

Payload&#58; <DOCTYPE>
<html>
<head>
<meta>
<title>500 - Internal server error.</title>
<style>
<body>
</style>
</head>
<body>
<div><h1>Server Error</h1></div>
<div>
 <div><fieldset>
  <h2>500 - Internal server error.</h2>
  <h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
 </fieldset></div>
</div>
</body>
</html>

--------------------------------------
16&#58;59&#58;57.562 Error&#58; Error occurred executing command CALL for resource CAPITA_TEST_SIS - Unexpected error invoking web service&#58;  Could not invoke service. 
16&#58;59&#58;57.564 Error&#58; com.ebasetech.xi.exceptions.FormRuntimeException&#58; Unexpected error invoking web service&#58;  Could not invoke service. 
	at TEST_CAPITA_WEB_SERVICE_REQUEST&#58;75
[/code]
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#2

Postby Steve » Thu Mar 02, 2017 4:06 pm

Hi Rob,

This usually means that the Ebase server cannot establish a connection to the server, but in this case it is cause by the HTTP 500 response.

Is the web server you are calling using a genuine SSL certificate or is it using a self signed one? This might be causing a problem.....

But it looks to me as though you are getting through the SSL handshake and there is another problem as you are getting an actual HTML page as a response from the server. This appears to be responding with an ERROR 500. It might be worth asking the service provider why this might happen.

Kind regards

Steve
0 x

robdavidsalmon
Ebase User
Posts: 4
Joined: Fri Sep 05, 2014 12:01 pm
Location: Wandsworth, London
Contact:

#3

Postby robdavidsalmon » Thu Mar 02, 2017 4:36 pm

Thanks for the clarification Steve,

I think I've already overcome the SSL issues by importing the certificate into the keystore. It definitely looks like it is my actual request that is causing the problem. At the moment I working on the assumption that there are two problems with the request: one is that I'm sending through empty elements that aren't really needed so need to be omitted; I know you can specify in the field properties of a Web Service Resource to omit elements where the source field has no value so I'm doing that now; the second issue is that I need to ensure that the digest element of the request is encoded correctly. The value for this field is generated by creating a keyed hash of the values in the Credentials element and I suspect that the code I'm using to generate that is wrong somewhere.
0 x


Who is online

Users browsing this forum: No registered users and 62 guests