You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Rami Jaamour <rj...@parasoft.com> on 2005/01/08 01:59:24 UTC

WSS4J Documentation

WSS4J Documentation is here!

Due to the increasing demand, I attached a work in progress.  index.html 
is the main file (please revise my list of features), api.html is an 
overview of the WSS4J Java API, axis.html is a detailed step by step 
tutorial on creating a secure service and a client using WSS4J/Axis.

So far I only did Username Token in the tutorial.  Please review/edit so 
we can maybe publish it on the web site soon (I'm not sure how and where 
this should be checked in so it shows up on the public web site).

I used package.html as a reference for details on Axis handlers assuming 
that it will be eventually available and accessible by users (hopefully 
via a convenient link), so I only listed steps with samples without much 
explanations as in package.html.

Rami Jaamour
Software Engineer
Web Services Solutions
Parasoft Corporation

"We Make Software Work"



Johan Danforth wrote:

>       Werner,
>       Yes, I've looked at that file and I've browsed through most of the
>source code that comes with WSS4J without much success I'm afraid. I could
>give it another go I guess, but I don't want to spend days to get into it.
>       Can someone just explain the steps in a pseudo-way maybe? 
>       BTW. If there are problems getting WSS4J working with ASP.NET + WSE
>2.0, maybe I shouldn't go down that route right now anyway... I need to send
>a binary token from java soap (axis) clients to web services built with
>ASP.NET, so maybe I should just use normal soap headers for now.
>       /Johan
>       -----Original Message-----
>From: Werner Dittmann [mailto:Werner.Dittmann@t-online.de] 
>Sent: den 7 januari 2005 13:13
>To: Johan Danforth
>Cc: dims@apache.org; 'Ted Toth'; fx-dev@ws.apache.org
>Subject: Re: tutorials or walkthroughs?
>       
>       Johan,
>       
>       sorry for the lack of documentation so far. I'm sure you already
>looked
>       at the "package.html" file in "src/org/apache/ws/axis/security". In
>addition
>       you may have a look at the interop examples.
>       
>       If you have a complete checkout of wss4j the pls go to the "specs" 
>       directory.
>       This dir contains the "ping.wsdl" file that is used to build the
>interop 
>       scenarios
>       as defined by OASIS. The resulting *.java classes (from WSDL2JAVA)
>are in
>       "build/work/org/apache/ws/axis/oasis/ping". The other parts are
>located in
>       "interop/org/apache/ws/axis/oasis/*".
>       
>       Hope this gets you a step further.
>       
>       Regards,
>       Werner
>       
>       Johan Danforth schrieb:
>       
>       >       Ted, Dims, thanks for the answers.
>       >       First, the need for a basic tutorial is still needed. I still
>don't
>       >understand how to use WSS4J, and I know there are others out there
>with the
>       >same question. I'm in contact with lots of Swedish developers and
>solution
>       >architects that are really interested in WSS4J, but we all need some
>help to
>       >get into it. So please, a simple step-by-step thingy about how to
>create a
>       >console app soap client that uses AXIS WSDL2JAVA stubs, that would
>be
>       >perfect! 
>       >       I would love to help out with a patch, but again, I need to
>get into
>       >WSS4J first :) Tim, it sounds like you've know lots about this,
>can't you
>       >write down a few simple steps? (Promise to buy you a pint of beer,
>coke or
>       >whatever if we meet ;)
>       >       /Johan
>       >       -----Original Message-----
>       >From: Davanum Srinivas [mailto:davanum@gmail.com] 
>       >Sent: den 6 januari 2005 16:07
>       >To: Ted Toth
>       >Cc: Johan Danforth; fx-dev@ws.apache.org
>       >Subject: Re: tutorials or walkthroughs?
>       >       
>       ><snip>
>       >
>       >  
>       >
>
>
>  
>

Re: WSS4J Documentation (xalan probs)

Posted by Tim R J Langford <ti...@multicom.co.uk>.
Hello Johan,

