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

  • Multiple operations in one WSDL

    Hello,
    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="org.springframework.ws.wsdl.wsdl11.DynamicW sdl11Definition">
    <property name="builder">
    <bean class="org.springframework.ws.wsdl.wsdl11.builder. 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>
    </property>
    </bean>

    <bean id="mediaMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="classesToBeBound">
    <list>
    <value>com.ge.nbcu.media.service.dto.MediaResponse </value>
    <value>com.ge.nbcu.media.service.dto.MediaReques t</value>
    </list>
    </property>
    </bean>

    <bean id="mediaService" class="com.ge.nbcu.media.service.core.MediaService Impl">
    <property name="mediaProductTypeDAO" ref="mediaProductTypeDAO"/>
    </bean>

    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.

    Thanks,
    Anirban
    Last edited by anirbankonar; May 8th, 2008, 03:39 PM.
Working...
X