Hi, I made the changes suggested by you. Now the interface that i had is as below:
import javax.jws.WebMethod; import javax.jws.WebService; @WebService(name = "FetchService", targetNamespace = "http://blwb.dnb.com/getGlobalService") public interface FetchService { @WebMethod public String getFile(String name); } and the pojo class is as below: import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; @javax.jws.soap.SOAPBinding(style=javax.jws.soap.SOAPBinding.Style.RPC, use=javax.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle=javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) public class FetchServiceImpl implements FetchService { @WebMethod public String getFile(String name) { //some code here return downloadFilepath; } } My xbean looks like this: <jsr181:endpoint service="blwb:FTPInput" endpoint="soap" pojoClass="com.dnb.blwb.bltwb.FetchServiceImpl" serviceInterface="com.dnb.blwb.bltwb.FetchService" style="rpc" annotations="java5"/> But i am getting a class cast exception during deployment: <component-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>FAILED</task-result> <message-type>ERROR</message-type> <task-status-msg> <msg-loc-info> <loc-token/> <loc-message>java.lang.ClassCastException: $Proxy53</loc-message> </msg-loc-info> </task-status-msg> <exception-info> <nesting-level>1</nesting-level> <msg-loc-info> <loc-token/> <loc-message>$Proxy53</loc-message> <stack-trace><![CDATA[java.lang.ClassCastException: $Proxy53 at sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:223) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:213) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998) at java.lang.Class.getAnnotation(Class.java:2958) at java.lang.Class.isAnnotationPresent(Class.java:2970) at org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations.hasWebServiceAnnotation(Jsr181WebAnnotations.jav at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:168) at org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181Endpoint.java:301) at org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java:216) at org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58) at org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55) at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:92) at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88) at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69) at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:527) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:334) at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:645) at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62) at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:608) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) ]]></stack-trace> Please help me solving this error. Thanks, Sireesh. Adrian Co wrote: > > Hi, > > Are you using code first development? > > I'm not really sure, but can you try specifying the style in the > annotation of the pojo? > > e.g. > > @javax.jws.soap.SOAPBinding( > style=javax.jws.soap.SOAPBinding.Style.RPC, > use=javax.jws.soap.SOAPBinding.Use.LITERAL, > parameterStyle=javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) > > > Hope it helps. > > > > Sireesh wrote: >> Hi >> The style attribute of jsr181 in service mix is defaulting to >> document type. When i set the attribute style = "rpc" the wsdl generated >> is >> still having soap binding style as "document". >> >> The xbean written looks like : >> >> <jsr181:endpoint >> service="blwb:FTPInput" >> endpoint="soap" >> pojoClass="com.dnb.blwb.bltwb.FetchServiceImpl" >> serviceInterface="com.dnb.blwb.bltwb.FetchService" >> style="rpc" /> >> >> where i mentioned the style as rpc but the wsdl generated shows the >> following : >> >> <wsdl:binding name="endpointBinding" type="tns:FTPInputPortType"> >> <wsdlsoap:binding style="document" >> transport="http://schemas.xmlsoap.org/soap/http"/> >> <wsdl:operation name="getFile"> >> <wsdlsoap:operation soapAction=""/> >> <wsdl:input name="getFileRequest"> >> <wsdlsoap:body use="literal"/> >> </wsdl:input> >> <wsdl:output name="getFileResponse"> >> <wsdlsoap:body use="literal"/> >> </wsdl:output> >> </wsdl:operation> >> </wsdl:binding> >> >> >> where the soap binding style is still a document type. >> >> We need have an rpc binding style as our service should be invoked by >> jBPM >> which invokes only rpc types. >> >> Can anyone help me on having by service of rpc type. >> >> >> >> Thanks, >> Sireesh. >> > > > -- View this message in context: http://www.nabble.com/jsr181-style-attribute-defaulting-to-document-type-tf4096617s12049.html#a11662618 Sent from the ServiceMix - User mailing list archive at Nabble.com.
