Hi Deena,

I don't see a clear workaround for you in this case unless you try and edit
the code generated class to suit your needs. Having the same complexType in
two different namespace is equivalent to having the same Java class in two
different packages. So it constitutes to two different objects.

Thanks,
Keith.

On Sun, May 25, 2008 at 8:44 AM, Deenadayalan J <[EMAIL PROTECTED]> wrote:

> Hi,
>
> The host has given 2 WSDLs. One to Select details of employee. The second
> WSDL is to create task details for an employee. The target namespace for
> schema in both WSDLs are different. Employee complex type is represented in
> the schema in both WSDLs
> I used WSDL2Java with XMLBeans to generate Java classes at client side.
> Becaue of different target namespaces, I have Employee Class that is
> present in two different packages.
>
> For eg. Consider the target namespace is "hhtp:/A" for WSDL A and "http:/B"
> for WSDL B
>
> If I use WSDL A to retrieve the details of an employee, they are stored in
> A.Employee class object.
>
> But to create a task, I need put the details of Employee in B.Employee
> class object.
>
> I tried .xsd config in WSDL to generate all the classes for the schema in
> folder for both WSDLs. instead of generate two packages A & B, there was
> only one employee class. I was happy, but not for long. The Employee class
> contains target namespace details for each attribute (like Emp No, Name,
> etc)
> For eg.
>  private static final javax.xml.namespace.QName ID$0 = new
> javax.xml.namespace.QName("http://B";, "Id");
>
> When I called service in A to get Emp Details,
> So the Employee details are not getting set in the Java class because,
> QName is searching for ID field in namespace B which wont be there in the
> response from service A.
>
> Please help.
>
> Thanks,
> Deena
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to