You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vivek Alampally <vi...@gmail.com> on 2011/06/27 15:47:41 UTC

java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Hi
I am getting the following exception while replacing existing cxf 2.3.3 jar
with Apache CXF 2.4.1
java.lang.NoSuchMethodError<http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html>:
org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I

Can anyone please tell me whether there are any compatibility issues
with Apache CXF 2.4 and wss4j 1.5.11.

Re: A question of choice

Posted by Glen Mazza <gm...@talend.com>.
On 06/27/2011 10:53 AM, David Sills wrote:
> So now the questions:
>
> 1. Can or should this service be converted to REST?
> 2. Can it be converted to REST as is, or should it be broken up into
> smaller pieces (not sure the client would agree to that)?
> 3. Can REST handle the amount of data a GET request would necessarily
> have to include?
>
> Any ideas? Any tales of converting something like this and the ups and
> downs you encountered?
>

Only thing I can add is my blog entry on using FOP with web services, 
which might be of help for you in a non-REST situation:
http://www.jroller.com/gmazza/entry/using_mtom_and_apache_fop

Also, for the print generation logic, perhaps some of the source code 
for Kohmori, the World's Least Used Report Generation System, *could* 
provide a pointer or two: 
http://www.jroller.com/gmazza/entry/kohmori_reports_now_using_jaxb

HTH,
Glen

> Thanks in advance!
>
> David Sills
>


-- 
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza



RE: A question of choice

Posted by David Sills <DS...@datasourceinc.com>.
Thanks, Sergey, I'll give these suggestions some thought. I agree there
is probably some refactoring involved, but for the moment the client is
happy with the performance of the service and with the simplicity of the
API from their client code's point of view (of course, that simply means
the service has to do more with parameters). The tradeoffs between more
thoroughly refactored API (and happier developers) and greater
complexity in the application client don't for the present appear to
appeal, but that's a stone at which I can continue to chip.

Warmly,

David


------------------------------------------------------------------------
---

>If one have so many input parameters that they can't fit into GET
>query then it's a sign the refactoring of the service URI space is
>really needed.


Re: A question of choice

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

