Note that there are some explanatory texts on larger screens.

plurals
  1. POIBM Worklight invokeCastIron can't connect to Cast Iron Live instance
    text
    copied!<p>I have a Cast Iron Live instance working with a simple query to Salesforce.com. When I enter the URL in my browser or via curl I get the expected response back. </p> <p>When I try to invoke the equivalent of the same URL in the IBM Worklight adapter, the server continually comes back with 401 Unauthorized HTML response. </p> <p>I've looked for more detailed logs of the actual request Worklight is sending, with no luck. I've also installed Wireshark and sniffed my connection in hopes that I could see the URL or headers, but they're encrypted along with the payload. I've also looked at the Worklight Server JavaScript source for clues, but most of the real work is done in Java class files.</p> <p>Here's my working Cast Iron URL (specifics anonymized, all on a single line): <a href="https://eval-provide.castiron.com/envq/Development/getProducer" rel="nofollow">https://eval-provide.castiron.com/envq/Development/getProducer</a>? ciUser=admin@mydomain.com&amp;ciPassword=My@ss4d!</p> <p>Here's my adapter code (again, anonymized): function getProducers() {</p> <pre><code>var input = { method : 'get', appName : 'producers' requestType: 'https', path: '/envq/Development/getProducer', parameters: { ciUser: 'admin@mydomain.com', ciPassword: 'My@ss4d!' }, returnedContentType : 'xml' }; return WL.Server.invokeCastIron(input); } </code></pre> <p>appName and requestType seem to be ignored. I've tried it with them and without them. </p> <p>I've also tried not using the parameters and hardcoding the path to the full string I used in the URL, ie (all on one line of course):</p> <pre><code>path : '/envq/Development/getProducer? ciUser=admin@mydomain.com&amp;ciPassword=My@ss4d!', </code></pre> <p>What do I need to do to get Cast Iron Live and Worklight to authenticate?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload