Sales Force Integration

Certified Lead Developer

While integrating enterprise SOAP wsdl of salesforce using call web service node or a!webservicequery() function, getting the error

"Received the following HTTP response from the remote server: 405 (APNX-1-4045-001)" which translates to "The method specified in the Request-Line isn’t allowed for the resource specified in the URI." which I believe maybe because the call web service node and a!webservicequery() function pass the method as GET in the request and the wsdl supports POST. Please correct me if I am wrong.

My wsdl version is 43.0. Since it is salesforce enterprise wsdl, I cannot use connectors. Is there a way to integrate the wsdl using call web service node or a!webservicequery()

 

Thanks in advance.

  Discussion posts and replies are publicly visible

  • Hi Aditya,
    Someone in the community might be able to help you.
    But, I expect we'll all need to see the formatted calls and responses to provide any valuable insights.

    Thanks
  • Hello AdityaU

    I don't think the error has something to do with http get and post.

    For me it sounds more like a problem in the WSConfig with one of this parameters : service, operation, port. based on the error you shared
    * "The method specified in the Request-Line isn’t allowed for the resource specified in the URI"
    * or maybe another aprameters like wsHttpHeaderField

    I am assuming you already tested the service in an external program like SOAP UI? If so, try to look at the parameters auto-populated when importing the WSDL

    From the Salesforce point of view does the user has the “API Enabled” permission

    As Robert mentioned we need more information about this, it can be useful if you can share your expression to review it (we don;t need the endpoints) .

    Jose
  • 0
    Certified Lead Developer
    Hi may I know what's the use of
    This wsdl url, is this for Authentication or to perform CRUD operation on Salesforce?


    Because if it's purpose is Authentication, then I suspect on two key factors
    1. The parameters and their values ( client id, client secret, username, password, grant_type etc..)

    2. Method should be used as POST and the operation should be Queries the data

    Steps to debug:

    Try using SOAPUI or any third party client and try invoking this service, upon successful integration, try to have a look on the method and parameters and then configure the same in Appian.

    Also if possible, try to have a quick chat with salesforce and ask them the required parameters they expect to authenticate their system. Also do suggest them that it's better if they can migrate their service to REST based, it will be more convenient to work with REST compared to SOAP.

    Hope this will help in debugging this issue.
  • 0
    Certified Lead Developer
    in reply to josep

    Hi Jose,

    Below is my expression,

    webservicequery(
    wsConfig:a!wsConfig(
    wsdlUrl: "endpoint url",
    service:"SforceService",
    port:"Soap",
    operation:"describeSObjects",
    wsdlCredentials:a!wsHttpCredentials(
    username:"abc",
    password:"abc"
    )
    ),
    inputVar: {
    describeSObjectsRequest: {"Account"}
    }
    )

    Also, If I pass the endpoint url in SOAP UI while creating a new Project, the error log throws the below error:

    "HTTP/1.1 405 GET not supported".

    Thanks

  • 0
    Certified Lead Developer
    in reply to aloks0189

    Hi Alok, the wsdl has many operations ranging from login to querying.

    When I use SOAP UI, after downloading the WSDL in my local machine, it works. However, it does not work when I directly pass the endpoint url into SOAP UI throwing the error message : "HTTP/1.1 405 GET not supported".

    Also as per my understanding, call web service node and a!webservicequery() function use get method to send requests. How can I achieve the same using POST method?

     

    Thanks.

  • Hello AdityaU,

    I hope this still works for you, haven't used this integration lately but let me share with you some of my notes:

    One of the things to consider during the integration with salesforce is that the endpoint can be dynamic and you will get the endpoint after you execute the login WSDL
    "Salesforce returns an XML response that includes <sessionId> and <serverUrl> elements. " read more on:
    developer.salesforce.com/.../asynch_api_quickstart_login.htm

    With that endpoint you will be able to call the Enterprise WSDL.

    But here is something you need to do additionally.
    1) You can use the UDDI configuration (deprecated)
    * docs.appian.com/.../UDDI_Configuration.html
    by doing this you can use the Smart service with the dynamic Endpoint.

    2) As you noticed when you download the file and load it to the SOAP UI It load properly, but you cannot use the URL like "xxxx.salesforce.com/.../wsdl.jsp from which you downloaded the file so the workaround can be to upload in fome http server or somewhere "internally" the WSDL so you can download it and then make the required call.
    Just be careful since this is your whole Enterprise objects .

    3) Another option in case you are not making too much complex operations is to use the REST API which includes the CRUD but using their our SQL like language
    for example :
    developer.salesforce.com/.../dome_query.htm
    or
    developer.salesforce.com/.../dome_update_fields.htm

    4) Finally the Plugin option

    Hope this helps

    Jose