Dan - 

This is the Address class
#------------ Start Address.java-------------
package com.ntta.integration.dto;
public class Address {
        public String address1;
        public String address2;
        public String address3;
        public String city;
        public String postalCode;
        public String state;
        public String county; 
        public Integer countryCode; 
        
}
#---End --Address.java

But I am using XMLBeans for the data binding and not JAXB. As you can
see, I don't have a  no-arg constructor.

The exception I see in my server log is: 
[#|2010-11-24T12:11:27.413-0600|SEVERE|sun-appserver2.1|org.apache.cxf.x
mlbeans.XmlBeansSchemaInitializer|_ThreadID=15;_ThreadName=Thread-236;_R
equestID=b2b69faf-6bb5-4a64-a8c0-dd2927448686;|com.ntta.integration.dto.
Address was not found in class map|#


Thanks
Sundar Ramamurthy

-----Original Message-----
From: Daniel Kulp [mailto:[email protected]] 
Sent: Monday, November 29, 2010 10:51 AM
To: [email protected]
Cc: Sundar Ramamurthy
Subject: Re: need to expose a custom java class as a datatype in the
wsdl


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

****************************************************************
This email message is intended for the use of the person to
whom it has been sent, and may contain information that is
confidential or legally protected. If you are not the intended
recipient or have received this message in error, you are not
authorized to copy, distribute, or otherwise use this message
or its attachments. Please notify the sender immediately by
return e-mail and permanently delete this message and any
attachments. NTT America makes no warranty that this email is
error or virus free. Thank you.
****************************************************************

Reply via email to