Announcement Announcement Module
No announcement yet.
Multiple operations in one WSDL Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple operations in one WSDL

    We are facing problems in having multiple operations in one WSDL. How do we do it in Spring. We are using JAXB2.0 as marshaller. I am giving the bean definitions which make it work:

    <bean id="mediaWebService" class=" sdl11Definition">
    <property name="builder">
    <bean class=" XsdBasedSoap11Wsdl4jDefinitionBuilder">
    <property name="schema" value="/WEB-INF/xsd/media.xsd"/>
    <property name="portTypeName" value="media"/>
    <property name="locationUri" value="http://localhost:8080/mediamodule/services"/>

    <bean id="mediaMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="classesToBeBound">
    <value> </value>
    <value> t</value>

    <bean id="mediaService" class=" Impl">
    <property name="mediaProductTypeDAO" ref="mediaProductTypeDAO"/>

    We are using annotations to define the operations like :
    @PayloadRoot(localPart="mediaRequest",namespace="h ttp://mediamodule/com/ge/nbcu/dotmedia/bo")
    public MediaResponse findMedia(MediaRequest mediaRequest)throws Exception{

    This works fine.

    Now the question is when we want to have another Operation, lets say saveMedia in the same mediaService class, it does not work. It gives runtime exception, though the wsdl shows two portTypeNames. We even tried creating different request and response objects for the two operations. Still it does not work. The only way it works (as done in another project) is have one class for one method. ie as many classes as there are methods each with its own request and response objects.

    Is there a shorter way ie can multiple portTypeNames be included in same wsdl? anybody has any idea it will be appreciated. Pls make your suggestion specific, by giving the suggested way to define the beans.

    Last edited by anirbankonar; May 8th, 2008, 03:39 PM.