Custom Protocol Plugin error with DITA-OT Transformations
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 12
- Joined: Thu Dec 14, 2017 11:52 am
Custom Protocol Plugin error with DITA-OT Transformations
Hi,
I have a Custom Protocol handler plugin. The plugin requires access to several Oxygen SDK classes like UtilAccess, StandalonePluginWorkspace to function. This is primarily required for reading server credentials from options storage.
When I run a transformation on a map opened over my custom protocol, my protocol handler class is called in action to download linked documents. However, it ends up throwing NPE as an instance of StandalonePluginWorkspace is not available. I investigated and it seems that my class is loaded into a new DITA-OT process.
My question is, if my Custom Protocol handler class is called from a new process, how can I obtain the options storage and establish a connection to a server.
Thanks,
Ankit
I have a Custom Protocol handler plugin. The plugin requires access to several Oxygen SDK classes like UtilAccess, StandalonePluginWorkspace to function. This is primarily required for reading server credentials from options storage.
When I run a transformation on a map opened over my custom protocol, my protocol handler class is called in action to download linked documents. However, it ends up throwing NPE as an instance of StandalonePluginWorkspace is not available. I investigated and it seems that my class is loaded into a new DITA-OT process.
My question is, if my Custom Protocol handler class is called from a new process, how can I obtain the options storage and establish a connection to a server.
Thanks,
Ankit
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Custom Protocol Plugin error with DITA-OT Transformations
Post by alex_jitianu »
Hi Ankit,
Indeed, a DITA-OT transformation is run in a different process in which a StandalonePluginWorkspace instance is not available. I will add an issue to investigate how we can make one available (at least one with partial functionality, like the UtilAccess methods). We will let you know as soon as the issue gets fixed. Meanwhile, I see no other possibility than to create your own implementations for encrypting and storing the user credentials.
Best regards,
Alex
Indeed, a DITA-OT transformation is run in a different process in which a StandalonePluginWorkspace instance is not available. I will add an issue to investigate how we can make one available (at least one with partial functionality, like the UtilAccess methods). We will let you know as soon as the issue gets fixed. Meanwhile, I see no other possibility than to create your own implementations for encrypting and storing the user credentials.
Best regards,
Alex
-
- Posts: 12
- Joined: Thu Dec 14, 2017 11:52 am
Re: Custom Protocol Plugin error with DITA-OT Transformations
Hi Alex,
Thanks for your reply.
Could you help me understand how does the new process know to instantiate the CustomURLHandler class for specific URLs? Plain DITA-OT code wouldn't know to do this, so is it run under some shell process that leverages available Oxygen plugins?
Regards,
Ankit
Thanks for your reply.
Could you help me understand how does the new process know to instantiate the CustomURLHandler class for specific URLs? Plain DITA-OT code wouldn't know to do this, so is it run under some shell process that leverages available Oxygen plugins?
Regards,
Ankit
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Custom Protocol Plugin error with DITA-OT Transformations
Hi Ankit,
When the DITA OT is run from Oxygen, it starts as a separate process. But we set a parameter to it which will instantiate a custom XML parser configuration implementation available in our code. When that XML parser configuration class is first instantiated, it will also load all plugins (like the main Oxygen application usually does) in order for the custom protocols to work. But because this is not an entire Oxygen application, various APIs called (like the one you discovered) might not work.
One workaround for you might be to have your own options storage folder using the "user.home" system property to know where the user home resides, create a folder there and read/write settings to it using a certain custom file format that you decide. Thus the custom protocol would not call any API from that singleton.
Regards,
Radu
When the DITA OT is run from Oxygen, it starts as a separate process. But we set a parameter to it which will instantiate a custom XML parser configuration implementation available in our code. When that XML parser configuration class is first instantiated, it will also load all plugins (like the main Oxygen application usually does) in order for the custom protocols to work. But because this is not an entire Oxygen application, various APIs called (like the one you discovered) might not work.
One workaround for you might be to have your own options storage folder using the "user.home" system property to know where the user home resides, create a folder there and read/write settings to it using a certain custom file format that you decide. Thus the custom protocol would not call any API from that singleton.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service