[jboss-user] [JBossWS] - A class as a parameter in a webservice

nax32 do-not-reply at jboss.com
Thu Jul 20 05:03:31 EDT 2006


Hi! i have this bean that is a webservice:

// standard JSR181 annotations
  | @WebService(name = "EndpointInterface", targetNamespace = "http://org.jboss.ws/samples/jsr181ejb", serviceName = "EJB3Service")
  | // @SOAPBinding(style = SOAPBinding.Style.RPC)
  | 
  | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
  | 			use = SOAPBinding.Use.LITERAL ,
  | 			parameterStyle=SOAPBinding.ParameterStyle.BARE)
  | 
  | 
  | // standard EJB3 annotations
  | @Remote(EJB3RemoteInterface.class)
  | // @RolesAllowed("friend")
  | @Stateless
  | 
  | // jboss propriatary annotations
  | @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
  | @PortComponent(authMethod="BASIC", transportGuarantee="NONE")
  | @SecurityDomain("JBossWS")
  | public class EJB3Bean01 implements EJB3RemoteInterface
  | {
  |     
  | 	@WebMethod
  |     public String echo(@WebParam( name="elLibro" )libro input)
  |    {
  |       return "Lo que recibí es " + input;
  |    }
  | }

As you can see, the parameter is not a standard type. i have the class "libro" like this:

public class libro {
  | 	
  |     String Nombre;
  |     String Autor;
  |     int edicion;
  |     String[] compradores;
  | 	
  | 	public libro () {
  | 		}
  | }
 
i want to generate the wsdl file, but when i do it, the class "libro" is not specified:

<complexType name="libro">
  | <sequence/>
  | </complexType>

what sould i do to obtain something like this?

<complexType name="libro">
  |                         <sequence>
  |                              <s:element name="Nombre" type="s:string"/>
  |                             <s:element name="Autor" type="s:string"/>
  |                             ...
  |                          </sequence>
  | </complexType>

THANKS!!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959482#3959482

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959482




More information about the jboss-user mailing list