• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generics Error in Writing a SoapMessage handler  RSS feed

 
Sumit Adx
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to create a Handler to capture the SOAPMessages and append the WS security information to it

Following is the code Excerpt:

public class securityHandler implements SOAPHandler<SOAPMessageContext>
{
Code goes in here
}

But I am getting a compile time error in this code. The error is as follows:

Error
type parameter javax.xml.rpc.handler.soap.SOAPMessageContext is not within its bound
public class securityHandler implements SOAPHandler<SOAPMessageContext> {

I am unable to comprehend why this error is coming as this is the standard code for writing SOAPHandler and it is given like this only a lot of places on the Net.

Any Help will be appreciated.

Thanks !
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Note that there are two interfaces with the name SOAPMessageContext. One in the package javax.xml.ws.handler.soap and the other in the package javax.xml.rpc.handler.soap.
Make sure that you have imported the correct one!
Best wishes!
 
Sumit Adx
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ivan,

THis is exactly the stupid lil problem I faced.


Cheers
Sumit
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!