Announcement Announcement Module
Collapse
No announcement yet.
factory-method annoyance Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • factory-method annoyance

    Hi,

    I'm using Spring to connect to an old CORBA server, and I want to use the ORB.init method (the static factory method for obtaining the ORB) from XML.
    The following XML snippet works fine:
    Code:
    		<bean id="theORB" class="org.omg.CORBA.ORB" factory-method="init">
    		<constructor-arg>
    			<list>
    				<!--value>this is junk</value-->
    			</list>
    		</constructor-arg>
    		<constructor-arg>
    			<props>
    				<prop key="org.omg.CORBA.ORBClass">etc</prop>
    				<prop key="org.omg.CORBA.ORBSingletonClass">etc</prop>
    			</props>
    		</constructor-arg>
    	</bean>
    	
    	<bean id="dealServerRef" class="CorbaClientFactory">
    		<property name="orb">
    			<ref bean="theORB"/>
    		</property>
    		<property name="targetClass">
    			<value>CorbalServer</value>
    		</property>
    		<property name="corbaName">
    			<value>CorbaServerName</value>
    		</property>
    	</bean>
    this works fine but, the xml line with the factrory-method is always tagged with this error:
    Attribute "factory-method" must be declared for element type "bean"
    which prevents the "bean graph" panel from coming up :cry:

    I've tried different DOCTYPE headers, all to no avail.

    --
    Lou Rayman

    lrayman ---at--- lehman ---dot--- com

  • #2
    From http://www.springframework.org/dtd/spring-beans.dtd:

    Code:
    <!ATTLIST bean factory-method CDATA #IMPLIED>
    Maybe your IDEs cache is out-of-date, the DTD does declare the attribute.

    Comment


    • #3
      i see - the copy of spring-core.dtd buried in the plugins directory is out of date. is there a safe way to upgrade it?

      Comment


      • #4
        Lou,

        if you are using XmlBuddy then please refer to Assaf's workaround described in thread http://forum.springframework.org/showthread.php?t=10957 .

        Cheers,
        Torsten
        Last edited by robyn; May 14th, 2006, 05:12 PM.

        Comment

        Working...
        X