Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 1.1.1
-
Fix Version/s: None
-
Component/s: Aegis Module
-
Labels:None
-
Environment:winNT, oc4j, jdk1.4.2_06
-
Number of attachments :
Description
I have problem with aegis mapping. I have class ValueListInfo with this mapping:
<mappings xmlns:np="urn:ValueListInfo:type">
<mapping name="np:ValueListInfo">
<property name="focusedRowNumberInTable" mappedName="FocusedRowNumberInTable"/>
<property name="focusStatus" ignore="true"/><!-- neumi to byte, -->
<property name="totalNumberOfEntries" mappedName="TotalNumberOfEntries"/>
<property name="pagingEnabled" mappedName="PagingEnabled"/>
<property name="doFocusAgain" ignore="true"/>
<property name="focusEnabled" ignore="true"/>
<property name="sortingDirection" ignore="true"/>
<property name="sortingColumn" ignore="true"/>
<property name="totalNumberOfPages" ignore="true"/>
<property name="filters" keyType="java.lang.String" componentType="java.lang.String" mappedName="Filters"/>
</mapping>
</mappings>
and then I have class
public interface IDistributorService {
DistributorValueList getList(ValueListInfo info);
}
used as web service:
<bean id="distributorService" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory"/>
</property>
<property name="xfire">
<ref bean="xfire"/>
</property>
<property name="serviceBean">
<ref bean="distributorServiceBean"/>
</property>
<property name="serviceClass">
<value>com.deltax.chmu.distributors.ws.IDistributorService</value>
</property>
<property name="properties">
<map>
<entry key="mtom-enabled" value="true"/>
</map>
</property>
</bean>
Problem is that xfire badly generates wsdl and does not set values to class ValueListInfo, because it mixes(or interchanges) namespaces "http://ws.attachments.chmu.deltax.com" and "http://ws.distributors.chmu.deltax.com".
This problem depends on order definition on xfire-servlet.xml. When I change order to:
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/AttachmentService">
<ref bean="attachmentService"/>
</entry>
<entry key="/DistributorService">
<ref bean="distributorService"/>
</entry>
</map>
</property>
</bean>
then DistributorService works correctly.
I debugged xfire and I think that problem might be connected with sharing registry in class AegisBindingProvider, because distributorService was initialized correctly, but during
inicialization of AttachmentService method CustomTypeMapping.setTypeCreator used creator from DefaultTypeMappingRegistry and after that it changed namespaceUrl to "http://ws.attachments.chmu.deltax.com". And because
it used the same instance of mapping for both services, namespaceUrl was changed on both services.
There is printstackTrace where problem was arised, I thing.
CustomTypeMapping.setTypeCreator(TypeCreator) line: 158
DefaultTypeMappingRegistry.createTypeMapping(TypeMapping, boolean) line: 195
DefaultTypeMappingRegistry.createTypeMapping(String, boolean) line: 187
AegisBindingProvider.createTypeMapping(Service) line: 192
AegisBindingProvider.getTypeMapping(Service) line: 174
AegisBindingProvider.getSuggestedName(Service, OperationInfo, int) line: 116
DefaultServiceConfiguration.getInParameterName(Service, OperationInfo, Method, int, boolean) line: 160
ObjectServiceFactory.getInParameterName(Service, OperationInfo, Method, int, boolean) line: 943
ObjectServiceFactory.addOperation(Service, Method, String) line: 701
ObjectServiceFactory.initializeOperations(Service, String) line: 645
ObjectServiceFactory.create(Class, String, String, Map) line: 350
XFireExporter(ServiceBean).afterPropertiesSet() line: 158
XFireExporter.afterPropertiesSet() line: 27
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).invokeInitMethods(String, Object, RootBeanDefinition) line: 1059
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 363
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line: 226
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 147
BeanDefinitionValueResolver.resolveReference(String, RuntimeBeanReference) line: 176
BeanDefinitionValueResolver.resolveValueIfNecessary(String, Object) line: 105
BeanDefinitionValueResolver.resolveManagedMap(String, Map) line: 225
BeanDefinitionValueResolver.resolveValueIfNecessary(String, Object) line: 117
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).applyPropertyValues(String, RootBeanDefinition, BeanWrapper, PropertyValues) line: 1013
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).populateBean(String, RootBeanDefinition, BeanWrapper) line: 824
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 345
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line: 226
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 147
DefaultListableBeanFactory.preInstantiateSingletons() line: 275
XmlWebApplicationContext(AbstractApplicationContext).refresh() line: 320
XmlWebApplicationContext(AbstractRefreshableWebApplicationContext).refresh() line: 134
DispatcherServlet(FrameworkServlet).createWebApplicationContext(WebApplicationContext) line: 305
DispatcherServlet(FrameworkServlet).initWebApplicationContext() line: 250
DispatcherServlet(FrameworkServlet).initServletBean() line: 219
DispatcherServlet(HttpServletBean).init() line: 112
DispatcherServlet(GenericServlet).init(ServletConfig) line: 258
HttpApplication.loadServlet(ByteString) line: 2354
HttpApplication.findServlet(ByteString) line: 4795
HttpApplication.getRequestDispatcher(ByteString, EvermindHttpServletRequest, EvermindHttpServletResponse) line: 2821
HttpRequestHandler.processRequest(Applicatio
nServerThread, EvermindHttpServletRequest, EvermindHttpServletResponse, InputStream, OutputStream, boolean) line: 680
HttpRequestHandler.run(Thread) line: 285
HttpRequestHandler.run() line: 126
ReleasableResourcePooledExecutor$MyWorker.run() line: 186
ApplicationServerThread(Thread).run() line: 534
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | DistributorService.wsdl [ 21327 ] |
| Attachment | web.zip [ 21328 ] |
| Attachment | tm_tc_conflict.png [ 22844 ] |
| Attachment | xfire-1.2.1_tm_tc_mismatch.diff [ 22845 ] |