On Mon, Jun 27, 2011 at 3:53 PM, David Sills <DS...@datasourceinc.com> wrote:
> All:
>
> A question for designers out there who wish to opine on best practices
> or advise me about an upcoming issue: we have an essentially RPC web
> service being considered for conversion to a RESTful one. Apologies for
> the length of the post before it even begins:
>
> The current SOAP web service, among other things, generates PDF reports
> (using BIRT behind the scenes, although of course that could be swapped
> out, which was the idea). A report can have arbitrarily many parameters
> (and many have quite a few) that must be supplied. In addition, the
> service performs a number of other functions are currently executed
> within a single service call. For instance, the service may print the
> generated document, keep it for later retrieval, or save it to a
> database. It may retrieve a document from the database rather than
> generating it.
>
> At the moment, what the service does is governed by a DocumentMetadata
> object:
>
> public interface DocumentMetadata
> {
>        String getDesignFilename();
>        String getAssociatedCaseId();
>        String getDocumentItemPageId();
>        String getTitleToSaveAs();
>        boolean isKeepAfterProcessing();
> }
>
> This allows the client to specify the name of the report file to use in
> generation, the case to which the document should be associated (a
> one-to-many relationship), the database ID of the document, the title to
> save the document as, and whether or not to keep it available.
>
> Another object (PrintJob) sent along details print parameters (printer
> to use, number of copies, orientation, etc.).
>
> The service uses these to decide what to do:
>
> 1. If the designFilename is supplied, a report is generated.
> 2. If the documentItemPageId is supplied, the report is retrieved from
> the database.
> 3. If the titleToSaveAs is supplied, the report is saved to the database
> with the appropriate title in addition to the bytes of the report itself
> (all saved documents require titles).
> 4. If the report is saved to the database and the associatedCaseId is
> supplied, a foreign-key reference to the case is inserted along with the
> document record (documents may relate to cases or not [e.g., summaries
> of daily activity relate to no specific case]).
> 5. If the keepAfterProcessing is set to true, the document is saved and
> information about how to retrieve it is returned to the client.
> 6. If the print object is supplied (non-null), the document (however
> obtained) is printed following the supplied parameters or sensible
> defaults.
>
> What is returned to the client is a ProcessingOutcome object:
>
> public interface ProcessingOutcome
> {
>        boolean isReportCreationSuccessful();
>        String getDocumentId();
>        String getDocumentItemId();
>        String getDocumentItemPageId();
>        boolean isPrintingSuccessful();
>        String getUrl();
>        String getUnc();
> }
>
> Most of this is obvious:
>
> 1. Whether report creation was successful (false if the report was
> retrieved from the database)
> 2. The various database IDs associated with the document (don't even ask
> - I didn't design the database, obviously)
> 3. Whether or not printing was successful (false if it was not
> requested)
> 4. If the document was kept, a URL for retrieving it via HTTP and a UNC
> reference for retrieving it via Windows Explorer et alia
>
> So now the questions:
>
> 1. Can or should this service be converted to REST?

I don't see immediate issues which would prevent it from being converted

> 2. Can it be converted to REST as is, or should it be broken up into
> smaller pieces (not sure the client would agree to that)?

Here are some observations. I'd avoid specifying an id upfront and let
server allocate it for new PDFs.
This can minimize a number of parameters. LIkewise, rather than
'leaking' a DB id, return opaque URI
which will protect the consumer from the likely DB changes which may follow.
You can get it split in two pieces, one (controller) will deal with DB
(via indirection if needed), etc, and then you can get another
component, possibly not even JAX-RS one, which will specifically
handle the conversion of in Data into PDF.
When consumer requests a new PDF the controller can also do some
preparation work and redirect the consumer to a dedicated resource
which will provide the actual PDF. This will make the experience
smoother a bit for a client.
Supporting multipart/form-data should also help with the browser
asking the user where PDF needs to be saved...

> 3. Can REST handle the amount of data a GET request would necessarily
> have to include?
>
If one have so many input parameters that they can't fit into GET
query then it's a sign the refactoring of the service URI space is
really needed.

Cheers, Sergey

> Any ideas? Any tales of converting something like this and the ups and
> downs you encountered?
>
> Thanks in advance!
>
> David Sills
>
>



-- 
Sergey Beryozkin

Application Integration Division of Talend
http://sberyozkin.blogspot.com

Re: A question of choice

Posted by Sergey Beryozkin <sb...@gmail.com>.
HI

Thanks for this info, I'll try to get back to later during the next few days
Cheers, Sergey

On Mon, Jun 27, 2011 at 3:53 PM, David Sills <DS...@datasourceinc.com> wrote:
> All:
>
> A question for designers out there who wish to opine on best practices
> or advise me about an upcoming issue: we have an essentially RPC web
> service being considered for conversion to a RESTful one. Apologies for
> the length of the post before it even begins:
>
> The current SOAP web service, among other things, generates PDF reports
> (using BIRT behind the scenes, although of course that could be swapped
> out, which was the idea). A report can have arbitrarily many parameters
> (and many have quite a few) that must be supplied. In addition, the
> service performs a number of other functions are currently executed
> within a single service call. For instance, the service may print the
> generated document, keep it for later retrieval, or save it to a
> database. It may retrieve a document from the database rather than
> generating it.
>
> At the moment, what the service does is governed by a DocumentMetadata
> object:
>
> public interface DocumentMetadata
> {
>        String getDesignFilename();
>        String getAssociatedCaseId();
>        String getDocumentItemPageId();
>        String getTitleToSaveAs();
>        boolean isKeepAfterProcessing();
> }
>
> This allows the client to specify the name of the report file to use in
> generation, the case to which the document should be associated (a
> one-to-many relationship), the database ID of the document, the title to
> save the document as, and whether or not to keep it available.
>
> Another object (PrintJob) sent along details print parameters (printer
> to use, number of copies, orientation, etc.).
>
> The service uses these to decide what to do:
>
> 1. If the designFilename is supplied, a report is generated.
> 2. If the documentItemPageId is supplied, the report is retrieved from
> the database.
> 3. If the titleToSaveAs is supplied, the report is saved to the database
> with the appropriate title in addition to the bytes of the report itself
> (all saved documents require titles).
> 4. If the report is saved to the database and the associatedCaseId is
> supplied, a foreign-key reference to the case is inserted along with the
> document record (documents may relate to cases or not [e.g., summaries
> of daily activity relate to no specific case]).
> 5. If the keepAfterProcessing is set to true, the document is saved and
> information about how to retrieve it is returned to the client.
> 6. If the print object is supplied (non-null), the document (however
> obtained) is printed following the supplied parameters or sensible
> defaults.
>
> What is returned to the client is a ProcessingOutcome object:
>
> public interface ProcessingOutcome
> {
>        boolean isReportCreationSuccessful();
>        String getDocumentId();
>        String getDocumentItemId();
>        String getDocumentItemPageId();
>        boolean isPrintingSuccessful();
>        String getUrl();
>        String getUnc();
> }
>
> Most of this is obvious:
>
> 1. Whether report creation was successful (false if the report was
> retrieved from the database)
> 2. The various database IDs associated with the document (don't even ask
> - I didn't design the database, obviously)
> 3. Whether or not printing was successful (false if it was not
> requested)
> 4. If the document was kept, a URL for retrieving it via HTTP and a UNC
> reference for retrieving it via Windows Explorer et alia
>
> So now the questions:
>
> 1. Can or should this service be converted to REST?
> 2. Can it be converted to REST as is, or should it be broken up into
> smaller pieces (not sure the client would agree to that)?
> 3. Can REST handle the amount of data a GET request would necessarily
> have to include?
>
> Any ideas? Any tales of converting something like this and the ups and
> downs you encountered?
>
> Thanks in advance!
>
> David Sills
>
>



-- 
Sergey Beryozkin

Application Integration Division of Talend
http://sberyozkin.blogspot.com

A question of choice

Posted by David Sills <DS...@datasourceinc.com>.
All:

A question for designers out there who wish to opine on best practices
or advise me about an upcoming issue: we have an essentially RPC web
service being considered for conversion to a RESTful one. Apologies for
the length of the post before it even begins:

The current SOAP web service, among other things, generates PDF reports
(using BIRT behind the scenes, although of course that could be swapped
out, which was the idea). A report can have arbitrarily many parameters
(and many have quite a few) that must be supplied. In addition, the
service performs a number of other functions are currently executed
within a single service call. For instance, the service may print the
generated document, keep it for later retrieval, or save it to a
database. It may retrieve a document from the database rather than
generating it.

At the moment, what the service does is governed by a DocumentMetadata
object:

public interface DocumentMetadata
{
	String getDesignFilename();
	String getAssociatedCaseId();
	String getDocumentItemPageId();
	String getTitleToSaveAs();
	boolean isKeepAfterProcessing();
}

This allows the client to specify the name of the report file to use in
generation, the case to which the document should be associated (a
one-to-many relationship), the database ID of the document, the title to
save the document as, and whether or not to keep it available.

Another object (PrintJob) sent along details print parameters (printer
to use, number of copies, orientation, etc.).

The service uses these to decide what to do:

1. If the designFilename is supplied, a report is generated.
2. If the documentItemPageId is supplied, the report is retrieved from
the database.
3. If the titleToSaveAs is supplied, the report is saved to the database
with the appropriate title in addition to the bytes of the report itself
(all saved documents require titles).
4. If the report is saved to the database and the associatedCaseId is
supplied, a foreign-key reference to the case is inserted along with the
document record (documents may relate to cases or not [e.g., summaries
of daily activity relate to no specific case]).
5. If the keepAfterProcessing is set to true, the document is saved and
information about how to retrieve it is returned to the client.
6. If the print object is supplied (non-null), the document (however
obtained) is printed following the supplied parameters or sensible
defaults.

What is returned to the client is a ProcessingOutcome object:

public interface ProcessingOutcome
{
	boolean isReportCreationSuccessful();
	String getDocumentId();
	String getDocumentItemId();
	String getDocumentItemPageId();
	boolean isPrintingSuccessful();
	String getUrl();
	String getUnc();
}

Most of this is obvious: 

1. Whether report creation was successful (false if the report was
retrieved from the database)
2. The various database IDs associated with the document (don't even ask
- I didn't design the database, obviously)
3. Whether or not printing was successful (false if it was not
requested)
4. If the document was kept, a URL for retrieving it via HTTP and a UNC
reference for retrieving it via Windows Explorer et alia

So now the questions:

1. Can or should this service be converted to REST?
2. Can it be converted to REST as is, or should it be broken up into
smaller pieces (not sure the client would agree to that)?
3. Can REST handle the amount of data a GET request would necessarily
have to include?

Any ideas? Any tales of converting something like this and the ups and
downs you encountered?

Thanks in advance!

David Sills


Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Colm O hEigeartaigh <co...@apache.org>.
I outlined the reasons here:

http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html

Colm.

On Mon, Jun 27, 2011 at 7:03 PM, Vivek Alampally <vi...@gmail.com> wrote:
> Thanks Colm, This works. But I have a question, why the validators are
> introduced in WSS4J 1.6.
>
> On Mon, Jun 27, 2011 at 11:58 AM, Colm O hEigeartaigh <co...@apache.org>
> wrote:
>>
>> In your service side CallbackHandler, replace:
>>
>> <<<<<
>> if (pc.getIdentifier().equals(this.username)) {
>>
>> if (!pc.getPassword().equals(this.password)) {
>> throw new IOException("Invalid password");
>> }
>> }
>> else{
>> throw new IOException("Invalid Identifier");
>> }
>> >>>>>
>>
>> with
>>
>> <<<<<
>> if (pc.getIdentifier().equals(this.username)) {
>>     pc.setPassword(this.password);
>> }
>> else{
>> throw new IOException("Invalid Identifier");
>> }
>> >>>>>
>>
>> Colm.
>>
>> On Mon, Jun 27, 2011 at 4:54 PM, Vivek Alampally <vi...@gmail.com>
>> wrote:
>> > Sorry, I might be irritating you but this is what I have done.
>> > Server Side (Web service side)
>> > --------------------------------------------
>> >
>> > <jaxws:inInterceptors>
>> > <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
>> > <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>> > <constructor-arg>
>> > <map>
>> > <entry key="action" value="UsernameToken" />
>> > <entry key="passwordType" value="PasswordText" />
>> > <entry key="passwordCallbackRef">
>> > <ref bean="ServerPasswordCallback" />
>> > </entry>
>> > </map>
>> > </constructor-arg>
>> > </bean>
>> > </jaxws:inInterceptors>
>> > <bean id="ServerPasswordCallback"
>> > class="com.fdt.sdl.security.authentication.util.ServerPasswordCallback">
>> > <property name="username" value="${webservice.username}" />
>> > <property name="password" value="${webservice.password}" />
>> > </bean>
>> > public class ServerPasswordCallback implements CallbackHandler {
>> > private String username;
>> > private String password;
>> > public String getUsername() {
>> > return username;
>> > }
>> > public void setUsername(String username) {
>> > this.username = username;
>> > }
>> > public String getPassword() {
>> > return password;
>> > }
>> > public void setPassword(String password) {
>> > this.password = password;
>> > }
>> > @Override
>> > public void handle(Callback[] callbacks) throws IOException,
>> > UnsupportedCallbackException {
>> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
>> > if (pc.getIdentifier().equals(this.username)) {
>> > if (!pc.getPassword().equals(this.password)) {
>> > throw new IOException("Invalid password");
>> > }
>> > }
>> > else{
>> > throw new IOException("Invalid Identifier");
>> > }
>> > }
>> > }
>> > Client Side
>> > -------------------
>> > <bean id="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor"
>> > />
>> > <bean id="logOut"
>> > class="org.apache.cxf.interceptor.LoggingOutInterceptor"
>> > />
>> > <bean id="saajOut"
>> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
>> > <bean id="wss4jOut"
>> > class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
>> > <constructor-arg>
>> > <map>
>> > <entry key="action" value="UsernameToken" />
>> > <entry key="user" value="${webservice.username}" />
>> > <entry key="passwordType" value="PasswordText" />
>> > <entry key="passwordCallbackRef">
>> > <ref bean="clientPasswordCallback" />
>> > </entry>
>> > </map>
>> > </constructor-arg>
>> > </bean>
>> > In clientFactoryBean,
>> > <property name="inInterceptors">
>> > <list>
>> > <ref bean="logIn" />
>> > </list>
>> > </property>
>> > <property name="outInterceptors">
>> > <list>
>> > <ref bean="logOut" />
>> > <ref bean="saajOut" />
>> > <ref bean="wss4jOut" />
>> > </list>
>> > </property>
>> > <bean id="clientPasswordCallback"
>> > class="com.fdt.sdl.security.authentication.util.ClientPasswordCallback">
>> > <property name="password" value="${webservice.password}" />
>> > </bean>
>> > public class ClientPasswordCallback implements CallbackHandler {
>> > private String password;
>> > public String getPassword() {
>> > return password;
>> > }
>> > public void setPassword(String password) {
>> > this.password = password;
>> > }
>> > @Override
>> > public void handle(Callback[] callbacks) throws IOException,
>> > UnsupportedCallbackException {
>> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
>> > pc.setPassword(this.password);
>> > }
>> > }
>> >
>> > On Mon, Jun 27, 2011 at 11:38 AM, Colm O hEigeartaigh
>> > <co...@apache.org>
>> > wrote:
>> >>
>> >> How are you validating the received username/password at the moment?
>> >> If you have access to a password for a given user in the
>> >> CallbackHandler, then you don't need to write a Validator. Simply set
>> >> the password on the WSPasswordCallback object, and the
>> >> UsernameTokenValidator will take care of the validation.
>> >>
>> >> Colm.
>> >>
>> >> On Mon, Jun 27, 2011 at 4:11 PM, Vivek Alampally <vi...@gmail.com>
>> >> wrote:
>> >> > Hi Colm,
>> >> >              Do you have any link pointing to how this can be done.
>> >> > I just need to have a username & password for existing web service.
>> >> > For
>> >> > this
>> >> > do I need to write a custom Validator. Can I use existing
>> >> > default UsernameTokenValidator?
>> >> > Thanks,
>> >> > Vivek.
>> >> >
>> >> > On Mon, Jun 27, 2011 at 10:55 AM, Colm O hEigeartaigh
>> >> > <co...@apache.org>
>> >> > wrote:
>> >> >>
>> >> >> In WSS4J 1.6 the password is not supplied to the CallbackHandler,
>> >> >> only
>> >> >> the username. The CallbackHandler is expected to supply the password
>> >> >> to the default Validator (UsernameTokenValidator) in this case. If
>> >> >> you
>> >> >> wish to implement some custom scenario, you must implement your own
>> >> >> Validator implementation. See here for more information:
>> >> >>
>> >> >>
>> >> >>
>> >> >> http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html
>> >> >>
>> >> >> Colm.
>> >> >>
>> >> >> On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally
>> >> >> <vi...@gmail.com>
>> >> >> wrote:
>> >> >> > Here is the actual problem when integrating CXF 2.4.1 with WSS4J
>> >> >> > 1.6.1.
>> >> >> > So
>> >> >> > does this change require change in configuration.. Can anybody
>> >> >> > please
>> >> >> > help
>> >> >> > me in fixing this issue.
>> >> >> >
>> >> >> > java.lang.NullPointerException
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
>> >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> >> >> > at
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> >> >> > at java.lang.Thread.run(Thread.java:662)
>> >> >> >
>> >> >> > On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally
>> >> >> > <vi...@gmail.com>wrote:
>> >> >> >
>> >> >> >> Sorry this exception got resolved when I removed
>> >> >> >> XMLSchema1.4.7.jar
>> >> >> >>
>> >> >> >>
>> >> >> >> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally
>> >> >> >> <vi...@gmail.com>wrote:
>> >> >> >>
>> >> >> >>> Hi,
>> >> >> >>>    Thanks for your prompt response.
>> >> >> >>>
>> >> >> >>> When I add WSS4j 1.6.1 the below exception is coming.
>> >> >> >>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> >> >> >>> Factory
>> >> >> >>> method [public java.lang.Object
>> >> >> >>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw
>> >> >> >>> exception;
>> >> >> >>> nested
>> >> >> >>> exception is java.lang.NoSuchFieldError: QUALIFIED
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> Does this change require any change in configuration as well.
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh
>> >> >> >>> <coheigea@apache.org
>> >> >> >>> > wrote:
>> >> >> >>>
>> >> >> >>>> They are incompatible - you must use WSS4J 1.6.x with CXF
>> >> >> >>>> 2.4.x.
>> >> >> >>>>
>> >> >> >>>> Colm.
>> >> >> >>>>
>> >> >> >>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally
>> >> >> >>>> <vi...@gmail.com>
>> >> >> >>>> wrote:
>> >> >> >>>> > Hi
>> >> >> >>>> > I am getting the following exception while replacing existing
>> >> >> >>>> > cxf
>> >> >> >>>> > 2.3.3
>> >> >> >>>> jar
>> >> >> >>>> > with Apache CXF 2.4.1
>> >> >> >>>> > java.lang.NoSuchMethodError<
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
>> >> >> >>>> >:
>> >> >> >>>> >
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>> >> >> >>>> >
>> >> >> >>>> > Can anyone please tell me whether there are any compatibility
>> >> >> >>>> > issues
>> >> >> >>>> > with Apache CXF 2.4 and wss4j 1.5.11.
>> >> >> >>>> >
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> --
>> >> >> >>>> Colm O hEigeartaigh
>> >> >> >>>>
>> >> >> >>>> http://coheigea.blogspot.com/
>> >> >> >>>> Talend - http://www.talend.com
>> >> >> >>>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Colm O hEigeartaigh
>> >> >>
>> >> >> http://coheigea.blogspot.com/
>> >> >> Talend - http://www.talend.com
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Colm O hEigeartaigh
>> >>
>> >> http://coheigea.blogspot.com/
>> >> Talend - http://www.talend.com
>> >
>> >
>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> http://coheigea.blogspot.com/
>> Talend - http://www.talend.com
>
>



-- 
Colm O hEigeartaigh

http://coheigea.blogspot.com/
Talend - http://www.talend.com

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Thanks Colm, This works. But I have a question, why the validators are
introduced in WSS4J 1.6.

On Mon, Jun 27, 2011 at 11:58 AM, Colm O hEigeartaigh
<co...@apache.org>wrote:

> In your service side CallbackHandler, replace:
>
> <<<<<
> if (pc.getIdentifier().equals(this.username)) {
>
> if (!pc.getPassword().equals(this.password)) {
> throw new IOException("Invalid password");
> }
> }
> else{
> throw new IOException("Invalid Identifier");
> }
> >>>>>
>
> with
>
> <<<<<
> if (pc.getIdentifier().equals(this.username)) {
>      pc.setPassword(this.password);
> }
> else{
> throw new IOException("Invalid Identifier");
> }
> >>>>>
>
> Colm.
>
> On Mon, Jun 27, 2011 at 4:54 PM, Vivek Alampally <vi...@gmail.com>
> wrote:
> > Sorry, I might be irritating you but this is what I have done.
> > Server Side (Web service side)
> > --------------------------------------------
> >
> > <jaxws:inInterceptors>
> > <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
> > <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> > <constructor-arg>
> > <map>
> > <entry key="action" value="UsernameToken" />
> > <entry key="passwordType" value="PasswordText" />
> > <entry key="passwordCallbackRef">
> > <ref bean="ServerPasswordCallback" />
> > </entry>
> > </map>
> > </constructor-arg>
> > </bean>
> > </jaxws:inInterceptors>
> > <bean id="ServerPasswordCallback"
> > class="com.fdt.sdl.security.authentication.util.ServerPasswordCallback">
> > <property name="username" value="${webservice.username}" />
> > <property name="password" value="${webservice.password}" />
> > </bean>
> > public class ServerPasswordCallback implements CallbackHandler {
> > private String username;
> > private String password;
> > public String getUsername() {
> > return username;
> > }
> > public void setUsername(String username) {
> > this.username = username;
> > }
> > public String getPassword() {
> > return password;
> > }
> > public void setPassword(String password) {
> > this.password = password;
> > }
> > @Override
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
> > if (pc.getIdentifier().equals(this.username)) {
> > if (!pc.getPassword().equals(this.password)) {
> > throw new IOException("Invalid password");
> > }
> > }
> > else{
> > throw new IOException("Invalid Identifier");
> > }
> > }
> > }
> > Client Side
> > -------------------
> > <bean id="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor"
> />
> > <bean id="logOut"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"
> > />
> > <bean id="saajOut"
> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
> > <bean id="wss4jOut"
> > class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
> > <constructor-arg>
> > <map>
> > <entry key="action" value="UsernameToken" />
> > <entry key="user" value="${webservice.username}" />
> > <entry key="passwordType" value="PasswordText" />
> > <entry key="passwordCallbackRef">
> > <ref bean="clientPasswordCallback" />
> > </entry>
> > </map>
> > </constructor-arg>
> > </bean>
> > In clientFactoryBean,
> > <property name="inInterceptors">
> > <list>
> > <ref bean="logIn" />
> > </list>
> > </property>
> > <property name="outInterceptors">
> > <list>
> > <ref bean="logOut" />
> > <ref bean="saajOut" />
> > <ref bean="wss4jOut" />
> > </list>
> > </property>
> > <bean id="clientPasswordCallback"
> > class="com.fdt.sdl.security.authentication.util.ClientPasswordCallback">
> > <property name="password" value="${webservice.password}" />
> > </bean>
> > public class ClientPasswordCallback implements CallbackHandler {
> > private String password;
> > public String getPassword() {
> > return password;
> > }
> > public void setPassword(String password) {
> > this.password = password;
> > }
> > @Override
> > public void handle(Callback[] callbacks) throws IOException,
> > UnsupportedCallbackException {
> > WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
> > pc.setPassword(this.password);
> > }
> > }
> >
> > On Mon, Jun 27, 2011 at 11:38 AM, Colm O hEigeartaigh <
> coheigea@apache.org>
> > wrote:
> >>
> >> How are you validating the received username/password at the moment?
> >> If you have access to a password for a given user in the
> >> CallbackHandler, then you don't need to write a Validator. Simply set
> >> the password on the WSPasswordCallback object, and the
> >> UsernameTokenValidator will take care of the validation.
> >>
> >> Colm.
> >>
> >> On Mon, Jun 27, 2011 at 4:11 PM, Vivek Alampally <vi...@gmail.com>
> >> wrote:
> >> > Hi Colm,
> >> >              Do you have any link pointing to how this can be done.
> >> > I just need to have a username & password for existing web service.
> For
> >> > this
> >> > do I need to write a custom Validator. Can I use existing
> >> > default UsernameTokenValidator?
> >> > Thanks,
> >> > Vivek.
> >> >
> >> > On Mon, Jun 27, 2011 at 10:55 AM, Colm O hEigeartaigh
> >> > <co...@apache.org>
> >> > wrote:
> >> >>
> >> >> In WSS4J 1.6 the password is not supplied to the CallbackHandler,
> only
> >> >> the username. The CallbackHandler is expected to supply the password
> >> >> to the default Validator (UsernameTokenValidator) in this case. If
> you
> >> >> wish to implement some custom scenario, you must implement your own
> >> >> Validator implementation. See here for more information:
> >> >>
> >> >>
> >> >>
> http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html
> >> >>
> >> >> Colm.
> >> >>
> >> >> On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally <
> vivek2523@gmail.com>
> >> >> wrote:
> >> >> > Here is the actual problem when integrating CXF 2.4.1 with WSS4J
> >> >> > 1.6.1.
> >> >> > So
> >> >> > does this change require change in configuration.. Can anybody
> please
> >> >> > help
> >> >> > me in fixing this issue.
> >> >> >
> >> >> > java.lang.NullPointerException
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
> >> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> >> >> > at
> >> >> >
> >> >> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >> >> > at
> >> >> >
> >> >> >
> >> >> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >> >> > at java.lang.Thread.run(Thread.java:662)
> >> >> >
> >> >> > On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally
> >> >> > <vi...@gmail.com>wrote:
> >> >> >
> >> >> >> Sorry this exception got resolved when I removed
> XMLSchema1.4.7.jar
> >> >> >>
> >> >> >>
> >> >> >> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally
> >> >> >> <vi...@gmail.com>wrote:
> >> >> >>
> >> >> >>> Hi,
> >> >> >>>    Thanks for your prompt response.
> >> >> >>>
> >> >> >>> When I add WSS4j 1.6.1 the below exception is coming.
> >> >> >>> org.springframework.beans.factory.BeanDefinitionStoreException:
> >> >> >>> Factory
> >> >> >>> method [public java.lang.Object
> >> >> >>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw
> >> >> >>> exception;
> >> >> >>> nested
> >> >> >>> exception is java.lang.NoSuchFieldError: QUALIFIED
> >> >> >>>
> >> >> >>>
> >> >> >>> Does this change require any change in configuration as well.
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh
> >> >> >>> <coheigea@apache.org
> >> >> >>> > wrote:
> >> >> >>>
> >> >> >>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
> >> >> >>>>
> >> >> >>>> Colm.
> >> >> >>>>
> >> >> >>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally
> >> >> >>>> <vi...@gmail.com>
> >> >> >>>> wrote:
> >> >> >>>> > Hi
> >> >> >>>> > I am getting the following exception while replacing existing
> >> >> >>>> > cxf
> >> >> >>>> > 2.3.3
> >> >> >>>> jar
> >> >> >>>> > with Apache CXF 2.4.1
> >> >> >>>> > java.lang.NoSuchMethodError<
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
> >> >> >>>> >:
> >> >> >>>> >
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
> >> >> >>>> >
> >> >> >>>> > Can anyone please tell me whether there are any compatibility
> >> >> >>>> > issues
> >> >> >>>> > with Apache CXF 2.4 and wss4j 1.5.11.
> >> >> >>>> >
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>> --
> >> >> >>>> Colm O hEigeartaigh
> >> >> >>>>
> >> >> >>>> http://coheigea.blogspot.com/
> >> >> >>>> Talend - http://www.talend.com
> >> >> >>>>
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Colm O hEigeartaigh
> >> >>
> >> >> http://coheigea.blogspot.com/
> >> >> Talend - http://www.talend.com
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Colm O hEigeartaigh
> >>
> >> http://coheigea.blogspot.com/
> >> Talend - http://www.talend.com
> >
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> http://coheigea.blogspot.com/
> Talend - http://www.talend.com
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Colm O hEigeartaigh <co...@apache.org>.
In your service side CallbackHandler, replace:

<<<<<
if (pc.getIdentifier().equals(this.username)) {

if (!pc.getPassword().equals(this.password)) {
throw new IOException("Invalid password");
}
}
else{
throw new IOException("Invalid Identifier");
}
>>>>>

with

<<<<<
if (pc.getIdentifier().equals(this.username)) {
     pc.setPassword(this.password);
}
else{
throw new IOException("Invalid Identifier");
}
>>>>>

Colm.

On Mon, Jun 27, 2011 at 4:54 PM, Vivek Alampally <vi...@gmail.com> wrote:
> Sorry, I might be irritating you but this is what I have done.
> Server Side (Web service side)
> --------------------------------------------
>
> <jaxws:inInterceptors>
> <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken" />
> <entry key="passwordType" value="PasswordText" />
> <entry key="passwordCallbackRef">
> <ref bean="ServerPasswordCallback" />
> </entry>
> </map>
> </constructor-arg>
> </bean>
> </jaxws:inInterceptors>
> <bean id="ServerPasswordCallback"
> class="com.fdt.sdl.security.authentication.util.ServerPasswordCallback">
> <property name="username" value="${webservice.username}" />
> <property name="password" value="${webservice.password}" />
> </bean>
> public class ServerPasswordCallback implements CallbackHandler {
> private String username;
> private String password;
> public String getUsername() {
> return username;
> }
> public void setUsername(String username) {
> this.username = username;
> }
> public String getPassword() {
> return password;
> }
> public void setPassword(String password) {
> this.password = password;
> }
> @Override
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
> if (pc.getIdentifier().equals(this.username)) {
> if (!pc.getPassword().equals(this.password)) {
> throw new IOException("Invalid password");
> }
> }
> else{
> throw new IOException("Invalid Identifier");
> }
> }
> }
> Client Side
> -------------------
> <bean id="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor" />
> <bean id="logOut" class="org.apache.cxf.interceptor.LoggingOutInterceptor"
> />
> <bean id="saajOut"
> class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
> <bean id="wss4jOut"
> class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken" />
> <entry key="user" value="${webservice.username}" />
> <entry key="passwordType" value="PasswordText" />
> <entry key="passwordCallbackRef">
> <ref bean="clientPasswordCallback" />
> </entry>
> </map>
> </constructor-arg>
> </bean>
> In clientFactoryBean,
> <property name="inInterceptors">
> <list>
> <ref bean="logIn" />
> </list>
> </property>
> <property name="outInterceptors">
> <list>
> <ref bean="logOut" />
> <ref bean="saajOut" />
> <ref bean="wss4jOut" />
> </list>
> </property>
> <bean id="clientPasswordCallback"
> class="com.fdt.sdl.security.authentication.util.ClientPasswordCallback">
> <property name="password" value="${webservice.password}" />
> </bean>
> public class ClientPasswordCallback implements CallbackHandler {
> private String password;
> public String getPassword() {
> return password;
> }
> public void setPassword(String password) {
> this.password = password;
> }
> @Override
> public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
> WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
> pc.setPassword(this.password);
> }
> }
>
> On Mon, Jun 27, 2011 at 11:38 AM, Colm O hEigeartaigh <co...@apache.org>
> wrote:
>>
>> How are you validating the received username/password at the moment?
>> If you have access to a password for a given user in the
>> CallbackHandler, then you don't need to write a Validator. Simply set
>> the password on the WSPasswordCallback object, and the
>> UsernameTokenValidator will take care of the validation.
>>
>> Colm.
>>
>> On Mon, Jun 27, 2011 at 4:11 PM, Vivek Alampally <vi...@gmail.com>
>> wrote:
>> > Hi Colm,
>> >              Do you have any link pointing to how this can be done.
>> > I just need to have a username & password for existing web service. For
>> > this
>> > do I need to write a custom Validator. Can I use existing
>> > default UsernameTokenValidator?
>> > Thanks,
>> > Vivek.
>> >
>> > On Mon, Jun 27, 2011 at 10:55 AM, Colm O hEigeartaigh
>> > <co...@apache.org>
>> > wrote:
>> >>
>> >> In WSS4J 1.6 the password is not supplied to the CallbackHandler, only
>> >> the username. The CallbackHandler is expected to supply the password
>> >> to the default Validator (UsernameTokenValidator) in this case. If you
>> >> wish to implement some custom scenario, you must implement your own
>> >> Validator implementation. See here for more information:
>> >>
>> >>
>> >> http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html
>> >>
>> >> Colm.
>> >>
>> >> On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally <vi...@gmail.com>
>> >> wrote:
>> >> > Here is the actual problem when integrating CXF 2.4.1 with WSS4J
>> >> > 1.6.1.
>> >> > So
>> >> > does this change require change in configuration.. Can anybody please
>> >> > help
>> >> > me in fixing this issue.
>> >> >
>> >> > java.lang.NullPointerException
>> >> > at
>> >> >
>> >> >
>> >> > com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
>> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>> >> > at
>> >> >
>> >> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
>> >> > at
>> >> >
>> >> >
>> >> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
>> >> > at
>> >> >
>> >> >
>> >> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> >> > at
>> >> >
>> >> >
>> >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> >> > at java.lang.Thread.run(Thread.java:662)
>> >> >
>> >> > On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally
>> >> > <vi...@gmail.com>wrote:
>> >> >
>> >> >> Sorry this exception got resolved when I removed XMLSchema1.4.7.jar
>> >> >>
>> >> >>
>> >> >> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally
>> >> >> <vi...@gmail.com>wrote:
>> >> >>
>> >> >>> Hi,
>> >> >>>    Thanks for your prompt response.
>> >> >>>
>> >> >>> When I add WSS4j 1.6.1 the below exception is coming.
>> >> >>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> >> >>> Factory
>> >> >>> method [public java.lang.Object
>> >> >>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw
>> >> >>> exception;
>> >> >>> nested
>> >> >>> exception is java.lang.NoSuchFieldError: QUALIFIED
>> >> >>>
>> >> >>>
>> >> >>> Does this change require any change in configuration as well.
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh
>> >> >>> <coheigea@apache.org
>> >> >>> > wrote:
>> >> >>>
>> >> >>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
>> >> >>>>
>> >> >>>> Colm.
>> >> >>>>
>> >> >>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally
>> >> >>>> <vi...@gmail.com>
>> >> >>>> wrote:
>> >> >>>> > Hi
>> >> >>>> > I am getting the following exception while replacing existing
>> >> >>>> > cxf
>> >> >>>> > 2.3.3
>> >> >>>> jar
>> >> >>>> > with Apache CXF 2.4.1
>> >> >>>> > java.lang.NoSuchMethodError<
>> >> >>>>
>> >> >>>>
>> >> >>>> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
>> >> >>>> >:
>> >> >>>> >
>> >> >>>>
>> >> >>>>
>> >> >>>> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>> >> >>>> >
>> >> >>>> > Can anyone please tell me whether there are any compatibility
>> >> >>>> > issues
>> >> >>>> > with Apache CXF 2.4 and wss4j 1.5.11.
>> >> >>>> >
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> --
>> >> >>>> Colm O hEigeartaigh
>> >> >>>>
>> >> >>>> http://coheigea.blogspot.com/
>> >> >>>> Talend - http://www.talend.com
>> >> >>>>
>> >> >>>
>> >> >>>
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Colm O hEigeartaigh
>> >>
>> >> http://coheigea.blogspot.com/
>> >> Talend - http://www.talend.com
>> >
>> >
>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> http://coheigea.blogspot.com/
>> Talend - http://www.talend.com
>
>



-- 
Colm O hEigeartaigh

http://coheigea.blogspot.com/
Talend - http://www.talend.com

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Sorry, I might be irritating you but this is what I have done.

Server Side (Web service side)
--------------------------------------------

<jaxws:inInterceptors>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
 <constructor-arg>
<map>
<entry key="action" value="UsernameToken" />
<entry key="passwordType" value="PasswordText" />
<entry key="passwordCallbackRef">
<ref bean="ServerPasswordCallback" />
</entry>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>

<bean id="ServerPasswordCallback"
class="com.fdt.sdl.security.authentication.util.ServerPasswordCallback">
<property name="username" value="${webservice.username}" />
<property name="password" value="${webservice.password}" />
</bean>

public class ServerPasswordCallback implements CallbackHandler {

private String username;

private String password;

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

@Override
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
 WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];

if (pc.getIdentifier().equals(this.username)) {

if (!pc.getPassword().equals(this.password)) {
throw new IOException("Invalid password");
}
}
else{
throw new IOException("Invalid Identifier");
}
}

}

Client Side
-------------------
<bean id="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor" />
 <bean id="logOut" class="org.apache.cxf.interceptor.LoggingOutInterceptor"
/>
 <bean id="saajOut"
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
 <bean id="wss4jOut"
class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken" />
<entry key="user" value="${webservice.username}" />
<entry key="passwordType" value="PasswordText" />
<entry key="passwordCallbackRef">
<ref bean="clientPasswordCallback" />
</entry>
</map>
</constructor-arg>
</bean>

In clientFactoryBean,

<property name="inInterceptors">
<list>
<ref bean="logIn" />
</list>
</property>
<property name="outInterceptors">
<list>
<ref bean="logOut" />
<ref bean="saajOut" />
<ref bean="wss4jOut" />
</list>
</property>

<bean id="clientPasswordCallback"
class="com.fdt.sdl.security.authentication.util.ClientPasswordCallback">
<property name="password" value="${webservice.password}" />
</bean>

public class ClientPasswordCallback implements CallbackHandler {

private String password;

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

@Override
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];

pc.setPassword(this.password);

}

}


