Results 1 to 8 of 8

Thread: Spring Integration GUI

  1. #1
    Join Date
    Aug 2009
    Location
    Paris, France
    Posts
    32

    Unhappy Spring Integration GUI

    Hi all,

    I am currently developing a Swing IHM for Spring Integration, in order to draw automatically any Spring Integration architecture from XML parsing against XSD definitions (and in a second phase to build architectures graphically).

    I am facing problems generating Java code from Spring Integration XSD files with Xerces. Here is errors with spring-integration-1.0.xsd :

    [ERROR] src-resolve: Cannot resolve the name 'beans:identifiedType' to a(n) 'type definition' component.
    [VIEWER.TASK.xjc] line 520 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'innerEndpointDefinitionAware' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1438 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_delayer' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 578 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_bridge' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 646 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_chain' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 677 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_header-enricher' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 864 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_object-to-string-transformer' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 980 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_payload-serializing-transformer' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1001 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_payload-deserializing-transformer' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1022 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_header-value-router' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1061 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_recipient-list-router' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1090 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_payload-type-router' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1114 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] [ERROR] cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type '#AnonType_router' is element only, but its base type is not.
    [VIEWER.TASK.xjc] line 1137 of spring-integration-1.0.xsd
    [VIEWER.TASK.xjc] failure in the XJC task. Use the Ant -verbose switch for more details

    Thanks for any help !

  2. #2
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    Cool! Is it open source? If so, can you provide a link to the sources?

  3. #3
    Join Date
    Aug 2009
    Location
    Paris, France
    Posts
    32

    Default Well...

    I am glad you are so enthusiastic with this project, but i have just began 2 days ago, so there's quite nothing in terms of sources !
    One day it may be open source yes, but better i start to develop it before
    Sure i'll share my work as soon as it works a bit.

  4. #4
    Join Date
    Aug 2009
    Location
    Paris, France
    Posts
    32

    Default

    Well, i needed to add an import of spring-beans-2.5.xsd in my spring-integration-1.0.xsd file, but there's still a bug, parsing spring-beans-2.5.xsd now. And i do not even understand what the bug is:

    [VIEWER.TASK.xjc] [WARNING] warning: <anyAttribute> ignored
    [VIEWER.TASK.xjc] line 151 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [WARNING] warning: <anyAttribute> ignored
    [VIEWER.TASK.xjc] line 505 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A class/interface with the same name "com.mycompany.viewer.schema.bind.beans.PropsT ype" is already in use. Use a class customization to resolve this conflict.
    [VIEWER.TASK.xjc] line 1141 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another "PropsType" is generated from here.
    [VIEWER.TASK.xjc] line 971 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A class/interface with the same name "com.mycompany.viewer.schema.bind.beans.MapTyp e" is already in use. Use a class customization to resolve this conflict.
    [VIEWER.TASK.xjc] line 1080 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another "MapType" is generated from here.
    [VIEWER.TASK.xjc] line 940 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A property with the same name "Key" is generated from more than one schema component. use a property customization to resolve this name collision.
    [VIEWER.TASK.xjc] line 1107 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
    [VIEWER.TASK.xjc] line 1104 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class".
    [VIEWER.TASK.xjc] line 243 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A property with the same name "Ref" is generated from more than one schema component. use a property customization to resolve this name collision.
    [VIEWER.TASK.xjc] line 1040 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
    [VIEWER.TASK.xjc] line 1022 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A property with the same name "Value" is generated from more than one schema component. use a property customization to resolve this name collision.
    [VIEWER.TASK.xjc] line 1047 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
    [VIEWER.TASK.xjc] line 1024 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A property with the same name "Ref" is generated from more than one schema component. use a property customization to resolve this name collision.
    [VIEWER.TASK.xjc] line 604 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
    [VIEWER.TASK.xjc] line 575 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] A property with the same name "Value" is generated from more than one schema component. use a property customization to resolve this name collision.
    [VIEWER.TASK.xjc] line 611 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
    [VIEWER.TASK.xjc] line 577 of spring-beans-2.5.xsd
    [VIEWER.TASK.xjc] failure in the XJC task. Use the Ant -verbose switch for more details


    Could you help please ?

  5. #5
    Join Date
    Aug 2009
    Location
    Paris, France
    Posts
    32

    Red face XML Binding

    Using an XML binding, i succeeded in generating all objects defined in spring-beans-2.5.xsd.

    The problem is that i had then to fix bugs (generated by binding class or property names on new ones). Now it compiles.

    The problem is that i am not sure i'll be brave enough to make the same for every spring-integration XSD file, creating a binding file, and then fixinf the java code generated.

    If the XSD files change, i'll have to make it again.

    Thanks a lot for your work at spring integration, i love it. It would have been great to make strict W3C XSD, in order to use standard JAXB tools, but anyway, i'll wait for the day it becomes W3C strictly compliant. (or JAXB compliant )

    Could anyone please confirm the spring XSD files cannot be used to generate Java code with JAXB ? anyone has tried like me ?

    thanks you very much

  6. #6
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    If you have specific recommendations on changing the xsd to make it more toolable, we're very interested. Obviously it's the goal to keep the schema as stable as possible, so you shouldn't worry too much about rigorous changes.

    I don't know of anyone trying to generate bindings from the schema, but there might be others.

  7. #7
    Join Date
    Aug 2009
    Location
    Paris, France
    Posts
    32

    Default Thanks

    Well yes, i have a simple recommendation to make.
    Here is the binding file i used in order to make spring-beans-2.5.xsd toolable with JAXB:

    Code:
    <jxb:bindings version="1.0"
                   xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
                   xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <jxb:bindings schemaLocation="./xsd/spring-beans-2.5.xsd" node="/xs:schema">
            
            
            <jxb:bindings node="//xs:complexType[@name='propsType']">
            <jxb:class name="newpropsType" implClass= "newpropsTypeImplClass">
            </jxb:class>
            </jxb:bindings>
            
            <jxb:bindings node="//xs:complexType[@name='mapType']">
            <jxb:class name="newMapType" implClass= "newMapTypeImplClass">
            </jxb:class>
            </jxb:bindings>
            
            <jxb:bindings node="//xs:element[@name='constructor-arg']/xs:complexType/xs:attribute[@name='ref']">
            <jxb:property name = "newRef">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:element[@name='constructor-arg']/xs:complexType/xs:attribute[@name='value']">
            <jxb:property name = "newValue">
    		</jxb:property>
    		</jxb:bindings>
            
            <jxb:bindings node="//xs:complexType[@name='entryType']/xs:attribute[@name='key']">
            <jxb:property name = "newKey">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:complexType[@name='propertyType']/xs:attribute[@name='ref']">
            <jxb:property name = "newRef2">
    		</jxb:property>
    		</jxb:bindings>
            
    		<jxb:bindings node="//xs:complexType[@name='propertyType']/xs:attribute[@name='value']">
            <jxb:property name = "newValue2">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:attributeGroup[@name='beanAttributes']/xs:attribute[@name='class']">
            <jxb:property name = "newClass">
    		</jxb:property>
    		</jxb:bindings>
    		
         <jxb:schemaBindings>
         <jxb:package name="com.sungard.viewer.schema.bind.beans"/>
         <jxb:nameXmlTransform>
         	<jxb:elementName suffix="Element"/>
         </jxb:nameXmlTransform>
         </jxb:schemaBindings>
            
    		
      </jxb:bindings> 
    </jxb:bindings>
    You can find inside all mappings i made (just to change similar names in conflict) to make it toolable. I think you just need to change those names in the original XSD, but i imagine i may not be easy for you as a lot of thing may depend on it...

    thank you anyway

  8. #8
    Join Date
    Mar 2010
    Posts
    17

    Default

    Quote Originally Posted by munger View Post
    Well yes, i have a simple recommendation to make.
    Here is the binding file i used in order to make spring-beans-2.5.xsd toolable with JAXB:

    Code:
    <jxb:bindings version="1.0"
                   xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
                   xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <jxb:bindings schemaLocation="./xsd/spring-beans-2.5.xsd" node="/xs:schema">
            
            
            <jxb:bindings node="//xs:complexType[@name='propsType']">
            <jxb:class name="newpropsType" implClass= "newpropsTypeImplClass">
            </jxb:class>
            </jxb:bindings>
            
            <jxb:bindings node="//xs:complexType[@name='mapType']">
            <jxb:class name="newMapType" implClass= "newMapTypeImplClass">
            </jxb:class>
            </jxb:bindings>
            
            <jxb:bindings node="//xs:element[@name='constructor-arg']/xs:complexType/xs:attribute[@name='ref']">
            <jxb:property name = "newRef">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:element[@name='constructor-arg']/xs:complexType/xs:attribute[@name='value']">
            <jxb:property name = "newValue">
    		</jxb:property>
    		</jxb:bindings>
            
            <jxb:bindings node="//xs:complexType[@name='entryType']/xs:attribute[@name='key']">
            <jxb:property name = "newKey">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:complexType[@name='propertyType']/xs:attribute[@name='ref']">
            <jxb:property name = "newRef2">
    		</jxb:property>
    		</jxb:bindings>
            
    		<jxb:bindings node="//xs:complexType[@name='propertyType']/xs:attribute[@name='value']">
            <jxb:property name = "newValue2">
    		</jxb:property>
    		</jxb:bindings>
    		
    		<jxb:bindings node="//xs:attributeGroup[@name='beanAttributes']/xs:attribute[@name='class']">
            <jxb:property name = "newClass">
    		</jxb:property>
    		</jxb:bindings>
    		
         <jxb:schemaBindings>
         <jxb:package name="com.sungard.viewer.schema.bind.beans"/>
         <jxb:nameXmlTransform>
         	<jxb:elementName suffix="Element"/>
         </jxb:nameXmlTransform>
         </jxb:schemaBindings>
            
    		
      </jxb:bindings> 
    </jxb:bindings>
    You can find inside all mappings i made (just to change similar names in conflict) to make it toolable. I think you just need to change those names in the original XSD, but i imagine i may not be easy for you as a lot of thing may depend on it...

    thank you anyway
    Hi
    It does seem that you are developing a UI for creating Spring Integration condigurations . I am actually looking for something similar. Can you provide me some help. My initial thought was to a do a jaxb mapping to create Java objects from Spring integration xsd. Another is to have a Database representation for the same to allow a UI to be developed over it and generate configurations..

    Thanks
    Shashank

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •