David Dearing wrote:
> I have created a simple Axis2 "echo" service and client and am now
> trying to add Rampart security, starting with a simple UsernameToken and
> plain text Password.
> 
> The secured service is running and it rejects client calls that are
> missing the required SOAP header.
> 
> I set up the client to add the username and password, but I get an
> AbstractMethodError on the client side.  Am I missing a configuration
> step or an overlooked dependency?  Any help would be greatly appreciated!!
> 
> I'm using Axis2 1.5 and Rampart 1.4.  The rahas-1.4 and rampart-1.4
> modules *do* get deployed from the client repo.  Brief code snippet:
> 
>    ConfigurationContext ctx = //snip: Factory.create(repo)
>    SecureServiceStub stub = new SecureServiceStub(ctx);
> 
>    // configure rampart security
>    ServiceClient sc = stub._getServiceClient();
>    sc.engageModule("rampart");
> 
>    Options options = sc.getOptions();
>    options.setUserName("guest");
>    options.setPassword("pass");
> 
>    stub.echo("hello");
> 
> 
> Exception in thread "main" java.lang.AbstractMethodError
> org.apache.axiom.om.impl.builder.StAXBuilder.processAttributes(StAXBuilder.java:230)
> org.apache.axiom.om.impl.builder.StAXOMBuilder.populateOMElement(StAXOMBuilder.java:396)
> org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:425)
> org.apache.axiom.om.impl.builder.StAXOMBuilder.createNextOMElement(StAXOMBuilder.java:282)
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:207)
> org.apache.axiom.om.impl.dom.DocumentImpl.getOMDocumentElement(DocumentImpl.java:443)
> org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:502)
> org.apache.rahas.Token.<init>(Token.java:141)
> org.apache.rampart.builder.BindingBuilder.handleSupportingTokens(BindingBuilder.java:388)
> ...
> 
> 


Some additional investigation led me to find the error being generated
from a line in StAXBuilder that attempts to call
OMAttribute.setAttributeType with a null type.

The OMAttribute appears to be wsu:Id for the wsse:UsernameToken element.
 I think this type should be "xsd:ID", but I'm not sure where/how to
change this on the client.

Reply via email to