Topic
11 replies Latest Post - ‏2013-03-06T14:51:55Z by SystemAdmin
SystemAdmin
SystemAdmin
1250 Posts
ACCEPTED ANSWER

Pinned topic HTTP endpoint error

‏2010-01-04T22:48:20Z |
Hi 
I am trying to connect to a CRM ondemand page.
The hostname is https://secure-ausomxdsa.crmondemand.com
when i click test connection, i get : connected to endpoint successfully
but when i use the verify tab: the result i am getting for it is: 302 - 'temporarily moved'
when i use the explorer, the above link automatically resolves itself to:https://secure-ausomxdsa.crmondemand.com/OnDemand/logon.jsp
so i tried using that, it doesnt seem to be working either, can someone help?
Thanks

 
 
Updated on 2013-03-06T14:51:55Z at 2013-03-06T14:51:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    You have to pass login credentials

    ‏2010-01-04T23:00:17Z  in response to SystemAdmin
    You need to an HTTP POST to the hostname (secure-ausomxapa.crmondemand.com), using the URL /Services/Integration?command=login
    You need to pass the userid and password to that URL as two HTTP headers (case sensitive): UserName and Password
    In response you will receive a JSESSIONID cookie that you can parse from the response HTTP headers.
    Once you have the cookie, you can use it to call the Oracle CRM web service APIs.
    The reason for your redirection in Studio Verify is that you are essentially doing the same as opening a browser and entering https://secure-ausomxapa.crmondemand.com/, which will always redirect to the main login page.
    Regards,
    Alan
    Director of Solutions Engineering and Cast Iron guru.
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    re: HTTP endpoint

    ‏2010-01-05T19:37:33Z  in response to SystemAdmin
    Thanks for the reply.
    So I put in secure-ausomxdsa.crmondemand.com for 'the hostname'
    and
    /OnDemand/logon.jsp?UserName=****&Password=**** for 'the URL after the hostname'
    I did get a response code of 200 and responsemessage 'OK' but the header does not contain the JsessionID like you had mentioned, is there something esle i was supposed to do that i missed?  
    Thanks again for all the help!
    -vijaya 
     
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    You must use the HTTP headers

    ‏2010-01-05T20:07:45Z  in response to SystemAdmin
    You must set the HTTP headers by doing the following:
    1) In the map inputs to the HTTP Post, right-click and select "Show Optional Parameters"
    2) Right-click the headerItem element and select "Expand Occurrences"
    3) Enter 2 for the number of occurrences to expand.
    4) In the first expanded occurrence (not the one with the looping icon), enter "UserName" (no quotes) as the default value for the name element, and the actual username for the value element (you can map this, set a default value, or use a configuration property).
    5) In the second expanded occurrence, enter "Password" (no quotes) as the default value for the name element, and the actual password for the value element (you can map this, set a default value, or use a configuration property).
    6) Set the default value for the uri element to the URI I sent you.
    7) Set the default value for the method element to POST.
    8) Test it out. This setup should now POST the message to the correct endpoint and URI, and the HTTP headers will contain the username and password for that account.
    Alan
    Director of Solutions Engineering and Cast Iron guru.
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    re:

    ‏2010-01-05T21:50:07Z  in response to SystemAdmin
    it worked!
     thank you so much!
     -Vijaya
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    Glad I could help

    ‏2010-01-05T22:10:08Z  in response to SystemAdmin
    Glad I could help!
    Alan
    Director of Solutions Engineering and Cast Iron guru.
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    Hey Alan Thanks for the

    ‏2010-01-06T21:23:11Z  in response to SystemAdmin
    Hey Alan
    Thanks for the help, I have a couple questions. 
    1. I was trying to logout, i finally did 
    but my question is how come i was able to logout without specifically passing the JSessoinID in the URL? for exmaple
    i did not have to put the following in the uri: https://secure-ausomxdsa.crmondemand.com/Services/Integration;jsessionid=***?command=logoff
    i just passed the variable(http_header) from the previous activity and put "/services/integration?command=logoff"...is that okay? or am i just assuming it worked, but in reality it did not?  
    2. Because if the above is okay then I should be able to do other operations like querying for data in the same way right? im having trouble doing it, and im not sure if its because of the sessionid or because i missed out on proving some input information, thats the reason i was asking
    Thanks again   
    vijaya
     
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    You need to check the headers.

    ‏2010-01-06T21:49:07Z  in response to SystemAdmin
    For 1), you need to check the headers you are passing. Ideally, you should be passing an HTTP header called Cookie that contains the JSESSIONID you received in the login operation. If you look at the HTTP headers you received in the output of the login, you will see the JSESSIONID is received as a Set-Cookie header. You must pass that value to all subsequent calls (web services and HTTP) as a header called Cookie. You are probably not logging out properly from the way you're describing it to me.
    In addition, the way you keep describing passing values in the URL is not the same as HTTP headers; what you describe is known as HTTP query parameters. Some systems allow you to use query parameters as opposed to HTTP headers; Oracle CRM does not accept this mechanism.
    For 2), assuming you have properly captured the Cookie from the HTTP headers, you should be passing the JSESSIONID as a Cookie to the optional HTTP header parameter of the Oracle CRM web service operations (use the right-click operation I descibed before to show the optional input parameters to the web service invoke).
    For an excellent example of how to extract and use the Cookie, download and study TIP T0159 from the TIP repository using Cast Iron Studio. It shows the login process (including error checking), querying an account in Oracle CRM, upserting the account, and logging out of Oracle CRM.
    Alan
    Director of Solutions Engineering and Cast Iron guru.
    • user2000
      user2000
      3 Posts
      ACCEPTED ANSWER

      Re: You need to check the headers.

      ‏2011-10-04T13:25:54Z  in response to SystemAdmin
      There needs to be another way to login to the Oracle CRM On demand system for administration services. The service api only allows stateless transfer which have to have accompanying secure headers. Although I have imported the OASIS Open Security xsd I cannot seem to be able to build the header. There is an inability to add nodes to the xml when 'any' is declared in the xsd. Whether its mapping or writing xml or even a compilation of functions, I have not yet found a way to add the security headers to the request. Has this been discovered already?
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

     Thanks for the reply Alan.

    ‏2010-01-07T15:50:33Z  in response to SystemAdmin
     Thanks for the reply Alan.
    1. yes, i am passing the set-cookie headeritem. so i guess i was doing it right :) sorry for the confusion. Thanks for clarifying about the Oracle CRM not accepting JSESSIONID as an HTTP query parameter. 
    2. Also, thanks for pointing to the example.
     Vijaya
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    Re: HTTP endpoint error

    ‏2013-03-06T01:51:54Z  in response to SystemAdmin
    Alan,

    I am using Oracle CRM OD as one of my endpoint in Cast Iron. When I try to create the endpoint by providing the connection parameters like host, user name, password and I click the Test Connection button, I am getting the following error.

    Error Msg:
    Test connection to OracleCRMOD failed. TestConnection Failed .Check Credentials and Network status

    I had checked the credentials and found to be correct. Any thoughts?

    Thanks
    Raj
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    Re: HTTP endpoint error

    ‏2013-03-06T14:51:55Z  in response to SystemAdmin
    For my earliest integrations with Oracle CRM On Demand, I configured the HTTP endpoint with the default option (Log into the Server as an Anonymous user). Credentials were then passed in HTTP Post Request with URI Services/Integration?command=login.

    I have also passed credentials using the SOAP message header on the web service invocation. In this case, I configure a web services endpoint based on one of the needed Oracle CRMOD WSDLs. The SOAP header is an optional input parameter for a web service invocation; so, you will have to explicitly "Show Optional Parameters". Oracle prefers that the credentials be passed with the web services operation (instead of an explicit log in) to leverage their internal session management capabilities.

    There is also a plug-in connector available for Oracle CRMOD. The connector may make it easier to query the application.