would you mind pasting your org.winston.ws.impl.WinstonWebServiceImpl class here?  i am trying to do a similar thing and cannot even get teh @WebService to work :-s 

On 3/23/06, William White <[EMAIL PROTECTED]> wrote:
Hi All,

Does anyone know how to make the DispatcherServlet+JSR181HandlerMapping
combination respect both the service annotations (@WebService,
@WebMethod) and the binding annotations (@XmlType, @XmlElement)?  Right
now I'm only getting the service annotations to work.  Read on for a
little bit more detail:

I'm new to XFire and I'm trying to use the JSR181 annotations to create
my WSDL for my web service.  When I use the XFireConfigurableServlet in
conjunction with the services.xml file containing a service definition
using the JAXWSServiceFactory, then my WSDL file correctly reflects the
service annotations in my service class as well as the binding
annotations in my java classes that are serialized to XML and used by my
service.

Now I want to switch over to use the DispatcherServlet (or maybe I
should use the XFireSpringServlet - not sure how they differ).  I've
created the following files:

<web-app>

      <!--
      <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>
              classpath:org/codehaus/xfire/spring/xfire.xml

classpath:org/winston/dao/hibernate/applicationContext- hibernate.xml
          </param-value>
      </context-param>
      <context-param>
          <param-name>log4jConfigLocation</param-name>
          <param-value>/WEB-INF/log4j.properties</param-value>
      </context-param>
      <listener>


<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
      </listener>
      <listener>


<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <servlet>
          <servlet-name>xfire</servlet-name>


<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      </servlet>
      <servlet-mapping>
          <servlet-name>xfire</servlet-name>
          <url-pattern>/servlet/XFireServlet/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
          <servlet-name>xfire</servlet-name>
          <url-pattern>/*</url-pattern>
      </servlet-mapping>
      <mime-mapping>
          <extension>wsdl</extension>
          <mime-type>text/xml</mime-type>
      </mime-mapping>
      <mime-mapping>
          <extension>xsd</extension>
          <mime-type>text/xml</mime-type>
      </mime-mapping>
      -->
</web-app>


<beans>

      <import resource="classpath:org/codehaus/xfire/spring/xfire.xml"
/>

      <bean id="webAnnotations"
class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations" />

      <bean id="handlerMapping"
class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping ">
          <property name="typeMappingRegistry">
              <ref bean="xfire.typeMappingRegistry" />
          </property>
          <property name="xfire">
              <ref bean="xfire" />
          </property>
          <property name="webAnnotations">
              <ref bean="webAnnotations" />
          </property>
      </bean>

      <bean id="annotatedWinstonWebServiceImpl"
class="org.winston.ws.impl.WinstonWebServiceImpl" />

      <bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ">
          <property name="urlMap">
              <map>
                  <entry key="/">
                      <ref bean="handlerMapping" />
                  </entry>
              </map>
          </property>
      </bean>


With these files, everything works correctly EXCEPT that the @XmlType
binding annotations are being ignored.  The @WebServices tags appear in
the WSDL just fine so they appear to be working, but when I switch from
the XFireConfiguableServlet to the DispatcherServlet, the @XmlType and
@XmlElement binding tags are not getting used.  Does anyone know how to
make the DispatcherServlet respect these bindings?

Any help is appreciated.

thanks

Bill
[EMAIL PROTECTED]


Reply via email to