I have only just skimmed through your messages, but what I did to remove 
the exception was to go to my "JAVA_HOME\lib" directory, and inside 
created a directory called 'endorsed' (although of course you might have 
this already) and put the xanlan.jar in there.

 Hope you get it up and running!

Tim



Johan Danforth wrote:

>       Argh, I'll try to read the latest posts on this mailinglist first
>before I post anything next time... Just saw that Tim had the same probs.
>*slaps self*
>       
>       Anyway, I've removed the xalan.jar package from tomcat and from the
>client since it seems to be part of the JDK I use (j2sdk1.4.2_06) but I
>still get that same error/warning. Not sure what to do now. Can anyone
>specify what jars that are really needed for the "tutorial client" to run
>properly without the xalan warnings?
>       
>       /Johan
>       -----Original Message-----
>From: Johan Danforth [mailto:johandanforth@bredband.net] 
>Sent: den 15 januari 2005 21:29
>To: 'Rami Jaamour'; fx-dev@ws.apache.org
>Subject: RE: WSS4J Documentation
>       
>              Hi Rami,
>              I've finally had some time to try out your documentation and
>it ran
>       fine until a certain point. I'm at #5 under the UsernameToken section
>where
>       I've changed the client to send a usernametoken but when I run the
>program
>       it seems to work because I get the results back, but I also a strange
>       stacktrace about xalan. This is the output and I get it both in the
>tomcat
>       console and in the client output:
>              - Unable to patch xalan function table.
>              java.lang.NoSuchFieldException: m_functions
>              	at java.lang.Class.getField(Unknown Source)
>              	at
>org.apache.xml.security.Init.registerHereFunction(Init.java:429)
>              	at org.apache.xml.security.Init.init(Init.java:124)
>              	at
> 
>org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEngine.java:132)
>              	at
> 
>org.apache.ws.axis.security.WSDoAllSender.<clinit>(WSDoAllSender.java:69)
>              	at java.lang.Class.forName0(Native Method)
>              	at java.lang.Class.forName(Unknown Source)
>              	at
>org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:176)
>              	at java.security.AccessController.doPrivileged(Native
>Method)
>              	at
>org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
>              	at
>org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployab
>       leItem.java:353)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeplo
>       yableItem.java:295)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
>       ableItem.java:274)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
>       eItem.java:260)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125
>       )
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
>       ableItem.java:274)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
>       eItem.java:260)
>              	at
> 
>org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployme
>       nt.java:507)
>              	at
> 
>org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.jav
>       a:264)
>              	at
>org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:344)
>              	at
>org.apache.axis.client.AxisClient.invoke(AxisClient.java:133)
>              	at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
>              	at org.apache.axis.client.Call.invoke(Call.java:2702)
>              	at org.apache.axis.client.Call.invoke(Call.java:2378)
>              	at org.apache.axis.client.Call.invoke(Call.java:2301)
>              	at org.apache.axis.client.Call.invoke(Call.java:1758)
>              	at
> 
>samples.stock.client.StockWss01SoapBindingStub.getQuote(StockWss01SoapBindin
>       gStub.java:104)
>              	at
> 
>samples.stock.client.StockServiceClient.main(StockServiceClient.java:26)
>              stock quote service returned IBM: 94.1
>               
>              I've added xalan.jar to the lib of both the client and to
>tomcat. Can
>       you help me out here?
>              /Johan
>              
>              -----Original Message-----
>       From: Rami Jaamour [mailto:rjaamour@parasoft.com] 
>       Sent: den 8 januari 2005 01:59
>       To: fx-dev@ws.apache.org
>       Cc: Johan Danforth
>       Subject: WSS4J Documentation
>              
>              WSS4J Documentation is here!
>              
>              Due to the increasing demand, I attached a work in progress.
>       index.html 
>              is the main file (please revise my list of features), api.html
>is an 
>              overview of the WSS4J Java API, axis.html is a detailed step
>by step 
>              tutorial on creating a secure service and a client using
>WSS4J/Axis.
>              
>              So far I only did Username Token in the tutorial.  Please
>review/edit
>       so 
>              we can maybe publish it on the web site soon (I'm not sure how
>and
>       where 
>              this should be checked in so it shows up on the public web
>site).
>              
>              I used package.html as a reference for details on Axis
>handlers
>       assuming 
>              that it will be eventually available and accessible by users
>       (hopefully 
>              via a convenient link), so I only listed steps with samples
>without
>       much 
>              explanations as in package.html.
>              
>              Rami Jaamour
>              Software Engineer
>              Web Services Solutions
>              Parasoft Corporation
>              
>              "We Make Software Work"
>              
>              
>              
>              Johan Danforth wrote:
>              
>              >       Werner,
>              >       Yes, I've looked at that file and I've browsed through
>most
>       of the
>              >source code that comes with WSS4J without much success I'm
>afraid. I
>       could
>              >give it another go I guess, but I don't want to spend days to
>get
>       into it.
>              >       Can someone just explain the steps in a pseudo-way
>maybe? 
>              >       BTW. If there are problems getting WSS4J working with
>ASP.NET
>       + WSE
>              >2.0, maybe I shouldn't go down that route right now anyway...
>I need
>       to send
>              >a binary token from java soap (axis) clients to web services
>built
>       with
>              >ASP.NET, so maybe I should just use normal soap headers for
>now.
>              >       /Johan
>              >       -----Original Message-----
>              >From: Werner Dittmann [mailto:Werner.Dittmann@t-online.de] 
>              >Sent: den 7 januari 2005 13:13
>              >To: Johan Danforth
>              >Cc: dims@apache.org; 'Ted Toth'; fx-dev@ws.apache.org
>              >Subject: Re: tutorials or walkthroughs?
>              >       
>              >       Johan,
>              >       
>              >       sorry for the lack of documentation so far. I'm sure
>you
>       already
>              >looked
>              >       at the "package.html" file in
>       "src/org/apache/ws/axis/security". In
>              >addition
>              >       you may have a look at the interop examples.
>              >       
>              >       If you have a complete checkout of wss4j the pls go to
>the
>       "specs" 
>              >       directory.
>              >       This dir contains the "ping.wsdl" file that is used to
>build
>       the
>              >interop 
>              >       scenarios
>              >       as defined by OASIS. The resulting *.java classes
>(from
>       WSDL2JAVA)
>              >are in
>              >       "build/work/org/apache/ws/axis/oasis/ping". The other
>parts
>       are
>              >located in
>              >       "interop/org/apache/ws/axis/oasis/*".
>              >       
>              >       Hope this gets you a step further.
>              >       
>              >       Regards,
>              >       Werner
>              >       
>              >       Johan Danforth schrieb:
>              >       
>              >       >       Ted, Dims, thanks for the answers.
>              >       >       First, the need for a basic tutorial is still
>needed.
>       I still
>              >don't
>              >       >understand how to use WSS4J, and I know there are
>others out
>       there
>              >with the
>              >       >same question. I'm in contact with lots of Swedish
>       developers and
>              >solution
>              >       >architects that are really interested in WSS4J, but
>we all
>       need some
>              >help to
>              >       >get into it. So please, a simple step-by-step thingy
>about
>       how to
>              >create a
>              >       >console app soap client that uses AXIS WSDL2JAVA
>stubs, that
>       would
>              >be
>              >       >perfect! 
>              >       >       I would love to help out with a patch, but
>again, I
>       need to
>              >get into
>              >       >WSS4J first :) Tim, it sounds like you've know lots
>about
>       this,
>              >can't you
>              >       >write down a few simple steps? (Promise to buy you a
>pint of
>       beer,
>              >coke or
>              >       >whatever if we meet ;)
>              >       >       /Johan
>              >       >       -----Original Message-----
>              >       >From: Davanum Srinivas [mailto:davanum@gmail.com] 
>              >       >Sent: den 6 januari 2005 16:07
>              >       >To: Ted Toth
>              >       >Cc: Johan Danforth; fx-dev@ws.apache.org
>              >       >Subject: Re: tutorials or walkthroughs?
>              >       >       
>              >       ><snip>
>              >       >
>              >       >  
>              >       >
>              >
>              >
>              >  
>              >
>
>
>  
>


