• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Capture xml webservice entry ?

 
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to capture a xml webservice entry.

How can I capture it in CXF ? example:



I donĀ“t want a LoggingInIterceptor, I want get de xml webservice entry without it.

Thanks in advance !
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is a "xml webservice entry"?
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, Imagine a SoapUI, I send the xml to a webservice, I need to capture this xml in a webservice cxf.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can capture the SOAP message via a SOAPHandler. That'll give you access to a SOAPMessageContext, from which you can get the SOAPMessage, which you can write to some OutputStream.
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:You can capture the SOAP message via a SOAPHandler. That'll give you access to a SOAPMessageContext, from which you can get the SOAPMessage, which you can write to some OutputStream.




Like in this way ?

Creating SOAP Message Handlers in 3 Simple Steps - Part 1


http://docs.oracle.com/cd/E13222_01/wls/docs103/webserv_adv/handlers.html


Thanks a lot for your answer !!!
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That article throws EJB into the mix -which isn't germane to the problem-, but yes, that's what I meant.
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I implemented the handler:




But I have this exception:



Someone knows a solution for this error ?

Thanks in advance !
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The handler isn't even invoked, at least I don't see the class name in the stack trace. My hunch is that there might be conflicting classes/libraries at play - that there's more than one SOAPElement class being used. That could happen quickly, because javax.xml.soap.SOAPElement is part of the JRE, and probably also shipped with CXF or JBoss.
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:The handler isn't even invoked, at least I don't see the class name in the stack trace. My hunch is that there might be conflicting classes/libraries at play - that there's more than one SOAPElement class being used. That could happen quickly, because javax.xml.soap.SOAPElement is part of the JRE, and probably also shipped with CXF or JBoss.




I used it:




 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, but the exception apparently does not occur in any of the handler methods. Is "handleMessage" ever invoked? Probably not.
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Yeah, but the exception apparently does not occur in any of the handler methods. Is "handleMessage" ever invoked? Probably not.




I finished it with a interceptor, I created a new Inteceptor, and I call the Interceptor in the webservice.

After this, I call a EJB and I save this data in base.






Thanks very much indeed for all !
 
reply
    Bookmark Topic Watch Topic
  • New Topic