Skip to main content

Call XSLT from within Handler?

2 replies [Last post]
jim_widz
Offline
Joined: 2008-06-19
Points: 0

Is it possible to call XSLT from with one of the handlers (SOAP or Logical) within JAX-WS to modify the SOAP message? Basically, I would like to take a SOAP message, call XSLT to possible modify parts of the SOAP Body, and then use the transformed SOAP message.

This is my scenario:
1. Client sends SOAP request into my web service (inbound service)
2. My web service sends SOAP request to another web service (outbound client)
3. My web service receives SOAP response (inbound client)
4. Call transformation (XSLT) on SOAP response to possibly modify the SOAP Body
5. My web service uses transformed SOAP response to client (outbound service)

I am very new to all of this and cannot figure out if this scenario is possible. I have been able to create both a SOAP handler and a Logical handler, and have even been able to call XSLT from within the handler. My issue stems in attempting to use the transformed data when leaving the handler.

Any help would be greatly appreciated. THANKS!!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Glen Mazza

Information on writing JAX-WS handlers:
http://www.jroller.com/gmazza/entry/adding_jax_ws_handlers_to
Sample Java/XSLT code - see method createPDFReport() here:
http://tinyurl.com/5p4euu

HTH,
Glen

metro wrote:
>
> Is it possible to call XSLT from with one of the handlers (SOAP or
> Logical) within JAX-WS to modify the SOAP message? Basically, I would like
> to take a SOAP message, call XSLT to possible modify parts of the SOAP
> Body, and then use the transformed SOAP message.
>
> This is my scenario:
> 1. Client sends SOAP request into my web service (inbound service)
> 2. My web service sends SOAP request to another web service (outbound
> client)
> 3. My web service receives SOAP response (inbound client)
> 4. Call transformation (XSLT) on SOAP response to possibly modify the SOAP
> Body
> 5. My web service uses transformed SOAP response to client (outbound
> service)
>
> I am very new to all of this and cannot figure out if this scenario is
> possible. I have been able to create both a SOAP handler and a Logical
> handler, and have even been able to call XSLT from within the handler. My
> issue stems in attempting to use the transformed data when leaving the
> handler.
>
> Any help would be greatly appreciated. THANKS!!!
> [Message sent by forum member 'jim_widz' (jim_widz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=281495
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
> For additional commands, e-mail: users-help@metro.dev.java.net
>
>
>

--
View this message in context: http://www.nabble.com/Call-XSLT-from-within-Handler--tp18021318p18030959...
Sent from the Metro - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

scharpscott
Offline
Joined: 2011-03-11
Points: 0

I was interested in this question so I looked up where the blog and code sample Glen cited currently exist - as of 1/27/2012:

http://www.jroller.com/gmazza/entry/jaxws_handler_tutorial

http://code.google.com/p/kohmori/source/browse/trunk/framework/src/main/java/com/googlecode/kohmori/reportgen/