1 Reply Latest reply on Aug 29, 2009 11:51 AM by Peter Johnson

    regarding message types in bottom-up service generation

    yanbo wu Newbie

      I am learning web service using jboss 5 and jbossws as runtime. I have created a POJO which is quoted below:

      public class HelloWorld {
       public String sayHello(@WebParam(name="name") String name) {
       return "Hello, " + name;

      The problem is when i deployed the service into jboss, at runtime, the wsdl file generated contains complex type definitions for the parameter and return value. I expected xsd:string as message type, but it wasn't so. Can anybody be kind to tell me why this happens and how to avoid it? Thanks

      Here is the wsdl file generated:
      - <definitions name="HelloWorldService" targetNamespace="http://ws.wuyb.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.wuyb.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      - <types>
      - <xs:schema targetNamespace="http://ws.wuyb.com/" version="1.0" xmlns:tns="http://ws.wuyb.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xs:element name="sayHello" type="tns:sayHello" />
       <xs:element name="sayHelloResponse" type="tns:sayHelloResponse" />
      - <xs:complexType name="sayHello">
      - <xs:sequence>
       <xs:element minOccurs="0" name="name" type="xs:string" />
      - <xs:complexType name="sayHelloResponse">
      - <xs:sequence>
       <xs:element minOccurs="0" name="return" type="xs:string" />
      - <message name="HelloWorld_sayHelloResponse">
       <part element="tns:sayHelloResponse" name="sayHelloResponse" />
      - <message name="HelloWorld_sayHello">
       <part element="tns:sayHello" name="sayHello" />
      - <portType name="HelloWorld">
      - <operation name="sayHello" parameterOrder="sayHello">
       <input message="tns:HelloWorld_sayHello" />
       <output message="tns:HelloWorld_sayHelloResponse" />
      - <binding name="HelloWorldBinding" type="tns:HelloWorld">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
      - <operation name="sayHello">
       <soap:operation soapAction="" />
      - <input>
       <soap:body use="literal" />
      - <output>
       <soap:body use="literal" />
      - <service name="HelloWorldService">
      - <port binding="tns:HelloWorldBinding" name="HelloWorldPort">
       <soap:address location="" />