Transforming XML using https



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
Exception{

//Add keystore even though this web site should already be trusted.
System.setProperty("javax.net.ssl.trustStore",
ConfigReader.GLOBAL_ROOT + "mywebsite.keystore");

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

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

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

StreamResult objResult = new StreamResult(objWriter);

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

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

.



Relevant Pages

  • Re: MSXML2.XSLTransform on WM5 exists? Or is there another way?!?
    ... Unfortunately XSLTransform stuff isn't supported on CE. ... I've been looking all over the place for a way to transform XML via XSL on ... The following then works to transform the XML with XSL: ...
    (microsoft.public.windowsce.app.development)
  • Re: EASY, RIGHT? : Retrieving SQL Data as an XML Document
    ... As for dataDocument, it is an XmlDataDocument which implements IXPathNavigable so any Transform overload that takes an IXPathNavigable as the first arguments will consume the dataDocument as the first argument. ... And of course your stylesheet chapter8.xsl that you load with XslTransform is crucial to get any meaningful results, the DataSet/XmlDataDocument convert the relational query result to XML but obviously if you want to write a stylesheet to process that XML then you need to know how the XML looks. ...
    (microsoft.public.dotnet.xml)
  • Re: Display XML in WebBrowser Control
    ... The fact is that this stylesheet was converted from the original non-XSLT ... XML files other than the ones that you provide, ... If I try to transform using .NET and the following code ... feed of XML and am trying to inject it into the control. ...
    (microsoft.public.dotnet.xml)
  • Re: MSXML2.XSLTransform on WM5 exists? Or is there another way?!?
    ... XmlDocument holding the Xsl is in mem, it can be manipulated, which means ... public string Path } ... // Transform XML data. ... transform stuff I haven't dealt with. ...
    (microsoft.public.windowsce.app.development)
  • Re: Can I use an industry standard XSD and ADO.NET / SQLServer to output a conforming XML file
    ... XSL would be one way: you could transform the incoming XML (From ADO.NET ... query) into the form you like: ... Another option if your database is SQL Server is to use SQL2000's FOR XML ...
    (microsoft.public.dotnet.xml)