Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Transforming XML using https

Thread Tools

Transforming XML using https
Posts: n/a
I have an XSL stylesheet that I need to transform with. The XSL
stylesheet is located at an HTTPS address. I've tried to transform my
XML using this stylesheet, but I keep getting a "no trusted certificate
found" error. This web site is supposed to be trusted, so I don't know
what I'm doing wrong. Please help! Here's a sample of my code:

//Transform the XML using XSL.
public void transform(String strXSLPath, Writer objWriter) throws

//Add keystore even though this web site should already be trusted.
ConfigReader.GLOBAL_ROOT + "mywebsite.keystore");

//Get the stylesheet. (getWebHome() pulls the root URL from a
config file.)
URL objURL = new URL(SharedFunctions.getWebHome() + "/xsl/" +

//Create the StreamSource. This is when I get the error.
StreamSource objXSLSource = new StreamSource(objURL.openStream());

TransformerFactory objFactory = TransformerFactory.newInstance();
Transformer objTransformer =

StreamResult objResult = new StreamResult(objWriter);

//Get the XML source from the Document that has already been
DOMSource objXMLSource = new DOMSource(getDocument());

//Transform the XML and write the output to the stream.
objTransformer.transform(objXMLSource, objResult);

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transforming xml using xslt into a string variable? Ken Adams Java 1 03-10-2005 04:13 PM
Transforming XML with XSL to String Krista Lemieux ASP .Net 1 08-10-2004 02:41 PM
Transforming XML To Binary using XSL? Xamalaek XML 1 05-19-2004 05:47 AM
Transforming XML To Binary Format using XSL? Xamalaek XML 0 05-14-2004 03:53 PM
Transforming xml with server controls with xsl dwhitford ASP .Net 0 05-14-2004 02:44 PM