Announcement Announcement Module
Collapse
No announcement yet.
Type mapping does not support the specified encoding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Type mapping does not support the specified encoding

    Hi springers.
    I have the following question.
    I created class, which extends spring's JaxRpcPortProxyFactoryBean to let SOAP know how to serialize and deserialize MyRequest and MyResponse objects. Here it is the part of that class:

    Code:
    /**
    	 * Overriden method of JaxRpcPortProxyFactoryBean class.
    	 */
    	 protected void postProcessJaxRpcService( javax.xml.rpc.Service service ) {
    		 TypeMappingRegistry registry = service.getTypeMappingRegistry();
    	     TypeMapping mapping = registry.createTypeMapping();
    	     registerBeanMapping(mapping, FXResponse.class, "MyResponse");
    	     registerBeanMapping(mapping, MyRequest.class, "FXRequest");
    	     registry.register("http://schemas.xmlsoap.org/soap/encoding/", mapping);
    	 }
    	 
    	 /**
    	 * Register all type mappings set by
    	 */
    	 protected void registerBeanMapping(TypeMapping mapping, Class type, String name) {
    		 QName qName = new QName("http://aaa.bbb.ccc.ddd.eee", name);
    	     mapping.register(type, qName, new BeanSerializerFactory(type, qName), new BeanDeserializerFactory(type, qName));
    	 }
    then hereit is the part of the spring contect file

    Code:
    <bean id="xxxWebService" class="com.xxx.spring.ExpressJaxRpcPortProxyFactoryBean">
    		<property name="wsdlDocumentUrl" value="http://1.1.1.1:38080/xxx/services/XXXService?wsdl" />
    		
    		<property name="namespaceUri" value="http://blah.blah.blah/XXX"/>
    		
    		<property name="serviceName" value="XXXService"/>
    		
    		<property name="portName"  value="XXXPort"/>
    		
    		<property name="serviceInterface" value="aaa.bbb.ccc.services.channel.GenericWebServiceInterface"/>
    		
    		<property name="timeout" value="160000"/>
    	</bean>
    The actual webservice was created in 2006 and we were able to use it with the spring's JaxRpc feature before.
    Now we moved from JDK 1.4 to 1.5 and when application starts we got the following exception
    Code:
    root cause 
    
    type mapping does not support the specified encoding: http://schemas.xmlsoap.org/soap/encoding/
    	com.sun.xml.rpc.encoding.TypeMappingRegistryImpl.register(TypeMappingRegistryImpl.java:46)
    	com.xxx.spring.ExpressJaxRpcPortProxyFactoryBean.postProcessJaxRpcService(ExpressJaxRpcPortProxyFactoryBean.java:40)
    	org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createJaxRpcService(LocalJaxRpcServiceFactory.java:234)
    	org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare(JaxRpcPortClientInterceptor.java:386)
    	org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet(JaxRpcPortClientInterceptor.java:352)
    	org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet(JaxRpcPortProxyFactoryBean.java:72)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
    	org.springframework.beans.factory.access.SingletonBeanFactoryLocator.initializeDefinition(SingletonBeanFactoryLocator.java:500)
    	org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:382)
    	com.xxx.express.context.ExpressSpringContextDirector.getServiceFactory(ExpressSpringContextDirector.java:50)
    	com.xxx.express.core.ExpressCoreContext.getService(ExpressCoreContext.java:41)
    	com.yyy.resources.SessionResourceKit.createVoidState(SessionResourceKit.java:182)
    	com.yyy.resources.SessionResourceKit.<init>(SessionResourceKit.java:54)
    	com.yyy.resources.SessionResourceKit.<init>(SessionResourceKit.java:87)
    	com.yyy.resources.PropertiesCache.init(PropertiesCache.java:49)
    	com.yyy.resources.PropertiesCache.<init>(PropertiesCache.java:42)
    	com.yyy.resources.PropertiesCache.<clinit>(PropertiesCache.java:25)
    	mosApp.MosSystem.MosSystemServlet.init(MosSystemServlet.java:72)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	java.lang.Thread.run(Thread.java:595)
    Could migration to java 1.5 be the reason, and if so, does anybody know how to solve it?

    Thanks in advance.
Working...
X