Oh yes, forgot to mention, another way would be with JAXB is to add an
interceptor and process the stream before the StaxInInterceptor does.
eg:
<code>
static class MyInterceptor extends AbstractPhaseInterceptor<Message> {
public MyInterceptor() {
super(Phase.POST_STREAM);
getBefore().add(StaxInInterceptor.class.getName());
}
public void handleMessage(Message msg) throws
org.apache.cxf.interceptor.Fault {
InputStream is = msg.getContent(InputStream.class);
assert is != null;
try {
byte[] byteContent =
IOUtils.readBytesFromStream(is);
msg.setContent(InputStream.class, new
ByteArrayInputStream(byteContent));
String encoding = (String)
msg.get(Message.ENCODING);
String originalXML = new
String(byteContent,encoding);
} catch(Exception e) {
//FIXME: handle exception
e.printStackTrace();
}
}
}
</code>
csaban wrote:
>
> Probably this is late now, but I was facing the same issue. (Sharepoint,
> NTLMv2, List[null])
>
> Using JAXB GetList always returned null, but switching to XMLBEANS I do
> get the xml content of the getList response.
>
> Hope this helps someone.
>
> --
> Csaba
>
>
> mmule wrote:
>>
>> Hello,
>>
>> Do you have a solution for this yet? I am facing a similar issue. The CXF
>> is returning null.
>>
>> Please share if you have the solution.
>>
>> Thanks
>> M
>>
>
>
--
View this message in context:
http://old.nabble.com/How-to-consume-SharePoint-Service-Response-%28Java-.NET-interop%29--tp25263932p28087647.html
Sent from the cxf-user mailing list archive at Nabble.com.