-- 
 


RE: WSS4J Documentation (xalan probs)

Posted by Johan Danforth <jo...@bredband.net>.
       Argh, I'll try to read the latest posts on this mailinglist first
before I post anything next time... Just saw that Tim had the same probs.
*slaps self*
       
       Anyway, I've removed the xalan.jar package from tomcat and from the
client since it seems to be part of the JDK I use (j2sdk1.4.2_06) but I
still get that same error/warning. Not sure what to do now. Can anyone
specify what jars that are really needed for the "tutorial client" to run
properly without the xalan warnings?
       
       /Johan
       -----Original Message-----
From: Johan Danforth [mailto:johandanforth@bredband.net] 
Sent: den 15 januari 2005 21:29
To: 'Rami Jaamour'; fx-dev@ws.apache.org
Subject: RE: WSS4J Documentation
       
              Hi Rami,
              I've finally had some time to try out your documentation and
it ran
       fine until a certain point. I'm at #5 under the UsernameToken section
where
       I've changed the client to send a usernametoken but when I run the
program
       it seems to work because I get the results back, but I also a strange
       stacktrace about xalan. This is the output and I get it both in the
tomcat
       console and in the client output:
              - Unable to patch xalan function table.
              java.lang.NoSuchFieldException: m_functions
              	at java.lang.Class.getField(Unknown Source)
              	at