On Mon, Jun 27, 2011 at 11:38 AM, Colm O hEigeartaigh
<co...@apache.org>wrote:

> How are you validating the received username/password at the moment?
> If you have access to a password for a given user in the
> CallbackHandler, then you don't need to write a Validator. Simply set
> the password on the WSPasswordCallback object, and the
> UsernameTokenValidator will take care of the validation.
>
> Colm.
>
> On Mon, Jun 27, 2011 at 4:11 PM, Vivek Alampally <vi...@gmail.com>
> wrote:
> > Hi Colm,
> >              Do you have any link pointing to how this can be done.
> > I just need to have a username & password for existing web service. For
> this
> > do I need to write a custom Validator. Can I use existing
> > default UsernameTokenValidator?
> > Thanks,
> > Vivek.
> >
> > On Mon, Jun 27, 2011 at 10:55 AM, Colm O hEigeartaigh <
> coheigea@apache.org>
> > wrote:
> >>
> >> In WSS4J 1.6 the password is not supplied to the CallbackHandler, only
> >> the username. The CallbackHandler is expected to supply the password
> >> to the default Validator (UsernameTokenValidator) in this case. If you
> >> wish to implement some custom scenario, you must implement your own
> >> Validator implementation. See here for more information:
> >>
> >>
> http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html
> >>
> >> Colm.
> >>
> >> On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally <vi...@gmail.com>
> >> wrote:
> >> > Here is the actual problem when integrating CXF 2.4.1 with WSS4J
> 1.6.1.
> >> > So
> >> > does this change require change in configuration.. Can anybody please
> >> > help
> >> > me in fixing this issue.
> >> >
> >> > java.lang.NullPointerException
> >> > at
> >> >
> >> >
> com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
> >> > at
> >> >
> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
> >> > at
> >> >
> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
> >> > at
> >> >
> >> >
> org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
> >> > at
> >> >
> >> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
> >> > at
> >> >
> >> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
> >> > at
> >> >
> >> >
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> >> > at
> >> >
> >> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
> >> > at
> >> >
> >> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
> >> > at
> >> >
> >> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
> >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> >> > at
> >> >
> >> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> >> > at
> >> >
> >> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> >> > at
> >> >
> >> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> >> > at
> >> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> >> > at
> >> >
> >> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >> > at
> >> >
> >> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
> >> > at
> >> >
> >> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
> >> > at
> >> >
> >> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
> >> > at
> >> >
> >> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
> >> > at
> >> >
> >> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> >> > at
> >> >
> >> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >> > at
> >> >
> >> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >> > at java.lang.Thread.run(Thread.java:662)
> >> >
> >> > On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally
> >> > <vi...@gmail.com>wrote:
> >> >
> >> >> Sorry this exception got resolved when I removed XMLSchema1.4.7.jar
> >> >>
> >> >>
> >> >> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally
> >> >> <vi...@gmail.com>wrote:
> >> >>
> >> >>> Hi,
> >> >>>    Thanks for your prompt response.
> >> >>>
> >> >>> When I add WSS4j 1.6.1 the below exception is coming.
> >> >>> org.springframework.beans.factory.BeanDefinitionStoreException:
> >> >>> Factory
> >> >>> method [public java.lang.Object
> >> >>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw
> exception;
> >> >>> nested
> >> >>> exception is java.lang.NoSuchFieldError: QUALIFIED
> >> >>>
> >> >>>
> >> >>> Does this change require any change in configuration as well.
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh
> >> >>> <coheigea@apache.org
> >> >>> > wrote:
> >> >>>
> >> >>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
> >> >>>>
> >> >>>> Colm.
> >> >>>>
> >> >>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally
> >> >>>> <vi...@gmail.com>
> >> >>>> wrote:
> >> >>>> > Hi
> >> >>>> > I am getting the following exception while replacing existing cxf
> >> >>>> > 2.3.3
> >> >>>> jar
> >> >>>> > with Apache CXF 2.4.1
> >> >>>> > java.lang.NoSuchMethodError<
> >> >>>>
> >> >>>>
> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
> >> >>>> >:
> >> >>>> >
> >> >>>>
> >> >>>>
> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
> >> >>>> >
> >> >>>> > Can anyone please tell me whether there are any compatibility
> >> >>>> > issues
> >> >>>> > with Apache CXF 2.4 and wss4j 1.5.11.
> >> >>>> >
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>> --
> >> >>>> Colm O hEigeartaigh
> >> >>>>
> >> >>>> http://coheigea.blogspot.com/
> >> >>>> Talend - http://www.talend.com
> >> >>>>
> >> >>>
> >> >>>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Colm O hEigeartaigh
> >>
> >> http://coheigea.blogspot.com/
> >> Talend - http://www.talend.com
> >
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> http://coheigea.blogspot.com/
> Talend - http://www.talend.com
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Hi Colm,
             Do you have any link pointing to how this can be done.
I just need to have a username & password for existing web service. For this
do I need to write a custom Validator. Can I use existing
default UsernameTokenValidator?

Thanks,
Vivek.

On Mon, Jun 27, 2011 at 10:55 AM, Colm O hEigeartaigh
<co...@apache.org>wrote:

> In WSS4J 1.6 the password is not supplied to the CallbackHandler, only
> the username. The CallbackHandler is expected to supply the password
> to the default Validator (UsernameTokenValidator) in this case. If you
> wish to implement some custom scenario, you must implement your own
> Validator implementation. See here for more information:
>
> http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html
>
> Colm.
>
> On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally <vi...@gmail.com>
> wrote:
> > Here is the actual problem when integrating CXF 2.4.1 with WSS4J 1.6.1.
> So
> > does this change require change in configuration.. Can anybody please
> help
> > me in fixing this issue.
> >
> > java.lang.NullPointerException
> > at
> >
> com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
> > at
> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
> > at
> >
> org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
> > at
> >
> org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
> > at
> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
> > at
> >
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
> > at
> >
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> > at
> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
> > at
> >
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
> > at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> > at
> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
> > at
> >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
> > at
> >
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> > at
> >
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
> > at
> >
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
> > at
> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
> > at
> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> > at
> >
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> > at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> > at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> > at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
> > at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
> > at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
> > at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
> > On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally <vivek2523@gmail.com
> >wrote:
> >
> >> Sorry this exception got resolved when I removed XMLSchema1.4.7.jar
> >>
> >>
> >> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally <vivek2523@gmail.com
> >wrote:
> >>
> >>> Hi,
> >>>    Thanks for your prompt response.
> >>>
> >>> When I add WSS4j 1.6.1 the below exception is coming.
> >>> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
> >>> method [public java.lang.Object
> >>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception;
> nested
> >>> exception is java.lang.NoSuchFieldError: QUALIFIED
> >>>
> >>>
> >>> Does this change require any change in configuration as well.
> >>>
> >>>
> >>>
> >>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh <
> coheigea@apache.org
> >>> > wrote:
> >>>
> >>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
> >>>>
> >>>> Colm.
> >>>>
> >>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vivek2523@gmail.com
> >
> >>>> wrote:
> >>>> > Hi
> >>>> > I am getting the following exception while replacing existing cxf
> 2.3.3
> >>>> jar
> >>>> > with Apache CXF 2.4.1
> >>>> > java.lang.NoSuchMethodError<
> >>>>
> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
> >>>> >:
> >>>> >
> >>>>
> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
> >>>> >
> >>>> > Can anyone please tell me whether there are any compatibility issues
> >>>> > with Apache CXF 2.4 and wss4j 1.5.11.
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Colm O hEigeartaigh
> >>>>
> >>>> http://coheigea.blogspot.com/
> >>>> Talend - http://www.talend.com
> >>>>
> >>>
> >>>
> >>
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> http://coheigea.blogspot.com/
> Talend - http://www.talend.com
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Colm O hEigeartaigh <co...@apache.org>.
In WSS4J 1.6 the password is not supplied to the CallbackHandler, only
the username. The CallbackHandler is expected to supply the password
to the default Validator (UsernameTokenValidator) in this case. If you
wish to implement some custom scenario, you must implement your own
Validator implementation. See here for more information:

http://coheigea.blogspot.com/2011/04/wss4j-16-introducing-validators.html

Colm.

On Mon, Jun 27, 2011 at 3:36 PM, Vivek Alampally <vi...@gmail.com> wrote:
> Here is the actual problem when integrating CXF 2.4.1 with WSS4J 1.6.1. So
> does this change require change in configuration.. Can anybody please help
> me in fixing this issue.
>
> java.lang.NullPointerException
> at
> com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
> at
> org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
> at
> org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
> at
> org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
> at
> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
> at
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
> at
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally <vi...@gmail.com>wrote:
>
>> Sorry this exception got resolved when I removed XMLSchema1.4.7.jar
>>
>>
>> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally <vi...@gmail.com>wrote:
>>
>>> Hi,
>>>    Thanks for your prompt response.
>>>
>>> When I add WSS4j 1.6.1 the below exception is coming.
>>> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
>>> method [public java.lang.Object
>>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested
>>> exception is java.lang.NoSuchFieldError: QUALIFIED
>>>
>>>
>>> Does this change require any change in configuration as well.
>>>
>>>
>>>
>>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh <coheigea@apache.org
>>> > wrote:
>>>
>>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
>>>>
>>>> Colm.
>>>>
>>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vi...@gmail.com>
>>>> wrote:
>>>> > Hi
>>>> > I am getting the following exception while replacing existing cxf 2.3.3
>>>> jar
>>>> > with Apache CXF 2.4.1
>>>> > java.lang.NoSuchMethodError<
>>>> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
>>>> >:
>>>> >
>>>> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>>>> >
>>>> > Can anyone please tell me whether there are any compatibility issues
>>>> > with Apache CXF 2.4 and wss4j 1.5.11.
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Colm O hEigeartaigh
>>>>
>>>> http://coheigea.blogspot.com/
>>>> Talend - http://www.talend.com
>>>>
>>>
>>>
>>
>



-- 
Colm O hEigeartaigh

http://coheigea.blogspot.com/
Talend - http://www.talend.com

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Here is the actual problem when integrating CXF 2.4.1 with WSS4J 1.6.1. So
does this change require change in configuration.. Can anybody please help
me in fixing this issue.

java.lang.NullPointerException
at
com.fdt.sdl.security.authentication.util.ServerPasswordCallback.handle(ServerPasswordCallback.java:41)
at
org.apache.ws.security.validate.UsernameTokenValidator.verifyDigestPassword(UsernameTokenValidator.java:168)
at
org.apache.ws.security.validate.UsernameTokenValidator.verifyPlaintextPassword(UsernameTokenValidator.java:142)
at
org.apache.ws.security.validate.UsernameTokenValidator.validate(UsernameTokenValidator.java:100)
at
org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:118)
at
org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:52)
at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:249)
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

