On Thursday 04 November 2010 8:08:57 am Bayu Anggorojati wrote:
> Hi Dan,
> 
> I encountered this error when trying to generate the java code from wsdl
> using wsdl2java from cfx 2.3.0:
> 
> WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException
> 
> I never had this error with 2.2.10 at least. Is it a bug? or is there
> any thing that I need to take care of in 2.30?
> 
> Thank you in advance.

Can you run with -verbose to get the full stack trace?

Not sure what would cause that.   The stack trace may help.

Dan


> 
> Bayu
> 
> On 03-11-2010 16:24, Daniel Kulp wrote:
> > What version of CXF?   At one point, there was a bug where interceptors
> > added to the endpoint directly didn't get added to the chain.  Make sure
> > you are using 2.3.0.
> > 
> > Also, in your code below, you are not setting any actions on the
> > Wss4jInInterceptor.  Thus, it may be bailing out fast as its not supposed
> > to do any actions.
> > 
> > Dan
> > 
> > On Wednesday 03 November 2010 5:24:49 am siuyab wrote:
> >> Dear all,
> >> 
> >> Actually I posted this question under different thread, but I think it's
> >> better to start as a new thread.
> >> 
> >> I have to say that I am new to web service and CXF stuff. I currently
> >> trying to add simple username token of ws-security on an already
> >> developed code which is using CXFNonSpringServlet.
> >> 
> >> In the override loadBus method, the endpoint is published in this way:
> >> javax.xml.ws.Endpoint.publish("/query", service);
> >> 
> >> Then I followed the ws-security example as written in following website,
> >> without configuring the Spring:
> >> https://cwiki.apache.org/CXF20DOC/ws-security.html#WS-Security-addinterc
> >> ept ors
> >> 
> >> ws-security configuration at server side was also done in the loadBus
> >> method.
> >> 
> >> At the server side however, I didn't follow exactly the same think as
> >> shown in the example because in the example Endpoint refers to
> >> org.apache.cxf.endpoint.Endpoint, but in the code it refers to
> >> javax.xml.ws.Endpoint. So, here is the slightly modified code:
> >> 
> >> 
> >> EndpointImpl jaxwsEndpoint = (EndpointImpl)Endpoint.publish("/query",
> >> service);
> >> Endpoint cxfEndpoint = (Endpoint)
> >> jaxwsEndpoint.getServer().getEndpoint();
> >> 
> >> /** Adding Incoming Interceptors */
> >> Map<String,Object>  inProps= new HashMap<String,Object>();
> >> 
> >> WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
> >> ((EndpointImpl) cxfEndpoint).getInInterceptors().add(wssIn);
> >> 
> >> 
> >> I got the following error when client tries to execute the method in web
> >> service:
> >> 
> >> 
> >> Caused by: org.apache.cxf.binding.soap.SoapFault: MustUnderstand
> >> headers:
> >> [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se
> >> cext -1.0.xsd}Security] are not understood.
> >> 
> >>          at
> >> 
> >> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarsh
> >> alF ault(Soap11FaultInInterceptor.java:75) at
> >> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleM
> >> ess age(Soap11FaultInInterceptor.java:46) at
> >> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleM
> >> ess age(Soap11FaultInInterceptor.java:35) at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >> hai n.java:243) at
> >> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> >> (Ab stractFaultChainInitiatorObserver.java:99) at
> >> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> >> age (CheckFaultInterceptor.java:69) at
> >> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> >> age (CheckFaultInterceptor.java:34) at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >> hai n.java:243) at
> >> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:700) at
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> >> ons eInternal(HTTPConduit.java:2261) at
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> >> ons e(HTTPConduit.java:2134) at
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
> >> Con duit.java:1988) at
> >> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >> 
> >>          at
> >> 
> >> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
> >> 
> >>          at
> >> 
> >> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
> >> nte rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >> hai n.java:243) at
> >> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:487) at
> >> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at
> >> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at
> >> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >> 
> >>          at
> >> 
> >> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >> 
> >>          ... 30 more
> >> 
> >> Can somebody give some clue on how to solve this issue please? Perhaps
> >> this is very basic or stupid question, but any help will be
> >> appreciated.
> >> 
> >> Regards,
> >> Bayu

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to