You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew Hart <ah...@akimeka.com> on 2013/04/02 18:34:37 UTC

Questions re interceptor to insert XML into SOAP body

Hello all, 

 

I am using JBoss AS 6.x (the newest version I am allowed to use) and
that comes bundled with CXF 2.3.1.

 

I am fairly new to CXF and to web services in general.  I have a web
service with two operations,  the first to request data which posts a
message to a JMS queue where it is picked up by a message driven bean
that does a long running db query and builds some tables.  The second
takes a request number issued by the first and uses it to check for
results, which are then delivered if ready.

 

Instead of having the message driven bean build data base  tables which
I then have to read into java objects and get marshaled into XML for the
response, I would like to have it instead just go ahead and pre-marshal
them into XML and store that in the database instead.

 

Then, when the results are requested, I would like to fetch the XML from
the database and insert it into my SOAP response body as the payload.
This would simplify my database tables, since the results of different
requests could all be stored in the same table as XML, and should make
my response much faster for the second operation.

 

My questions:  I am assuming that I would need to disable the normal
interceptor that does this marshaling of the response and/or replace it
with my own that would insert the pre-marshaled payload from the
database.  Does anyone have any examples on hand of doing this?

 

Also, what is the purpose of the
SoapMessage.ASYNC_POST_RESPONSE_DISPATCH key that can be set to true or
false?   Is there some sort of already built in server side asynchrony
that I am not taking advantage of?

 

 

 








NOTICE: This transmission (including all attachments) is company confidential, is intended only for the individual or entity named above, and is likely to contain privileged, proprietary and confidential information that is exempt from disclosure requests under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, use of or reliance upon any of the information contained in this transmission is strictly prohibited. Any inadvertent or unauthorized disclosure shall not compromise or waive the confidentiality of this transmission. If you have received this transmission in error, please forward this message immediately to postmaster@akimeka.com <ma...@akimeka.com>  and delete or otherwise remove this email from your system.  Thank you


Re: Questions re interceptor to insert XML into SOAP body

Posted by Willem jiang <wi...@gmail.com>.
Hi,

Can you try to look at the JAXWS Dispatch API[1]?  
It could be more easy to deal with the XML message with this API.


[1]http://cxf.apache.org/docs/jax-ws-dispatch-api.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Wednesday, April 3, 2013 at 12:34 AM, Andrew Hart wrote:

> Hello all,  
>  
>  
> I am using JBoss AS 6.x (the newest version I am allowed to use) and
> that comes bundled with CXF 2.3.1.
>  
>  
> I am fairly new to CXF and to web services in general. I have a web
> service with two operations, the first to request data which posts a
> message to a JMS queue where it is picked up by a message driven bean
> that does a long running db query and builds some tables. The second
> takes a request number issued by the first and uses it to check for
> results, which are then delivered if ready.
>  
>  
> Instead of having the message driven bean build data base tables which
> I then have to read into java objects and get marshaled into XML for the
> response, I would like to have it instead just go ahead and pre-marshal
> them into XML and store that in the database instead.
>  
>  
> Then, when the results are requested, I would like to fetch the XML from
> the database and insert it into my SOAP response body as the payload.
> This would simplify my database tables, since the results of different
> requests could all be stored in the same table as XML, and should make
> my response much faster for the second operation.
>  
>  
> My questions: I am assuming that I would need to disable the normal
> interceptor that does this marshaling of the response and/or replace it
> with my own that would insert the pre-marshaled payload from the
> database. Does anyone have any examples on hand of doing this?
>  
>  
> Also, what is the purpose of the
> SoapMessage.ASYNC_POST_RESPONSE_DISPATCH key that can be set to true or
> false? Is there some sort of already built in server side asynchrony
> that I am not taking advantage of?
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> NOTICE: This transmission (including all attachments) is company confidential, is intended only for the individual or entity named above, and is likely to contain privileged, proprietary and confidential information that is exempt from disclosure requests under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, use of or reliance upon any of the information contained in this transmission is strictly prohibited. Any inadvertent or unauthorized disclosure shall not compromise or waive the confidentiality of this transmission. If you have received this transmission in error, please forward this message immediately to postmaster@akimeka.com <ma...@akimeka.com> and delete or otherwise remove this email from your system. Thank you