xwss
  1. xwss
  2. XWSS-33

Schema location is incorrect in at least SimpleJDK6WS example and https://xwss.dev.java.net/Securing_JAVASE6_WebServices.html

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      33

      Description

      Both examples contain XML configuration which specifies the schema location at ttp://java.sun.com/xml/ns/xwss/config

      <xwss:JAXRPCSecurity xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">

      I am unable to validate my configurations.

      Please fix.

        Activity

        Hide
        kumarjayanti added a comment -

        Hi Greg,

        The Namespace URI is a logical one only, especially because the schema is a
        proprietary one. But if you are using XWSS API's and Runtime then XWSS actually
        does a schema validation of the input configuration as the first step before
        doing any further processing with the configuration files.

        The schema (.xsd) file is located inside xwss 3.0 xws-security.jar, and it is
        also located in metro (webservices-rt.jar)

        And we use the following code to set the SchemaSource :

        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setAttribute(
        "http://apache.org/xml/features/validation/dynamic",
        Boolean.FALSE);
        factory.setAttribute(
        "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
        "http://www.w3.org/2001/XMLSchema");
        InputStream is =
        SecurityConfigurationXmlReader.class.
        getResourceAsStream("xwssconfig.xsd");
        factory.setAttribute(
        "http://java.sun.com/xml/jaxp/properties/schemaSource", is);
        factory.setValidating(true);
        factory.setIgnoringComments(true);
        factory.setNamespaceAware(true);

        If you wish to do your own schema validation (which i think is un-necessary)
        then you may get the schema file from here :

        http://fisheye5.atlassian.com/browse/~raw,r=1.4/xwss/xwss-ri/src/com/sun/xml/wss/impl/config/xwssconfig.xsd

        Thanks

        Show
        kumarjayanti added a comment - Hi Greg, The Namespace URI is a logical one only, especially because the schema is a proprietary one. But if you are using XWSS API's and Runtime then XWSS actually does a schema validation of the input configuration as the first step before doing any further processing with the configuration files. The schema (.xsd) file is located inside xwss 3.0 xws-security.jar, and it is also located in metro (webservices-rt.jar) And we use the following code to set the SchemaSource : DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setAttribute( "http://apache.org/xml/features/validation/dynamic", Boolean.FALSE); factory.setAttribute( "http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); InputStream is = SecurityConfigurationXmlReader.class. getResourceAsStream("xwssconfig.xsd"); factory.setAttribute( "http://java.sun.com/xml/jaxp/properties/schemaSource", is); factory.setValidating(true); factory.setIgnoringComments(true); factory.setNamespaceAware(true); If you wish to do your own schema validation (which i think is un-necessary) then you may get the schema file from here : http://fisheye5.atlassian.com/browse/~raw,r=1.4/xwss/xwss-ri/src/com/sun/xml/wss/impl/config/xwssconfig.xsd Thanks

          People

          • Assignee:
            xwss-issues
            Reporter:
            gregrluck
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: