The documentation topic from your link is in Getting Started for Wires, so I'm little confused. You published the REST service and set the username and password for basic authentication. And you're using this service in a mashup in Wires. Can we get a little more information?
* did you use literal values for Basic Auth username/password when you published the service?
* you said you are not seeing the HTTP headers and so the service is failing. Where are you looking at the request to the service?
* have you looked at the log for Presto for errors? You can find this at {presto-install}/logs
Sara, technical writer/jackbe
Hi Sara,
Thanks for the quick reply. Sorry for not being clear in the first instance. To brief you , i have a REST service that is protected with BasicAuth. I have a requirement to mashup this service for which i have done the following
a) Published the service( note: i didnt specify the Requires Authentication ) called UserInfo
b) Using Mashup Studio , i created a mashup named UserInfoMashup and the EMML for it is attached
c) since my actual REST service is protected with BasicAuth, i had used the <httpBasicAuth> tag as mentioned in (1) .
I am not sure if i have done things right. Since my actual end service is protected with HTTP Basic Authentication, how do i pass on those credentials.
1) http://www.jackbe.com/enterprise-mashup/forum/invoking-service-emml-requires-http-basic-auth
So, when you published the service you didn't say that it required authentication? If so, that is at least part of the problem.
If you don't set authentication requirements when you publish the service, Presto basically doesn't know it needs to pass that header on. So even if you set it in the mashup (which you did), it wouldn't get passed to the service.
So, remove the service and re-publish it setting the authentication fields. You must provide a username/password that will work when you publish the service. This is the default credentials that Presto will use when you invoke the service.
You can override these default credentials at runtime in the mashup using the HTTP headeer technique you mentioned. But if the default credentials are enough, you can remove that from the mashup and it should work.
<!--Session data-->
Sara, technical writer/jackbe
Hi Sarah,
I republished the service and this time i had the 'Requires Authenticaiton' property set to HTTPBasic Auth. I also have given valid credentials for user name and password . When i try to test this REST service by clicking the button 'Invoke via REST' , i get back the response
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
The actual service works with the user name and password but not through Presto.
I dont see any exceptions in the logs at ${PRESTO_HOME}/logs
Regards
Ravi.
Hi Ravi,
This use case should work fine. I just tried the same scenario using Twitter API in Presto 2.7 and had no issues invoking it as "Invoke via REST".
Try this:
(1) register this twitter api as REST and select "Http Basic Auth" as auth mechanism
http://api.twitter.com/1/twitterapidocs/lists.xml
(2) enter your id/password
(3) complete registration
(4) invoke via REST
(5) you should see the data
If not, let us know. Also, please verify if your REST service is Basic Auth or NTLM.
- Girish@JackBe
Hi Ravi,
have you configured your app server with certificate/keystore to connect to HTTPS services ? You need to download your secure server certificate and configure the app server by passing command line parameters to jvm as:
-Djavax.net.ssl.trustStore=<keystore-path> -Djavax.net.ssl.trustStorePassword=<keystore-password>
- Girish@JackBe




Hi,
I have a rest service that is protected by BasicAuth. I published the REST service following the document at http://www.jackbe.com/prestodocs/v2.7.0/prestolibrary/wwhelp/wwhimpl/js/html/wwhelp.htm?context=prestolibrary&topic=wiresGS1 . Even though i selected the Basic Authenticaiton option under "Requires Authentication" , i dont see the headers being passed due to which the request to the service is failing.
Appreciate a quick advise.