sharepoint - How to intercept XML parsing errors in JAXB processing of SOAP messages? -
can use jaxb intercept xml parsing inspect payload?
i have generated code bindings sharepoint wsdl using java's wsimport
tool. i'm calling soap method called getlistitems
in sharepoint, generated code doing xml parsing me comes server.
that parse failing; it's known issue in sharepoint it's possible users put special characters in things breaks xml sharepoint generating.
this stack trace gives hint character reference "&#])
(notice lack of closing double quote there) - best guess right there's non-printable character or funky in xml busting parse. fixing begins knowing more how it's happening. suggestions?
com.sun.xml.internal.ws.encoding.soap.deserializationexception: [failed localize] failed deserialize response.(javax.xml.bind.unmarshalexception - linked exception: [javax.xml.stream.xmlstreamexception: parseerror @ [row,col]:[2399,354] message: character reference "&#]) @ com.sun.xml.internal.ws.client.sei.syncmethodhandler.invoke(syncmethodhandler.java:111) @ com.sun.xml.internal.ws.client.sei.syncmethodhandler.invoke(syncmethodhandler.java:77) @ com.sun.xml.internal.ws.client.sei.seistub.invoke(seistub.java:147) @ com.sun.proxy.$proxy45.getlistitems(unknown source) @ (snipped bits of code's stack trace) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ com.simontuffs.onejar.boot.run(boot.java:340) @ com.simontuffs.onejar.boot.main(boot.java:166) caused by: javax.xml.bind.unmarshalexception - linked exception: [javax.xml.stream.xmlstreamexception: parseerror @ [row,col]:[2399,354] message: character reference "&#] @ com.sun.xml.internal.bind.v2.runtime.unmarshaller.unmarshallerimpl.handlestreamexception(unmarshallerimpl.java:470) @ com.sun.xml.internal.bind.v2.runtime.unmarshaller.unmarshallerimpl.unmarshal0(unmarshallerimpl.java:402) @ com.sun.xml.internal.bind.v2.runtime.bridgeimpl.unmarshal(bridgeimpl.java:109) @ com.sun.xml.internal.bind.api.bridge.unmarshal(bridge.java:222) @ com.sun.xml.internal.ws.db.glassfish.bridgewrapper.unmarshal(bridgewrapper.java:257) @ com.sun.xml.internal.ws.client.sei.responsebuilder$doclit.readresponse(responsebuilder.java:635) @ com.sun.xml.internal.ws.client.sei.stubhandler.readresponse(stubhandler.java:243) @ com.sun.xml.internal.ws.db.databindingimpl.deserializeresponse(databindingimpl.java:189) @ com.sun.xml.internal.ws.db.databindingimpl.deserializeresponse(databindingimpl.java:276) @ com.sun.xml.internal.ws.client.sei.syncmethodhandler.invoke(syncmethodhandler.java:104) ... 14 more
you turn on logging of soap messages in client. see instance tracing xml request/responses jax-ws log console.
Comments
Post a Comment