Hi all,
I want to extends AbstractSoapInterceptor to etid.save my soap requests.
but when try to retrieve the SOAPmessage by :*
getContent(SOAPMessage.class)* it returns a
SOAPMessage with null header and Body parts, while the response contains
realy body and headers (I use soapUI to test my webservices)
So, how to get the complete soap response.
java code : (for outgoing req)
private SAAJInInterceptor saajIn = new SAAJInInterceptor();
public LogOutInter(){
super(Phase.PRE_PROTOCOL);
getAfter().add(SAAJInInterceptor.class.getName());
}
public void handleMessage(SoapMessage message) throws Fault {
SOAPMessage soapMessage = getSOAPMessage(message);
try {
System.out.println(soapMessage.getSOAPBody()); //
return null
soapMessage.writeTo(System.out); // empty soap parts
} catch (Exception e) {
e.printStackTrace();
}
}
private SOAPMessage getSOAPMessage(SoapMessage smsg){
SOAPMessage soapMessage = smsg.getContent(SOAPMessage.class);
System.out.println("SOAP : " + soapMessage == null); // return
False
if (soapMessage == null) {
saajIn.handleMessage(smsg);
soapMessage = smsg.getContent(SOAPMessage.class);
}
System.out.println("SOAP : " + soapMessage == null); // return
False
return soapMessage;
}
Thank for your help .
--
View this message in context:
http://cxf.547215.n5.nabble.com/Why-the-getContent-SOAPMessage-class-returns-a-soap-request-with-empty-parts-tp5477024p5477024.html
Sent from the cxf-user mailing list archive at Nabble.com.