org.apache.xml.security.Init.registerHereFunction(Init.java:429)
              	at org.apache.xml.security.Init.init(Init.java:124)
              	at
 
org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEngine.java:132)
              	at
 
org.apache.ws.axis.security.WSDoAllSender.<clinit>(WSDoAllSender.java:69)
              	at java.lang.Class.forName0(Native Method)
              	at java.lang.Class.forName(Unknown Source)
              	at
org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:176)
              	at java.security.AccessController.doPrivileged(Native
Method)
              	at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
              	at
org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployab
       leItem.java:353)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeplo
       yableItem.java:295)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
       ableItem.java:274)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
       eItem.java:260)
              	at
 
org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125
       )
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
       ableItem.java:274)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
       eItem.java:260)
              	at
 
org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployme
       nt.java:507)
              	at
 
org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.jav
       a:264)
              	at
org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:344)
              	at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:133)
              	at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
              	at org.apache.axis.client.Call.invoke(Call.java:2702)
              	at org.apache.axis.client.Call.invoke(Call.java:2378)
              	at org.apache.axis.client.Call.invoke(Call.java:2301)
              	at org.apache.axis.client.Call.invoke(Call.java:1758)
              	at
 
samples.stock.client.StockWss01SoapBindingStub.getQuote(StockWss01SoapBindin
       gStub.java:104)
              	at
 
samples.stock.client.StockServiceClient.main(StockServiceClient.java:26)
              stock quote service returned IBM: 94.1
               
              I've added xalan.jar to the lib of both the client and to
tomcat. Can
       you help me out here?
              /Johan
              
              -----Original Message-----
       From: Rami Jaamour [mailto:rjaamour@parasoft.com] 
       Sent: den 8 januari 2005 01:59
       To: fx-dev@ws.apache.org
       Cc: Johan Danforth
       Subject: WSS4J Documentation
              
              WSS4J Documentation is here!
              
              Due to the increasing demand, I attached a work in progress.
       index.html 
              is the main file (please revise my list of features), api.html
is an 
              overview of the WSS4J Java API, axis.html is a detailed step
by step 
              tutorial on creating a secure service and a client using
WSS4J/Axis.
              
              So far I only did Username Token in the tutorial.  Please
