Hello, I use the following code to write a Document style service, trying to transform(by XSLT) an incoming document(well-formed) via SOAP:
public class MessageService { public void processMessage (Envelope env, SOAPContext requestContext, SOAPContext resultContext) throws java.io.IOException, javax.mail.MessagingException { try{ TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer(newStreamSource("my_XSL.xsl")); /* problem 1: extracting well-form document from requestContext */ transformer.transform(Source xmlSource, Result outputTarget); }catch (Exception e) {} /* problem 2: returning a well-formed document */ resultContext.setRootPart(); } } My question is: 1)How can I extract the XML wrapped inside the SOAPContext? As I cannot find any useful function call except getBodyPart(int index); 2)How can I send back a well-form document thru SOAPcontext.setRootPart()? Seems setRootPart don't expect me to send a well-formed document but a string only Thanks, eric -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>