Hi All!
I have written JBossWS web service and client class for it. Client and service work successfully. Also I have written Handler class such as
public class MHandler extends GenericHandler{ public boolean handleRequest(MessageContext context) { SOAPMessageContext sctx = (SOAPMessageContext)context; SOAPMessage message = sctx.getMessage(); try { SOAPHeader header = message.getSOAPHeader(); String userName = header.getAttribute("username"); String password = header.getAttribute("password"); try { FileOutputStream file = new FileOutputStream("C:/Documents and Settings/kbolyand/Desktop/log.txt"); file.write("Into Handler".getBytes()); file.write((userName + "=" + password).getBytes()); file.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } catch (SOAPException e) { e.printStackTrace(); } return true; } public QName[] getHeaders() { return new QName[0]; } }