This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Method is annotated as BARE but it has more than one parameter bound to body.Please annotate WRAPPED  RSS feed

 
Patryk Molek
Greenhorn
Posts: 2
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a problem with Web Service annotations, namely I have a Web Service application with following interface defined :



And the service code :




For me the `downloadOperation` is important. From the wsdl that I have defined for that service I have created with `wsdl2java` some client code. I am trying to use it as follows




but I get the following exception :

Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: SEI gov.loc.zing.srw.interfaces.SRWPort has method downloadOperation annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)


I am really confused and I do not know how to resolve this issue. Any suggestions ?

When I change the annocation of `dowloadOperation` to `WRAPPED` then on deploy or tomcat start I get this :

May 25, 2014 1:54:26 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://www.loc.gov/zing/srw/srwabosi/}SRWABOSI from WSDL: wsdl/srw-abosi-service.wsdl
May 25, 2014 1:54:41 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean initializeClassInfo
WARNING: Could not unwrap Operation {http://www.loc.gov/zing/srw/interfaces/}DownloadOperation to match method "public abstract void gov.loc.zing.srw.interfaces.SRWPort.downloadOperation(java.la
ng.String,java.lang.String,org.w3._2000._09.xmldsig.KeyInfoType,javax.xml.ws.Holder,javax.xml.ws.Holder,javax.xml.ws.Holder)"
May 25, 2014 1:54:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 25, 2014 1:54:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/abosi] startup failed due to previous errors
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!