I am doing a "java-first" approach in exposing a service (i am using
jaws:endpoint) . 
I have a java class with a method that accepts a custom java class as a
parameter. After i deploy this code (i am using jax-ws/XMLbeans data
binding, cxf 2.2.8), I don't see any type attribute for the input parameter 

The method is:
@WebMethod(operationName= "sayHi2")
public String sayHi2(
@WebParam(name = "addressInfo",
                targetNamespace = "java:com.ntta.integration.dto")
                Address inputXML
) {
        System.out.println("getPerson called :");
        return "Snundar";
}

where "Address"  is a java class (in a package com.ntta.integration.dto) 

and the wsdl generated says: 

<xsd:element name="sayHi2" type="tns:sayHi2"></xsd:element>
   <xsd:complexType name="sayHi2">
      <xsd:sequence>
         <xsd:element form="qualified" minOccurs="0"
name="addressInfo"></xsd:element>
      </xsd:sequence>
   </xsd:complexType>
   <xsd:element name="sayHi2Response"
type="tns:sayHi2Response"></xsd:element>
   <xsd:complexType name="sayHi2Response">
      <xsd:sequence>
         <xsd:element minOccurs="0" name="return"
type="xsd:string"></xsd:element>
      </xsd:sequence>
   </xsd:complexType>

It does not generate the "type" attribute for the "addressInfo" element nor
is there any import for the namespace "com.ntta.integration.dto" . How do i
expose the java class as a Complex DataType ? I tried to put @XmlType() in
the java bean (Address.java), but this did not make any difference.

Thanks
Sundar Ramamurthy
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/need-to-expose-a-custom-java-class-as-a-datatype-in-the-wsdl-tp3278926p3278926.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to