review/edit
       so 
              we can maybe publish it on the web site soon (I'm not sure how
and
       where 
              this should be checked in so it shows up on the public web
site).
              
              I used package.html as a reference for details on Axis
handlers
       assuming 
              that it will be eventually available and accessible by users
       (hopefully 
              via a convenient link), so I only listed steps with samples
without
       much 
              explanations as in package.html.
              
              Rami Jaamour
              Software Engineer
              Web Services Solutions
              Parasoft Corporation
              
              "We Make Software Work"
              
              
              
              Johan Danforth wrote:
              
              >       Werner,
              >       Yes, I've looked at that file and I've browsed through
most
       of the
              >source code that comes with WSS4J without much success I'm
afraid. I
       could
              >give it another go I guess, but I don't want to spend days to
get
       into it.
              >       Can someone just explain the steps in a pseudo-way
maybe? 
              >       BTW. If there are problems getting WSS4J working with
ASP.NET
       + WSE
              >2.0, maybe I shouldn't go down that route right now anyway...
I need
       to send
              >a binary token from java soap (axis) clients to web services
built
       with
              >ASP.NET, so maybe I should just use normal soap headers for
now.
              >       /Johan
              >       -----Original Message-----
              >From: Werner Dittmann [mailto:Werner.Dittmann@t-online.de] 
              >Sent: den 7 januari 2005 13:13
              >To: Johan Danforth
              >Cc: dims@apache.org; 'Ted Toth'; fx-dev@ws.apache.org
              >Subject: Re: tutorials or walkthroughs?
              >       
              >       Johan,
              >       
              >       sorry for the lack of documentation so far. I'm sure
you
       already
              >looked
              >       at the "package.html" file in
       "src/org/apache/ws/axis/security". In
              >addition
              >       you may have a look at the interop examples.
              >       
              >       If you have a complete checkout of wss4j the pls go to
the
       "specs" 
              >       directory.
              >       This dir contains the "ping.wsdl" file that is used to
build
       the
              >interop 
              >       scenarios
              >       as defined by OASIS. The resulting *.java classes
(from
       WSDL2JAVA)
              >are in
              >       "build/work/org/apache/ws/axis/oasis/ping". The other
parts
       are
              >located in
              >       "interop/org/apache/ws/axis/oasis/*".
              >       
              >       Hope this gets you a step further.
              >       
              >       Regards,
              >       Werner
              >       
              >       Johan Danforth schrieb:
              >       
              >       >       Ted, Dims, thanks for the answers.
              >       >       First, the need for a basic tutorial is still
needed.
       I still
              >don't
              >       >understand how to use WSS4J, and I know there are
others out
       there
              >with the
              >       >same question. I'm in contact with lots of Swedish
       developers and
              >solution
              >       >architects that are really interested in WSS4J, but
we all
       need some
              >help to
              >       >get into it. So please, a simple step-by-step thingy
about
       how to
              >create a
              >       >console app soap client that uses AXIS WSDL2JAVA
stubs, that
       would
              >be
              >       >perfect! 
              >       >       I would love to help out with a patch, but
again, I
       need to
              >get into
              >       >WSS4J first :) Tim, it sounds like you've know lots
about
       this,
              >can't you
              >       >write down a few simple steps? (Promise to buy you a
pint of
       beer,
              >coke or
              >       >whatever if we meet ;)
              >       >       /Johan
              >       >       -----Original Message-----
              >       >From: Davanum Srinivas [mailto:davanum@gmail.com] 
              >       >Sent: den 6 januari 2005 16:07
              >       >To: Ted Toth
              >       >Cc: Johan Danforth; fx-dev@ws.apache.org
              >       >Subject: Re: tutorials or walkthroughs?
              >       >       
              >       ><snip>
              >       >
              >       >  
              >       >
              >
              >
              >  
              >


RE: WSS4J Documentation

Posted by Johan Danforth <jo...@bredband.net>.
       Hi Rami,
       I've finally had some time to try out your documentation and it ran
