axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergei Fedulov <>
Subject Problem with enabling WS-Security in Axis
Date Mon, 01 Oct 2007 08:52:51 GMT
Hi all!

I have a problem with enabling WS-security on Axis client. I am using 
Axis, not Axis2. The problem is, that when the security is enabled, Axis 
doesn't encode special characters (like "<") in XML-elements, and I am 
getting an error from server:
org.xml.sax.SAXParseException: The content of elements must consist of 
well-formed character data or markup.

When the security is not enabled, characters encoded just fine.

The name of my service is "SendSms". I am configuring the service using 
following construction:
EngineConfiguration config = new FileProvider("conf/client_deploy.wsdd");
SendSmsServiceLocator serviceLocator = new SendSmsServiceLocator(config);

SendSms_PortType serviceStub = serviceLocator.getSendSms();

Stub stub = (Stub) serviceStub;
stub._setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_DIGEST);
stub._setProperty(WSHandlerConstants.USER, userName);
stub._setProperty(WSHandlerConstants.PW_CALLBACK_REF, callbackHandler);

The content of the "conf/client_deploy.wsdd" is the following:
<deployment xmlns="" 
  <transport name="http" 
   <globalConfiguration >
    <requestFlow >
     <handler type="" >
      <parameter name="action" value="UsernameToken"/>
      <parameter name="passwordType" value="PasswordDigest"/>
    </requestFlow >
   </globalConfiguration >

Thanks for your help in advance!

Sergei Fedulov
Euro-Baltic Software Alliance

Mobile:  +372 56 984026
ICQ#:     257838427
Skype:    fedulows
Y!ID:     fedulows

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message