Skip to main content

wsimport package customization for imported schemas within WSDL

2 replies [Last post]
nick99tlk
Offline
Joined: 2004-08-12

Using wsimport, I have not been able to specify a package customization for Java classes generated from both the WSDL and from imported schemas. I can generate Java classes with the customized package declaration at the WSDL level, but the java classes generated from xsd:import for my schemas do not retain the package definition, but use their Namespace values. Likewise, I can generate Java classes with the customized package declaration for my external XML schema files imported by the WSDL file, but then the Java classes generated from the WSDL use the WSDL default Namespace as the package. I want to be able to specify packages for both the WSDL and xsd:import external XML schema files.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nick99tlk
Offline
Joined: 2004-08-12

Thanks. I'm good to go.

vivekp
Offline
Joined: 2003-06-10

you need to passa jaxb customization file for the imported schema to wsimport using -b switch.

for example,

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
version="1.0">





You need to pass this jaxb customization file using wsimport -b switch.

>wsimport -b -b

Refer, https://jax-rpc.dev.java.net/jaxws20-ea2/docs/customizations.html#2.9_XM...

-vivek.