Hi,
I'm using Tomcat 5.5.17, jdk1.5.0_05, juddi-0.9rc4 and
mysql-standard-5.0.22-linux-i686 on Redhat E3.
I have figured out what the jsp pages are looking for - at least for me this
works. Basically when you set up jUDDI and run the sql scripts provided to
setup the jUDDI database, we are also given the file
juddi-0.9rc4\sql\mysql\insert_publishers.sql. This file contains the sql
statement that is needed to insert the user(s) that is allowed to access and
publish data into the jUDDI database. The sample sql statement looks
something like this:
USE juddi;
INSERT INTO PUBLISHER
(PUBLISHER_ID,PUBLISHER_NAME,EMAIL_ADDRESS,IS_ENABLED,IS_ADMIN)
VALUES ('jdoe','John Doe','[EMAIL PROTECTED]','true','true');
In the sql statement above, "jdoe" is the user ID that is allowed to publish
to the jUDDI database and is also an ADMIN user. You'll have to change the
credential accordingly with your "publisher" information. Once you have
established some "publishers" in your jUDDI database, then you can get the
authorization tokens using their user IDs (e.g. "jdoe" in the example
above).
Bringing up the page http://localhost:8080/juddi/console/get_authToken.jsp
gives you the following request:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<get_authToken generic="2.0" xmlns="urn:uddi-org:api_v2"
userID="***"
cred="***"/>
</soapenv:Body>
</soapenv:Envelope>
Change the "userID" field to "jdoe" (using our example above), we have:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<get_authToken generic="2.0" xmlns="urn:uddi-org:api_v2"
userID="jdoe"
cred="***"/>
</soapenv:Body>
</soapenv:Envelope>
Then click on the "Submit" button and you should get something like the
following result for the "authInfo" field:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<authToken generic="2.0" operator="nist.gov" xmlns="urn:uddi-org:api_v2">
<authInfo>authToken:C4A3D0D0-1C16-11DB-ACFF-975C838D4A99</authInfo>
</authToken>
</soapenv:Body>
</soapenv:Envelope>
Notice in the result above that the authorization token is contained in the
field "authInfo" and in our example, it is the string:
authToken:C4A3D0D0-1C16-11DB-ACFF-975C838D4A99
Cut and paste that string into other requests that requires the "authInfo"
field such as the get_registeredInfo page. E.g.:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<get_registeredInfo generic="2.0" xmlns="urn:uddi-org:api_v2">
<authInfo>authToken:C4A3D0D0-1C16-11DB-ACFF-975C838D4A99</authInfo>
</get_registeredInfo>
</soapenv:Body>
</soapenv:Envelope>
Click submit on the get_registeredInfo page and the results for that page
should look something like:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<registeredInfo generic="2.0" operator="nist.gov"
xmlns="urn:uddi-org:api_v2">
<businessInfos/>
<tModelInfos/>
</registeredInfo>
</soapenv:Body>
</soapenv:Envelope>
I hope the above explaination helps.
BTW, the controller page (e.g.
http://localhost:8080/juddi/console/controller.jsp, i.e. the file
$TOMCAT_HOME/webapps/juddi/console/controller.jsp) has the following
variables hard coded:
final URL INQUIRY_URL = new URL("http://localhost:8080/juddi/inquiry");
final URL PUBLISH_URL = new URL("http://localhost:8080/juddi/publish");
final URL ADMIN_URL = new URL("http://localhost:8080/juddi/admin");
So if your jUDDI server is living at a different URL and is using a
different port, you'll have to make the change to the
"$TOMCAT_HOME/webapps/juddi/console/controller.jsp" file accordingly. In my
case, I changed it to the following because I wanted to use a secure
connection (https://) using my domain name (seurat.cbt.nist.gov) and using
port 8443:
final URL INQUIRY_URL = new
URL("https://seurat.cbt.nist.gov:8443/juddi/inquiry");
final URL PUBLISH_URL = new
URL("https://seurat.cbt.nist.gov:8443/juddi/publish");
final URL ADMIN_URL = new
URL("https://seurat.cbt.nist.gov:8443/juddi/admin");
Cheers - Alan
Miguel Ferreira wrote:
>
> Hi,
>
> (The silence in this mailing list is very disturbing...)
> Anyway... I solved my problem... I'm posting the solution here since it
> might be helpful for others...
>
> I've used a sniffer to find out what was happening under the hood and
> realised that the problem was on the MySQL Server. When the token was
> requested (and inserted in the database) it threw an exception and the
> operation was rolled back. Ubuntu's MySQL 4.1 is probably faulty. I've
> downgraded to 4.0 and is verything is working fine now.
>
> Cheers,
> Miguel.
>
> -----Original Message-----
> From: Leandro Cerencio [mailto:[EMAIL PROTECTED]
> Sent: quarta-feira, 1 de Março de 2006 17:47
> To: [email protected]
> Subject: Re: get_AuthToken not working at all!
>
> Dear Miguel,
>
> I had a same problem, but I solve with an other way. I create, in mysql, a
> table contain the username and the password on juddi schema. So, I create
> my
> class using the interface Authenticator with classe JDBCDataStore on the
> package org.apache.juddi.datastore.jdbc . And change property
> "juddi.users=myclass". I hope this be useful.
>
> Tchau
>
> --
> +----------------------------------+
> | Leandro Moreira Cerencio |
> | Dep. Architecture and Solution |
> | SERPRO |
> | Ramal: +055 02111 2173-1837 |
> | [EMAIL PROTECTED] |
> +----------------------------------+
>
>
> Miguel Ferreira escreveu:
>
>> Dear all,
>> I've been struggling to get jUDDI version 0.9rc4 to work on my Ubunto
>> box without success...
>> In fact jUDDI installs cleanly. The problem is that I can't get a
>> straight answer from the service when I call get_authToken. No matter
>> which authentication mode I'm using I always get the following answer:
>> E_unknownUser (10150) The user ID and password pair passed in a
>> get_authToken message is not known to the Operator Site or is not
>> valid. get_authToken: userID=mferreira
>> I've tried the DefaultAuthenticator with a few publishers inserted on
>> the publisher DB table. I 've also tried the XMLDocAuthenticator
>> using juddi-users.xml as a data source (no, I did not forget to add
>> the property juddi.users=... to juddi.properties).
>> This is driving me nuts because the happy script tells me everything
>> is ok, there are no errors on the log files and no one on the Internet
>> seems to be having this problem...
>> I've also tried to install jUDDI on another machine (Ubunto box as
>> well) but the same behavior was experienced.
>> I'm using jdk 1.5. Will that be the cause of the problem?
>> I've tried to compile the jUDDI sources with that version of the JDK
>> and had to change the name of some enum variables that are not
>> supported by the new JDK. My juddi.jar delivers the same output.
>> Any help on this guys? Has anyone been able the get the authToken
>> using jUDDI 0.9rc4.
>> PS: I'm also using Tomcat + MySQL
>>
>> Cheers,
>> Miguel
>>
>> - -
>> Miguel Ferreira (researcher)
>> Department of Information Systems
>> University of Minho Campus de Azurém
>> 4800-058 Guimarães, Portugal
>> http://www.dsi.uminho.pt/~ferreira/
>> <http://www.dsi.uminho.pt/%7Eferreira/>
>> Phone: +351 253 510 261 / FAX: +351 253 510 300 / Ext.: 3261
>>
>
>
>
>
--
View this message in context:
http://www.nabble.com/get_AuthToken-not-working-at-all%21-tf1185877.html#a5492620
Sent from the jUDDI - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]