fine until a certain point. I'm at #5 under the UsernameToken section where
I've changed the client to send a usernametoken but when I run the program
it seems to work because I get the results back, but I also a strange
stacktrace about xalan. This is the output and I get it both in the tomcat
console and in the client output:
       - Unable to patch xalan function table.
       java.lang.NoSuchFieldException: m_functions
       	at java.lang.Class.getField(Unknown Source)
       	at org.apache.xml.security.Init.registerHereFunction(Init.java:429)
       	at org.apache.xml.security.Init.init(Init.java:124)
       	at
org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEngine.java:132)
       	at
org.apache.ws.axis.security.WSDoAllSender.<clinit>(WSDoAllSender.java:69)
       	at java.lang.Class.forName0(Native Method)
       	at java.lang.Class.forName(Unknown Source)
       	at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:176)
       	at java.security.AccessController.doPrivileged(Native Method)
       	at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
       	at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployab
leItem.java:353)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeplo
yableItem.java:295)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
ableItem.java:274)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
eItem.java:260)
       	at
org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125
)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy
ableItem.java:274)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl
eItem.java:260)
       	at
org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployme
nt.java:507)
       	at
org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.jav
a:264)
       	at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:344)
       	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:133)
       	at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
       	at org.apache.axis.client.Call.invoke(Call.java:2702)
       	at org.apache.axis.client.Call.invoke(Call.java:2378)
       	at org.apache.axis.client.Call.invoke(Call.java:2301)
       	at org.apache.axis.client.Call.invoke(Call.java:1758)
       	at
samples.stock.client.StockWss01SoapBindingStub.getQuote(StockWss01SoapBindin
gStub.java:104)
       	at
samples.stock.client.StockServiceClient.main(StockServiceClient.java:26)
       stock quote service returned IBM: 94.1
        
       I've added xalan.jar to the lib of both the client and to tomcat. Can
you help me out here?
       /Johan
       
       -----Original Message-----
From: Rami Jaamour [mailto:rjaamour@parasoft.com] 
Sent: den 8 januari 2005 01:59
To: fx-dev@ws.apache.org
Cc: Johan Danforth
Subject: WSS4J Documentation
       
       WSS4J Documentation is here!
       
       Due to the increasing demand, I attached a work in progress.
index.html 
       is the main file (please revise my list of features), api.html is an 
       overview of the WSS4J Java API, axis.html is a detailed step by step 
       tutorial on creating a secure service and a client using WSS4J/Axis.
       
       So far I only did Username Token in the tutorial.  Please review/edit
so 
       we can maybe publish it on the web site soon (I'm not sure how and
where 
       this should be checked in so it shows up on the public web site).
       
       I used package.html as a reference for details on Axis handlers
assuming 
       that it will be eventually available and accessible by users
(hopefully 
       via a convenient link), so I only listed steps with samples without
much 
       explanations as in package.html.
       
       Rami Jaamour
       Software Engineer
       Web Services Solutions
       Parasoft Corporation
       
       "We Make Software Work"
       
       
       
       Johan Danforth wrote:
       
       >       Werner,
       >       Yes, I've looked at that file and I've browsed through most
of the
       >source code that comes with WSS4J without much success I'm afraid. I
could
       >give it another go I guess, but I don't want to spend days to get
into it.
       >       Can someone just explain the steps in a pseudo-way maybe? 
       >       BTW. If there are problems getting WSS4J working with ASP.NET
+ WSE
       >2.0, maybe I shouldn't go down that route right now anyway... I need
to send
       >a binary token from java soap (axis) clients to web services built
with
       >ASP.NET, so maybe I should just use normal soap headers for now.
       >       /Johan
       >       -----Original Message-----
       >From: Werner Dittmann [mailto:Werner.Dittmann@t-online.de] 
       >Sent: den 7 januari 2005 13:13
       >To: Johan Danforth
       >Cc: dims@apache.org; 'Ted Toth'; fx-dev@ws.apache.org
       >Subject: Re: tutorials or walkthroughs?
       >       
       >       Johan,
       >       
       >       sorry for the lack of documentation so far. I'm sure you
