incubator-retired-openaz icon indicating copy to clipboard operation
incubator-retired-openaz copied to clipboard

modified JaxpRequest and JaxpResponse's load method

Open duanshiqiang opened this issue 8 years ago • 2 comments

JaxpRequest and JaxpResponse both have a static method "JaxpRequest load(File fileXmlRequest)" to load a xml file to a corresponding object. The load methods uses JAXB to unmarshal the XML.

When using JAXB to unmarshal XML, it's very expensive to create a JaxbContext, so I modified the methods to use a private static attribute to store and re-use a single JaxbContext.

The load method returns null if the XML's first node is a comment node, I fixed that also.

duanshiqiang avatar Oct 20 '16 09:10 duanshiqiang

The init method to create context object is removed. I agree having a separate Singleton class would be better but I think in this case it would be a little overkill.

duanshiqiang avatar Oct 21 '16 03:10 duanshiqiang

@duanshiqiang : I have a question probably tangential to your pull request, are you using this Xacml implementation ? Can you give me a few more information as follows

  1. How much complete implementation is this source code ?
  2. Does it have Xacml 3.0 implementation ?
  3. Where did you find the documentation around it ?

Thanks

jainh avatar Oct 21 '16 17:10 jainh