PDA

View Full Version : Error in Airline Sample: Authentication of Username Password Token Failed



benethridge
Jun 23rd, 2006, 03:26 PM
Hi.

I have this built, war'd, and deployed to Tomcat. That was all very straightforward, and no errors showed up in the tomcat log on that.

As shown below, the getflights appears to work ok (and the tomcat log shows no error), but on getmileage I get this error:

-------------------------------------------------------------
C:\Downloads\Spring\spring-ws-1.0-m1\projects\spring-ws\spring-ws-samples\airlin
e\client\saaj>ant run
Buildfile: build.xml

build:

getflights:

getmileage:
[java] Received SOAP Fault
[java] SOAP Fault Code :SOAP-ENV:Client
[java] SOAP Fault String :com.sun.xml.wss.impl.WssSoapFaultException: Authe
ntication of Username Password Token Failed; nested exception is com.sun.xml.wss
.XWSSecurityException: com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed

run:

BUILD SUCCESSFUL
Total time: 3 seconds
----------------------------------------------------------------------

A couple of questions about the sample:

(1) The initDB.sql creates tables, but doesn't init the database with data. Should it?

(2) In the getmileage build target, there appears to be a username of "john" with a password of "changeme". Is that causing the above error? If so, to what should I change it?

I read over the documentation that came with the source but didn't see anything in this regard. Maybe I just missed it? or like Echo, this is still very new?

Ben

Arjen Poutsma
Jun 23rd, 2006, 05:15 PM
(1) The initDB.sql creates tables, but doesn't init the database with data. Should it?


After running the 'initDB.sql' script, you should load the 'populateDB.sql' script to load data in the database.



(2) In the getmileage build target, there appears to be a username of "john" with a password of "changeme". Is that causing the above error? If so, to what should I change it?


The frequent flyer with username 'john' is inserted by running populateDB.sql (in src/etc/db), so loading that should fix your problems.



I read over the documentation that came with the source but didn't see anything in this regard. Maybe I just missed it? or like Echo, this is still very new?


I've cleared up the readme.txt that comes with the example. Thanks for pointing this out! The airline sample is not as new as the echo sample, but recently added the WS-security functionality. Generally speaking, Spring-WS has not reached 1.0 yet, so there can be (and probably are) issues that you can find. I'm doing my best to get rid of them all, though.

Thanks,

benethridge
Jun 28th, 2006, 10:01 AM
populateDB.sql was indeed the missing piece. Running fine now.

Thanks,
Ben