|
From: Patrick Y. <kc...@ce...> - 2003-07-29 02:39:24
|
Hi Ronald, Any news about this? :-) Thanks very much, -Patrick Ronald van Kuijk wrote: > Hi, > > In the PKISignatureImpl.java you do the following: > > DocumentResult docResult = new DocumentResult(); > TransformerFactory.newInstance().newTransformer(). > transform(soapPart.getContent(), docResult); > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > (new XMLWriter(baos)).write(docResult.getDocument()); > DocumentBuilderFactory factory = DocumentBuilderFactory. > newInstance(); > factory.setNamespaceAware(true); > // soapPartDocument is a DOM equivilance of soapPart > final Document soapPartDocument = factory.newDocumentBuilder(). > parse(new ByteArrayInputStream(baos.toByteArray())); > > > Just to get from a soapPart to a soapPartDocument. According to the > specs (well the tutorial at least): > > Moreover, the |SOAPPart| of a |SOAPMessage| is also a DOM Level 2 > |Document|, and can be manipulated as such by applications, tools and > libraries that use DOM. See Chapter 6 > <http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM.html#wp79996> > for details about DOM. See Adding Content to the SOAPPart Object > <http://java.sun.com/j2ee/1.4/docs/tutorial/doc/SAAJ3.html#wp64119> > and Adding a Document to the SOAP Body > <http://java.sun.com/j2ee/1.4/docs/tutorial/doc/SAAJ3.html#wp78963> > for details on how to use DOM documents with the SAAJ API. > > final Document soapPartDocument = (Document) soapPart; > > > Should work as well. Maybe the 'axis' problem is solved then as well. > Eclipse does not complain about the casting and is really good at > checking this, I'll try running it later (have currently no server > configured for using certificates). > > Ronald > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > ebxmlms-develop mailing list > ebx...@li... > https://lists.sourceforge.net/lists/listinfo/ebxmlms-develop |