Announcement Announcement Module
Collapse
No announcement yet.
'portTypeName' of bean class [org.springframework.ws.wsdl.wsdl11.DynamicWsdl11De finit Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'portTypeName' of bean class [org.springframework.ws.wsdl.wsdl11.DynamicWsdl11De finit

    Hi,
    I am fairly new to spring ws. I am trying to expose simple hello service . i have couple of xsd's as well. can anyone suggest me am i missing anything in my xml. I am getting the following error

    My servlet xml is

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xmlns:jee="http://www.springframework.org/schema/jee"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/aop
           http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
           http://www.springframework.org/schema/tx
           http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
           http://www.springframework.org/schema/jee
           http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">
    
    
        <!-- ================================================================== -->
    
        <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
            <property name="mappings">
                <props>
                    <prop key="{http://soa.tk/helloservice}testHello">HelloServiceEndPoint</prop>
                </props>
            </property>
            <property name="interceptors">
                <list>
                    <ref bean="payloadLoggingInterceptor"/>
                </list>
            </property>
        </bean>
    
        <!-- ================================================================== -->
    
        <bean id="payloadLoggingInterceptor"
              class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
    
      <!-- <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"/>-->
    
        <!-- ================================================================== -->
    	<bean id="helloService" class="com.helloservice.impl.HelloServiceImpl"/>
    
    	<!--
    	      EndPoint Definition
    		-->
        <bean id="HelloServiceEndPoint" class="com.helloservice.ws.HelloServiceEndPoint">
    	    <constructor-arg ref="helloService"/>
        </bean>
    
      <!--
           Marshalling Mechanisms
      -->
    
      <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
            <constructor-arg ref="castorMarshaller"/>
        </bean>
    
    
    		<bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller" >			
    		</bean>
    
          <!-- ================================================================== -->
    
        <!--
           Definitions of beans that dynamically expose web service WSDL
        -->
    
        
    
       <bean id="HelloService" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
    	<!-- <property name="builder">-->
                <!--bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">-->
                    <property name="schemaCollection" ref="schemaCollection"/>
                    <property name="portTypeName" value="HelloPort"/>               
                    <property name="locationUri" value="http://127.0.0.1:8080/testhello-ws/services"/>
                    <property name="targetNamespace" value="http://soa.tk/helloservice"/>
               <!-- </bean>-->
           <!-- </property>-->
           
    		<!--<property name="schemaCollection">
    					<bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
    						<property name="xsds">
    						<list>
    							<value>classpath:xsd/helloservice.xsd</value>
    							<value>classpath:xsd/coreservice.xsd</value>
    						</list>
    						</property>
    						<property name="inline" value="true"/>
    					</bean>
    			</property>      
                    <property name="portTypeName" value="testHelloService"/>
                    <property name="locationUri" value="http://127.0.0.1:8080/TestHelloService"/>
                    <property name="targetNamespace" value="http://soa.tk/helloservice_1"/>-->
     
        </bean>
    
    <bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
    	<description>
    			This bean wrap the messages.xsd (which imports types.xsd), and inlines them as a one.
    	</description>
    	<property name="xsds">
    	<list>
    		<value>classpath:xsd/helloservice.xsd</value>
    		<value>classpath:xsd/coreservice.xsd</value>
    	</list>
    	</property>
    	<property name="inline" value="true"/>
    	</bean>
    </beans>
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HelloService' defined in ServletContext resource [/WEB-INF/testhello-ws-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'portTypeName' of bean class [org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition]: No property 'portTypeName' found
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:445)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
    	java.security.AccessController.doPrivileged(Native Method)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
    	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
    	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
    	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
    	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
    	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
    	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
    	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	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:873)
    	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(Unknown Source)
    
    root cause
Working...
X