You can also try adding logging handlers only for one chain and see if it will work well.
On 2/8/07, Adrian Corcoran <[EMAIL PROTECTED]> wrote:
The order in which handlers are added doesn't matter (once the DOMHandler is added before the LoggingHandler). However changing the order of execution may give you some clues as to what is going on... On 2/8/07, Ing. Jaroslav Půbal <[EMAIL PROTECTED] > wrote: > > > Guys please :-(( > > Tomek Sztelak already wrote below :"Order in which handlers are added doesn't matter" > And I wrote : "I tried first code for logging then first code for security then include only one DOMOutHandler in the chain .. and nothing works." > > Any other reasonable solutions? > > > > > -----Original Message----- > From: Adrian Corcoran [mailto:[EMAIL PROTECTED] > > Sent: Thursday, February 08, 2007 11:43 AM > To: [email protected] > Subject: Re: [xfire-user] Logging doesnt work with WS-Security ? > > > try putting your the log handler in before the WSS4J handlers - are you sure that log4j is set up correctly, are you seeing other xfire logging statements... > > > On 2/8/07, Ing. Jaroslav Půbal <[EMAIL PROTECTED]> wrote: > > > > > > Still doesnt work! > > > > code: > > When logXMLMessages is false all working fine !! > > When logXMLMessages is true exception bellow !! > > > > > > public static void addGordicWSS(Client client, String login, String password, List<String> searchPackages,boolean logXMLMessages) { > > > > client.addOutHandler(new DOMOutHandler()); > > Properties outProperties = new Properties(); > > configureGordicOutProperties(outProperties,login,password); > > client.addOutHandler(new WSS4JOutHandler(outProperties)); > > > > client.setProperty(JaxbType.SEARCH_PACKAGES, searchPackages); > > > > if (logXMLMessages){ > > // Tell XFire to cache a DOM document for the various in/out/fault flows > > client.addInHandler(new org.codehaus.xfire.util.dom.DOMInHandler()); > > //client.addOutHandler(new org.codehaus.xfire.util.dom.DOMOutHandler());//already set > > client.addFaultHandler(new org.codehaus.xfire.util.dom.DOMOutHandler()); > > > > // Add a logging handler to each flow > > client.addInHandler(new org.codehaus.xfire.util.LoggingHandler()); > > client.addOutHandler(new org.codehaus.xfire.util.LoggingHandler()); > > client.addFaultHandler(new org.codehaus.xfire.util.LoggingHandler()); > > } > > } > > > > exception: > > > > > > org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not unmarshall type. > > org.codehaus.xfire.fault.XFireFault: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not unmarshall type. > > at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31) > > at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28) > > at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111) > > at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67) > > at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) > > at org.codehaus.xfire.client.Client.onReceive(Client.java:382) > > at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139) > > at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) > > at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) > > at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) > > at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75) > > at org.codehaus.xfire.client.Client.invoke(Client.java:335) > > at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) > > at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) > > at $Proxy40.spsNoveCisloJednaci(Unknown Source) > > > > > > > > > > > > > > > > -----Original Message----- > > From: Adrian Corcoran [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, February 06, 2007 5:59 PM > > To: [email protected] > > Subject: Re: [xfire-user] Logging doesnt work with WS-Security ? > > > > I am getting up an running with ws-security at the moment and can confirm that it does work. From the look of you stack trace it seems that there is a problem with the deserialization/unmarshalling of you xml. Perhaps you should try taking out ws-security and see if it works. > > > > > > On 2/6/07, Tomek Sztelak <[EMAIL PROTECTED]> wrote: > > > Order in which handlers are added doesn't matter. I'll try to test > > > this later today. > > > > > > > > > On 2/6/07, Ing. Jaroslav Půbal <[EMAIL PROTECTED]> wrote: > > > > I tried that .. but no luck. > > > > > > > > What is correct sequence > > > > > > > > DOMOutHandler > > > > WSS4JOutHandler > > > > LoggingHandler > > > > > > > > or on order of handlers not depends? > > > > > > > > > > > > -----Original Message----- > > > > From: Tomek Sztelak [mailto:[EMAIL PROTECTED] > > > > Sent: Tuesday, February 06, 2007 4:50 PM > > > > To: [email protected] > > > > Subject: Re: [xfire-user] Logging doesnt work with WS-Security ? > > > > > > > > > > > > DOMOutHandler can be added only once to each handlers chain. > > > > > > > > On 2/6/07, Ing. Jaroslav Půbal < [EMAIL PROTECTED]> wrote: > > > > > client.addOutHandler(new DOMOutHandler());//?? > > > > > Properties outProperties = new Properties(); > > > > > > > > > configureGordicOutProperties(outProperties,finalLogin,password); > > > > > client.addOutHandler(new WSS4JOutHandler(outProperties)); > > > > > > > > > > client.setProperty(JaxbType.SEARCH_PACKAGES , searchPackages); > > > > > > > > > > if (logXMLMessages){ > > > > > client.addInHandler(new > > > > > org.codehaus.xfire.util.dom.DOMInHandler()); > > > > > client.addInHandler (new > > > > > org.codehaus.xfire.util.LoggingHandler()); > > > > > > > > > > client.addOutHandler(new > > > > > org.codehaus.xfire.util.dom.DOMOutHandler(){});//?? > > > > > client.addOutHandler (new > > > > > org.codehaus.xfire.util.LoggingHandler()); > > > > > > > > > > client.addFaultHandler(new > > > > > org.codehaus.xfire.util.dom.DOMOutHandler()); > > > > > client.addFaultHandler (new > > > > > org.codehaus.xfire.util.LoggingHandler()); > > > > > } > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Tomek Sztelak [mailto: [EMAIL PROTECTED] > > > > > Sent: Tuesday, February 06, 2007 4:03 PM > > > > > To: [email protected] > > > > > Subject: Re: [xfire-user] Logging doesnt work with WS-Security ? > > > > > > > > > > > > > > > Can you show your config where you use both loging and ws-sec ? > > > > > > > > > > On 2/6/07, Ing. Jaroslav Půbal <[EMAIL PROTECTED] > wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > stand alone logging as described in > > > > > > http://xfire.codehaus.org/Logging working fine. > > > > > > > > > > > > // Tell XFire to cache a DOM document for the various in/out/fault > > > > > > flows service.addInHandler(new > > > > > > org.codehaus.xfire.util.dom.DOMInHandler ()); > > > > > > service.addOutHandler(new > > > > > > org.codehaus.xfire.util.dom.DOMOutHandler()); > > > > > > service.addFaultHandler(new > > > > > > org.codehaus.xfire.util.dom.DOMOutHandler()); > > > > > > > > > > > > // Add a logging handler to each flow service.addInHandler(new > > > > > > org.codehaus.xfire.util.LoggingHandler()); > > > > > > service.addOutHandler(new org.codehaus.xfire.util.LoggingHandler ()); > > > > > > service.addFaultHandler(new > > > > > > org.codehaus.xfire.util.LoggingHandler()); > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > stand alone ws-security as described in > > > > > > http://xfire.codehaus.org/WS-Security > > > > > > working fine. > > > > > > > > > > > > Client client = Client.getInstance(service); > > > > > > client.addOutHandler(new DOMOutHandler()); Properties outProperties > > > > > > = new Properties(); // CONFIGURE OUTGOING SECURITY HERE > > > > > > (outProperties) <-- client.addOutHandler (new > > > > > > WSS4JOutHandler(outProperties)); > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > But if I want both of them i get exceptions. > > > > > > I tried first code for logging then first code for security then > > > > > include > > > > > > only one DOMOutHandler in the chain .. and nothing works. > > > > > > > > > > > > Pleas help. > > > > > > > > > > > > > > > > > > > > > > > > 2007-02-06 15:04:23,282 ERROR http-8090-Processor3:pubal > > > > > > [DefaultFaultHandler] Fault occurred! > > > > > > org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. > > > > > > > > > > Nested exception is > > > > > > org.codehaus.xfire.fault.XFireFault : Could not unmarshall type. > > > > > > org.codehaus.xfire.fault.XFireFault: Could not unmarshall > > > > > > type. > > > > > > at > > > > > > org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java :211) > > > > > > at > > > > > > > > > > > org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindi > > > > > ng > > > > > Provider.java:160) > > > > > > at > > > > > > > > > > > org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBindin > > > > > >
-- ----- When one of our products stops working, we'll blame another vendor within 24 hours.
