You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Aki Yoshida <el...@gmail.com> on 2014/05/19 12:25:42 UTC
Re: Exception in webservice-communication. How to get additional informations?
moving this thread to users@cxf.
for CXF usage questions, please use users@cxf list.
you can find the answer to your question here.
http://cxf.apache.org/docs/debugging-and-logging.html#DebuggingandLogging-Stacktraceinfaultdetails
it describes how to get more exception information included in the message.
regards, aki
2014-05-15 11:57 GMT+02:00 Tobse <to...@seetec.de>:
> Hello.
>
> Below you can find a stacktrace as it is logged by my application and an
> answer as I traced it with wireshark.
> As you can see, there are additional informations in the answer traced with
> wireshark (here "ImageRotation not supported").
> Is there any chance to get additional informations from the webservice when
> there is an exception in the communication?
> Thanks.
>
>
> EXCEPTION:
>
> [Mai14 12:46:20] WARN Interceptor for
> {http://www.onvif.org/ver10/device/wsdl}DeviceService#{http://www.onvif.org/ver10/media/wsdl}SetVideoSourceConfiguration
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
> at com.sun.proxy.$Proxy79.setVideoSourceConfiguration(Unknown Source)
> ...
> at java.lang.Thread.run(Thread.java:744)
> Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '400:
> Bad Request' when communicating with http://camera/onvif/media_service
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1528)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1488)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1307)
> at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
> at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:229)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> ... 21 more
> [Mai14 12:46:20] ERROR There are problems while setting parameters via ONVIF
> on the device
> javax.xml.ws.WebServiceException: Could not send Message.
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:144)
> at com.sun.proxy.$Proxy79.setVideoSourceConfiguration(Unknown Source)
> ...
> at java.lang.Thread.run(Thread.java:744)
> Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '400:
> Bad Request' when communicating with http://camera/onvif/media_service
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1528)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1488)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1307)
> at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
> at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:229)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
> ... 14 more
>
> WIRESHARK:
>
> HTTP/1.1 400 Bad Request
> Server: AvigilonOnvifNvt/2.2.0.28
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: 2297
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
> xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
>
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:tt="http://www.onvif.org/ver10/schema"
> xmlns:tns1="http://www.onvif.org/ver10/topics"
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
> xmlns:wsrfrw="http://docs.oasis-open.org/wsrf/rw-2"
> xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
>
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
> xmlns:dn="http://www.onvif.org/ver10/network/wsdl"
> xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
> xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
> xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
> xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
> xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
> xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
> xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
> xmlns:ter="http://www.onvif.org/ver10/error"
>
> xmlns:tavg="http://www.avigilon.com/onvif/ver10/avigilon-types"
> xmlns:tnsavg="http://www.avigilon.com/onvif/ver10/topics"
>
> xmlns:avg="http://www.avigilon.com/onvif/ver10/avigilon/wsdl"
>
> xmlns:avgb="http://www.avigilon.com/onvif/ver10/avigilon-base/wsdl"
>
> xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery">
> <SOAP-ENV:Header>
> </SOAP-ENV:Header>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <SOAP-ENV:Code>
> <SOAP-ENV:Value>
> SOAP-ENV:Sender
> </SOAP-ENV:Value>
> <SOAP-ENV:Subcode>
> <SOAP-ENV:Value>
> ter:InvalidArgVal
> </SOAP-ENV:Value>
> <SOAP-ENV:Subcode>
> <SOAP-ENV:Value>
> ter:ConfigModify
> </SOAP-ENV:Value>
> </SOAP-ENV:Subcode>
> </SOAP-ENV:Subcode>
> </SOAP-ENV:Code>
> <SOAP-ENV:Reason>
> <SOAP-ENV:Text xml:lang="en">
> ImageRotation not supported
> </SOAP-ENV:Text>
> </SOAP-ENV:Reason>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Exception-in-webservice-communication-How-to-get-additional-informations-tp5744006.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Exception in webservice-communication. How to get additional informations?
Posted by Daniel Kulp <dk...@apache.org>.
On May 23, 2014, at 8:23 AM, Tobse <to...@seetec.de> wrote:
> Thanks for your suggestions. Since I don't have a fix endpoint and can't
> configure with xml-files I have to do everything in java souce code. Do you
> have any code examples for me? I don't know wether I did something wrong or
> it just didn't work for me. Thanks.
((BindingProvider)port).getRequestContext()
.put(“org.apache.cxf.transport.no_io_exceptions”, Boolean.TRUE);
port.setVideoSourceConfiguration(….);
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Re-Exception-in-webservice-communication-How-to-get-additional-informations-tp5744151p5744379.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Exception in webservice-communication. How to get additional
informations?
Posted by Tobse <to...@seetec.de>.
Thanks for your suggestions. Since I don't have a fix endpoint and can't
configure with xml-files I have to do everything in java souce code. Do you
have any code examples for me? I don't know wether I did something wrong or
it just didn't work for me. Thanks.
--
View this message in context: http://cxf.547215.n5.nabble.com/Re-Exception-in-webservice-communication-How-to-get-additional-informations-tp5744151p5744379.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Exception in webservice-communication. How to get additional informations?
Posted by Daniel Kulp <dk...@apache.org>.
Interesting…. your camera isn’t properly implementing the soap spec that would require the SOAP fault to be a 500 error code, not a 400.
You can TRY add a contextual property of “org.apache.cxf.transport.no_io_exceptions” to Boolean.TRUE or “true” and seeing if that helps. That would bypass the first place an exception is thrown, but I’m not sure how much further it would go for soap/jaxws.
Dan
On May 20, 2014, at 7:51 AM, Tobse <to...@seetec.de> wrote:
> Hi,
>
> that didn't work for me. :(
> Is there any chance to get the soap message that caused the exception so
> that I can log it to my log-file or parse it for more detailed error-codes
> in my application?
> By the way, I don't have a fix endpoint.
>
> Kind Regards,
>
> Tobse
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Re-Exception-in-webservice-communication-How-to-get-additional-informations-tp5744151p5744209.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Exception in webservice-communication. How to get additional
informations?
Posted by Tobse <to...@seetec.de>.
Hi,
that didn't work for me. :(
Is there any chance to get the soap message that caused the exception so
that I can log it to my log-file or parse it for more detailed error-codes
in my application?
By the way, I don't have a fix endpoint.
Kind Regards,
Tobse
--
View this message in context: http://cxf.547215.n5.nabble.com/Re-Exception-in-webservice-communication-How-to-get-additional-informations-tp5744151p5744209.html
Sent from the cxf-user mailing list archive at Nabble.com.