Announcement Announcement Module
Collapse
No announcement yet.
No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema'

    When my servlet container starts and the following code is executed in the class org.springframework.ws.wsdl.wsdl11.builder.Abstrac tWsdl4jDefinitionBuilder,
    Code:
        /**
         * Creates a WSDL4J extensibility element.
         *
         * @param parentType  a class object indicating where in the WSDL definition this extension will exist
         * @param elementType the qname of the extensibility element
         * @return the extensibility element
         * @throws WSDLException in case of errors
         * @see javax.wsdl.extensions.ExtensionRegistry#createExtension(Class,javax.xml.namespace.QName)
         */
        protected ExtensibilityElement createExtension(Class parentType, QName elementType) throws WSDLException {
            if (extensionRegistry == null) {
                WSDLFactory wsdlFactory = WSDLFactory.newInstance();
                extensionRegistry = wsdlFactory.newPopulatedExtensionRegistry();
            }
            return extensionRegistry.createExtension(parentType, elementType);
        }
    I get the following error:
    Code:
    Caused by: org.springframework.ws.wsdl.wsdl11.Wsdl4jDefinitionException: WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.; nested exception is WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.: 
    Caused by: WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.: 
    	at javax.wsdl.extensions.ExtensionRegistry.createExtension(Unknown Source)
    	at org.springframework.ws.wsdl.wsdl11.builder.AbstractWsdl4jDefinitionBuilder.createExtension(AbstractWsdl4jDefinitionBuilder.java:199)
    	at org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder.buildTypes(XsdBasedSoap11Wsdl4jDefinitionBuilder.java:203)
    	at org.springframework.ws.wsdl.wsdl11.builder.AbstractWsdl4jDefinitionBuilder.buildTypes(AbstractWsdl4jDefinitionBuilder.java:98)
    	at org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition.afterPropertiesSet(DynamicWsdl11Definition.java:69)
    I suspect this is caused by the version of SAAJ (1.2) that is included in WebSphere 6.1. Has anyone else seen this problem?

    Shannon Kendrick

  • #2
    It's probably not SAAJ, but WSDL4J. Can you figure out which version of WSDL4J you have? (Weblogic probably overrides the version contained in your app, as it does with Xerces, J2EE, etc.) Giving me a version number of WL might also help, so that I can figure it out by reading the reference docs.

    Comment


    • #3
      Arjen, Just to be clear, I'm running WebSphere 6.1, not Weblogic. I'm using the Rational Application Developer 7 IDE with the WebSphere 6.1 test environment. The WSDL classes are loaded from the jar "C:/Program Files/IBM/SDP70/runtimes/base_v61/plugins/com.ibm.ws.runtime_6.1.0.jar". I took a look inside the jar, but I saw nothing to indicate what version of WSDL4J was included.

      The following code example causes the exception:
      Code:
      		WSDLFactory wsdlFactory = WSDLFactory.newInstance();
      		ExtensionRegistry extensionRegistry = wsdlFactory.newPopulatedExtensionRegistry();
      		extensionRegistry.createExtension(javax.wsdl.Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
      Shannon Kendrick

      Comment


      • #4
        Ah, sorry, my bad. In that case, you instruct WebSphere to load the libraries in WEB-INF/lib first? I believe the setting is called "parent-last", see http://publib.boulder.ibm.com/infoce...ad_viewer.html

        Comment


        • #5
          I'm still getting the error even after running with PARENT_LAST and including wsdl4j-1.6.1.jar in the WEB-INF/lib directory.

          If you can help me understand what this code is doing, perhaps I can do a little more detailed troubleshooting.

          Shannon Kendrick

          Comment


          • #6
            Problem fixed! I set the PARENT_LAST on the WAR and not the EAR.

            Shannon Kendrick

            Comment


            • #7
              I have the very same problem. Always getting
              WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.:

              I set PARENT_LAST and have wsdl4j-1.6.1.jar in my WEB-INF/lib directory. This is on RAD7 with Websphere 6.1 runtime.

              Any ideas?

              Comment


              • #8
                Found the cause of the problem. The deployment.xml file in my EAR was corrupt. The PARENT_LAST setting was never taken into account.

                Comment

                Working...
                X