data binding / schema namespaces ISSUE

Data binding / schema namespace ISSUE

 

When we implement a messaging service we typically have two schemas - one for the request and one for the response. Each will share the same namespace.

 

In WSDL we have a request-response service with a request message and a response message defined separately. 

 

When using data binding tools to generate code from the WSDL (Apache Axis 1.3 WSDL2Java in our case) the target namespace is used to name the packages containing the generated classes.

 

This causes a problem because the namespace in both schemas are the same.. This results in the data binding tool attempting to use the same package name for both the classes representing the request and response schemas.

When element names collide in both schemas then only the element defined in the first schema (the request schema) is processed. Note that element names are the same but their structure will often be different (the response typically is more complex than the request).

 

There are a number of ways to work around this problem including

*        Make the namespaces unique

*        Don't use data-binding tools

 

We believe we are using schema namespacing correctly so are reluctant to do make changes to them as this would cause a proliferation of namespaces for us. 

At the moment our only option is to avoid data binding!  

 

I would be interested to hear any views on this? 

 

 

George

 

 

     

 

 

 

 

 

Received on Wednesday, 19 April 2006 15:10:55 UTC