Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ServiceNow Connector]Tables API occurs an error #1312

Closed
isuruuy429 opened this issue Mar 25, 2020 · 1 comment
Closed

[ServiceNow Connector]Tables API occurs an error #1312

isuruuy429 opened this issue Mar 25, 2020 · 1 comment

Comments

@isuruuy429
Copy link
Contributor

isuruuy429 commented Mar 25, 2020

Steps to reproduce:

  1. Get an instance from ServiceNow and obtain the credentials.
  2. Create a table called u_laptops_hp
  3. Create an ESB Solution Project in Integration Studio and create a Connector Exporter Project by adding the ServiceNow Connector.
  4. Create the following API.
<?xml version="1.0" encoding="UTF-8"?>
<api context="/servicenow" name="ServiceNowAPI" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence>
            <servicenow.init>
                <serviceNowInstanceURL>dev55707.service-now.com</serviceNowInstanceURL>
                <username>admin</username>
                <password>Diazo123@</password>
            </servicenow.init>
            <servicenow.getRecords>
                <tableName>u_laptops_hp</tableName>
                <sysparmLimit>1</sysparmLimit>
            </servicenow.getRecords>
            <log level="full">
                <property name="serviceNowLog" value="=========="/>
            </log>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>
  1. Run the composite application project in MI and invoke the API.

Expected:

{
    "result": [
        {
            "sys_id": "47b690d907f7401036baf03c7c1ed0d7",
            "sys_updated_by": "admin",
            "sys_created_on": "2020-03-25 19:45:39",
            "sys_mod_count": "0",
            "sys_updated_on": "2020-03-25 19:45:39",
            "sys_tags": "",
            "sys_class_name": "u_laptops_hp",
            "sys_created_by": "admin"
        }
    ]
}

Actual: Getting the following error.

ERROR_CODE : 401003 ERROR_MESSAGE : The system cannot infer the transport information from the dev55707.service-now.com/api/now/table/u_laptops_hp? URL.

[2020-03-26 01:39:19,222] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out org.apache.axis2.AxisFault: The system cannot infer the transport information from the dev55707.service-now.com/api/now/table/u_laptops_hp?sysparm_limit=1& URL.

Affected Product Version:
MI 1.1.0
EI 6.6.0
Getting the same issue with the POST record as well.[2]

When this is tested through the ServiceNow Rest API[1], this is working as expected.

Request
HTTP Method / URI
GET https://dev55707.service-now.com/api/now/table/u_laptops_hp?sysparm_limit=1

[1] - https://dev55707.service-now.com/$restapi.do?tableName=ldap_ou_config
[2] - https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Table+API+in+ServiceNow#WorkingwithTableAPIinServiceNow-postRecord

@isuruuy429
Copy link
Contributor Author

Once the url was corrected this issue got solved.

@sajinieKavindya sajinieKavindya added this to the 1.2.0-M2 milestone Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants