xml for the springbean (figure 1)
==============================================================================================
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="springtest"
class="org.wso2.carbon.test.simplebean.SpringCustomBean" singleton="false">
<property name="userName"><value>"esb user"</value></property>
<property name="email"><value>"[email protected]"</value></property>
</bean>
</beans>
==============================================================================================
When this config provided as a registry(config/gov) key value* it works fine
*.
Then it was created from UI.
there is no way to provide it to synapse configuration
from UI.
so when it is given from source view (as in figure 2)
figure 2
====================================================================
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="
http://ws.apache.org/ns/synapse">
<registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
<parameter name="cachableDuration">15000</parameter>
</registry>
<localEntry key="testBean">
<beans default-lazy-init="false" default-autowire="no"
default-dependency-check="none">
<bean id="springtest"
class="org.wso2.carbon.test.simplebean.SpringCustomBean" singleton="false"
lazy-init="default" autowire="default" dependency-check="default">
<property name="userName">
<value>"esb user"</value>
</property>
<property name="email">
<value>"[email protected]"</value>
</property>
</bean>
</beans>
<description/>
</localEntry>
<sequence name="fault">
<log level="full">
<property name="MESSAGE" value="Executing default
"fault" sequence"/>
<property name="ERROR_CODE"
expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE"
expression="get-property('ERROR_MESSAGE')"/>
</log>
<drop/>
</sequence>
<sequence name="main">
<in>
<spring:spring xmlns:spring="http://ws.apache.org/ns/synapse"
bean="springtest" key="testBean"/>
<send/>
</in>
<out>
<log level="full"/>
<send/>
</out>
</sequence>
</definitions>
====================================================================
it throws * following error *
ERROR - ConfigAdmin Error while updating the Synapse configuration
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://ws.apache.org/ns/synapse]
Offending resource: resource loaded through InputStream
if it is added to the source view as
(figure 3)
=====================================================================
<localEntry key="testBean">
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="springtest"
class="org.wso2.carbon.test.simplebean.SpringCustomBean" singleton="false">
<property name="userName"><value>"esb
user"</value></property>
<property name="email"><value>"[email protected]
"</value></property>
</bean>
</beans>
</localEntry>
=====================================================================
it is omitted when updating. and throws "Error while updating the mediation
configuration." no logged errors
reference used:
http://charithwiki.blogspot.com/2009/01/apache-synapse-spring-mediator-feel.html
--
Rajith Siriwardana
Intern, WSO2 Inc.,
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev