What does the Address class look like?   Does it have a public no-arg 
constructor?   It sounds like JAXB wasn't able to map the class.

Dan


On Wednesday 24 November 2010 2:19:01 pm Sundar wrote:
> 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

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to