Announcement Announcement Module
Collapse
No announcement yet.
SWS-1.50 missing namespaces when importing xsd Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWS-1.50 missing namespaces when importing xsd

    Hello,

    I was trying to let spring dynamically generate the wsdl for me. In the generated wsdl I noticed that only a targetnamespace was present. The other namespaces declared in my xsd file aren't present. Any idea what I'm doing wrong?

    My configuration is as follows
    Code:
     <bean id="phd" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> 
        <property name="schema" ref="schema"/>  
        <property name="portTypeName" value="doctoraat"/>  
        <property name="locationUri" value="/services"/>  
        <property name="targetNamespace" value="http://webservice.doctoraat.doza.ugent.be"/> 
      </bean>  
      <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema"> 
        <property name="xsd" value="/phdInfo.xsd"/> 
      </bean>
    Thank you
    Jan

  • #2
    Hello,

    When I look at the code for the InliningXsdSchemaTypesProvider class I seems to me that only the targetnamespace is being considered. Am I correct? I have been looking at the following piece of code:

    Code:
     public void addTypes(Definition definition) throws WSDLException {
            Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
            Types types = definition.createTypes();
            XsdSchema[] schemas = schemaCollection.getXsdSchemas();
            for (int i = 0; i < schemas.length; i++) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Inling " + schemas[i]);
                }
                if (schemas.length == 1) {
                    definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
                }
                else {
                    String prefix = SCHEMA_PREFIX + i;
                    definition.addNamespace(prefix, schemas[i].getTargetNamespace());
                }
                Element schemaElement = getSchemaElement(schemas[i]);
                Schema schema = (Schema) definition.getExtensionRegistry()
                        .createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
                types.addExtensibilityElement(schema);
                schema.setElement(schemaElement);
            }
            definition.setTypes(types);
        }

    Comment


    • #3
      Humm ok, drop my remarks. I just noticed that firefox wasn't showing me all namespaces. I took a look at the source code of the wsdl and everything was fine.

      Comment

      Working...
      X