already
       >looked
       >       at the "package.html" file in
"src/org/apache/ws/axis/security". In
       >addition
       >       you may have a look at the interop examples.
       >       
       >       If you have a complete checkout of wss4j the pls go to the
"specs" 
       >       directory.
       >       This dir contains the "ping.wsdl" file that is used to build
the
       >interop 
       >       scenarios
       >       as defined by OASIS. The resulting *.java classes (from
WSDL2JAVA)
       >are in
       >       "build/work/org/apache/ws/axis/oasis/ping". The other parts
are
       >located in
       >       "interop/org/apache/ws/axis/oasis/*".
       >       
       >       Hope this gets you a step further.
       >       
       >       Regards,
       >       Werner
       >       
       >       Johan Danforth schrieb:
       >       
       >       >       Ted, Dims, thanks for the answers.
       >       >       First, the need for a basic tutorial is still needed.
I still
       >don't
       >       >understand how to use WSS4J, and I know there are others out
there
       >with the
       >       >same question. I'm in contact with lots of Swedish
developers and
       >solution
       >       >architects that are really interested in WSS4J, but we all
need some
       >help to
       >       >get into it. So please, a simple step-by-step thingy about
how to
       >create a
       >       >console app soap client that uses AXIS WSDL2JAVA stubs, that
would
       >be
       >       >perfect! 
       >       >       I would love to help out with a patch, but again, I
need to
       >get into
       >       >WSS4J first :) Tim, it sounds like you've know lots about
this,
       >can't you
       >       >write down a few simple steps? (Promise to buy you a pint of
beer,
       >coke or
       >       >whatever if we meet ;)
       >       >       /Johan
       >       >       -----Original Message-----
       >       >From: Davanum Srinivas [mailto:davanum@gmail.com] 
       >       >Sent: den 6 januari 2005 16:07
       >       >To: Ted Toth
       >       >Cc: Johan Danforth; fx-dev@ws.apache.org
       >       >Subject: Re: tutorials or walkthroughs?
       >       >       
       >       ><snip>
       >       >
       >       >  
       >       >
       >
       >
       >  
       >


Problems setting Username and callback handlers dynamically

Posted by Johan Danforth <jo...@bredband.net>.
       Hi,
       
       I'm following the tutorial by Rami Jaamour and trying the last thing
he wrote about setting the username and pw callback handler dynamically in
run-time, but it doesn't seem to work. Whatever I try, my callback is never
called. This is what the documentation says:
       
       Another way to do this is to have the client application set the
username and CallbackHandler implementation programmatically instead of
client_deploy.wsdd:
       
       ...
       import org.apache.axis.client.Stub;
       ...
       
       Remote remote = locator.getPort(StockQuoteService.class);
       Stub axisPort = (Stub)remote;
       axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
       axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
       axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF,
pwCallback);
       
       where "pwCallback" is a reference to a PWCallback implementation. See
the Axis handler for WSS4J documentation for more details on this.
       
       I would like to get a complete sample if that's possible. I tried
this piece of code, but the callback is never called and I get errors from
the web service about the wsse header is missing:
       
       StockQuoteServiceService locator = new
StockQuoteServiceServiceLocator();
               StockQuoteService service = locator.getStockWss01();
               
               PWCallback pwCallback = new PWCallback();
               Remote remote = locator.getPort(StockQuoteService.class);
               Stub axisPort = (Stub)remote;
               axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
               axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
               axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF,
pwCallback);
               
                       
               System.out.println("Calling service...");
               float quote = service.getQuote(args[0]);
               System.out.println("stock quote service returned " + args[0]
+ ": "
                       + quote);
       
       I guess I shouldn't call service.getQuote() like that, but instead
call the remote method through the Stub, but I'm not sure how to do that.
Can anyone help me out before I spend another day in the sample code? :D
       
       Thanks for any help!
       Johan