On Mon, Jun 27, 2011 at 10:22 AM, Vivek Alampally <vi...@gmail.com>wrote:

> Sorry this exception got resolved when I removed XMLSchema1.4.7.jar
>
>
> On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally <vi...@gmail.com>wrote:
>
>> Hi,
>>    Thanks for your prompt response.
>>
>> When I add WSS4j 1.6.1 the below exception is coming.
>> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
>> method [public java.lang.Object
>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested
>> exception is java.lang.NoSuchFieldError: QUALIFIED
>>
>>
>> Does this change require any change in configuration as well.
>>
>>
>>
>> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh <coheigea@apache.org
>> > wrote:
>>
>>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
>>>
>>> Colm.
>>>
>>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vi...@gmail.com>
>>> wrote:
>>> > Hi
>>> > I am getting the following exception while replacing existing cxf 2.3.3
>>> jar
>>> > with Apache CXF 2.4.1
>>> > java.lang.NoSuchMethodError<
>>> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
>>> >:
>>> >
>>> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>>> >
>>> > Can anyone please tell me whether there are any compatibility issues
>>> > with Apache CXF 2.4 and wss4j 1.5.11.
>>> >
>>>
>>>
>>>
>>> --
>>> Colm O hEigeartaigh
>>>
>>> http://coheigea.blogspot.com/
>>> Talend - http://www.talend.com
>>>
>>
>>
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Sorry this exception got resolved when I removed XMLSchema1.4.7.jar

On Mon, Jun 27, 2011 at 10:14 AM, Vivek Alampally <vi...@gmail.com>wrote:

> Hi,
>    Thanks for your prompt response.
>
> When I add WSS4j 1.6.1 the below exception is coming.
> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
> method [public java.lang.Object
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested
> exception is java.lang.NoSuchFieldError: QUALIFIED
>
>
> Does this change require any change in configuration as well.
>
>
>
> On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh <co...@apache.org>wrote:
>
>> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
>>
>> Colm.
>>
>> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vi...@gmail.com>
>> wrote:
>> > Hi
>> > I am getting the following exception while replacing existing cxf 2.3.3
>> jar
>> > with Apache CXF 2.4.1
>> > java.lang.NoSuchMethodError<
>> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
>> >:
>> >
>> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>> >
>> > Can anyone please tell me whether there are any compatibility issues
>> > with Apache CXF 2.4 and wss4j 1.5.11.
>> >
>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> http://coheigea.blogspot.com/
>> Talend - http://www.talend.com
>>
>
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Vivek Alampally <vi...@gmail.com>.
Hi,
   Thanks for your prompt response.

When I add WSS4j 1.6.1 the below exception is coming.
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public java.lang.Object
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested
exception is java.lang.NoSuchFieldError: QUALIFIED


Does this change require any change in configuration as well.



On Mon, Jun 27, 2011 at 9:53 AM, Colm O hEigeartaigh <co...@apache.org>wrote:

> They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.
>
> Colm.
>
> On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vi...@gmail.com>
> wrote:
> > Hi
> > I am getting the following exception while replacing existing cxf 2.3.3
> jar
> > with Apache CXF 2.4.1
> > java.lang.NoSuchMethodError<
> http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html
> >:
> >
> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
> >
> > Can anyone please tell me whether there are any compatibility issues
> > with Apache CXF 2.4 and wss4j 1.5.11.
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> http://coheigea.blogspot.com/
> Talend - http://www.talend.com
>

Re: java.lang.NoSuchMethodError Exception While Using Apache CXF 2.4 and wss4j 1.5.11

Posted by Colm O hEigeartaigh <co...@apache.org>.
They are incompatible - you must use WSS4J 1.6.x with CXF 2.4.x.

Colm.

On Mon, Jun 27, 2011 at 2:47 PM, Vivek Alampally <vi...@gmail.com> wrote:
> Hi
> I am getting the following exception while replacing existing cxf 2.3.3 jar
> with Apache CXF 2.4.1
> java.lang.NoSuchMethodError<http://download.oracle.com/javase/6/docs/api/java/lang/NoSuchMethodError.html>:
> org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
>
> Can anyone please tell me whether there are any compatibility issues
> with Apache CXF 2.4 and wss4j 1.5.11.
>



-- 
Colm O hEigeartaigh

http://coheigea.blogspot.com/
Talend - http://www.talend.com