Back Forum Reply New

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:

lt;bean id=quot;mediaWebServicequot; class=quot;org..ws.wsdl.wsdl11.DynamicW  sdl11Definitionquot;gt;
lt;property name=quot;builderquot;gt;
lt;bean class=quot;org..ws.wsdl.wsdl11.builder.  XsdBasedSoap11Wsdl4jDefinitionBuilderquot;gt;
lt;property name=quot;schemaquot; value=quot;/WEB-INF/xsd/media.xsdquot;/gt;
lt;property name=quot;portTypeNamequot; value=quot;mediaquot;/gt;
lt;property name=quot;locationUriquot; value=quot;mediamodule/servicesquot;/gt;
lt;/beangt;
lt;/propertygt;
lt;/beangt;

lt;bean id=quot;mediaMarshallerquot; class=quot;org..oxm.jaxb.Jaxb2Marshalle  rquot;gt;
lt;property name=quot;classesToBeBoundquot;gt;
lt;listgt;
lt;valuegt;com.ge.nbcu.media.service.dto.MediaResponse  lt;/valuegt;
lt;valuegt;com.ge.nbcu.media.service.dto.MediaReques  tlt;/valuegt;
lt;/listgt;
lt;/propertygt;
lt;/beangt;

lt;bean id=quot;mediaServicequot; class=quot;com.ge.nbcu.media.service.core.MediaService  Implquot;gt;
lt;property name=quot;mediaProductTypeDAOquot; ref=quot;mediaProductTypeDAOquot;/gt;   
lt;/beangt;

We are using annotations to define the operations like :
@PayloadRoot(localPart=quot;mediaRequestquot;,namespace=quot;h  ttp--mediamodule/com/ge/nbcu/dotmedia/boquot;)
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
¥
Back Forum Reply New