Hello,
I have a WS client (i.e. a servlet) and a corresponding message handler. I simply want to retrieve IN the WS client a variable FROM the handler. Please let me know how to do that.
Here is a snippet from the handler:
public boolean handleResponse(MessageContext context) {
try{
SOAPMessageContext smc = (SOAPMessageContext) context;
SOAPMessage msg = smc.getMessage();
Iterator it = msg.getAttachments();
while(it.hasNext()){
AttachmentPart ap = (AttachmentPart) it.next();
DataHandler dh = ap.getDataHandler();
smc.setProperty("prop", dh);//HERE IS MY PROPERTY/VARIABLE
}
} catch(Exception e){
e.printStackTrace();
}
return true;
}