This must be a bug. Can you file a jira issue for this (see the website for a link)? Thanks,
- Dan

ray wrote:
I use JSR 181 to create my Web Service. In the generated WSDL, there is one schema type for each my java exception type, But the schema type's namespace is taken from the package name which the java exception belongs to. I expect the schema type of exception belongs to the same namespace as Web Service's targetNamespace.

package com.some.ale.api;
@WebService(name = "ALEService", targetNamespace = "urn:epcglobal:ale:wsdl:1")
public interface ALE {
    void define(
@WebParam(name = "specName")    String specName,
@WebParam(name = "spec")    ECSpec spec)
throws DuplicateNameException, ECSpecValidationException;
}
package com.some.ale.api;
public class DuplicateNameException extends Exception {
};

the generated wsdl is:
- <#> <wsdl:definitions xmlns:wsdl="*http://schemas.xmlsoap.org/wsdl/*";
xmlns:ns2="*http://api.ale.some.com*";
targetNamespace="*urn:epcglobal:ale:wsdl:1*">
- <#>   <wsdl:types>
   <xsd:schema targetNamespace="*urn:epcglobal:ale:wsdl:1*">
< xsd:element name="*DuplicateNameException*" type="*ns2:DuplicateNameException* " />
   </xsd:schema>
- <#> < xsd:schema targetNamespace="*http://api.ale.some.com*"; elementFormDefault ="*qualified*" attributeFormDefault="*qualified*">
           <xsd:complexType name="DuplicateNameException " />
</xsd:schema>
...
 </wsdl:types>
</wsdl:definitions>

The complex type "DuplicateNameException" belongs to the " *http://api.ale.some.com"; namespace. If I expect it belong to *"*urn:epcglobal:ale:wsdl:1*", what should I do?TIA.


--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to