On Wed, 2005-07-06 at 11:00 +0530, Venkat Reddy wrote: > The WSDL works with Axis 1.2.1. Namespace for "testType" is taken as > "http://test.wsdl". For example, the generated stub code has this line > : > param = new org.apache.axis.description.ParameterDesc(new > javax.xml.namespace.QName("", "testParam"), > org.apache.axis.description.ParameterDesc.IN, new > javax.xml.namespace.QName("http://test.wsdl", "testType"), > wsdl.test.TestType.class, false, false);
Why does it take that namespace? If a schema is declared without a target namespace then it doesn't have a namespace .. you can't take the default namespace of the enclosing element as the namespace for which the schema is defined. So basically if the schema doesn't have a "targetNamespace" attribute then that schema cannot be used in WSDL. IIRC WSDL 1.1 didn't spell this out explicitly but it was clarified in the WS-I basic profile: http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#Schema_targetNamespace_Structure WSDL 2.0 also clarifies this by declaring this attribute mandatory: http://www.w3.org/TR/wsdl20/#xsd-types This a bug in Axis1. Of course, a better error message from Axis2 would be appreciated by users I'm sure :-). Sanjiva.
