Skip to main content

xsd:choice error

5 replies [Last post]
abhishek_anna
Offline
Joined: 2005-06-15
Points: 0

hi,
i m using wscomile to generate client stub. I am getting an error
warning: unsupported XML Schema feature: "xsd:choice" in component...
Can any one tell how to solve this proplem.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
abhishek_anna
Offline
Joined: 2005-06-15
Points: 0

i have downloaded jax-ws 2.0. My wsdl file contains custom soap header also. wscompile tool is not generating code for it. with the previous version of jax-rpc i was able to gernerate code using wscompile for the headers with -f:explicitcontext option. but now this feature is not supported in wscompile given by jax-ws 2.0.

what shall i do to get the header code??

kohlert
Offline
Joined: 2003-06-16
Points: 0

Try reading the "2.4 Additional Header Mapping" section of the customization.html file in the docs. I think it will solve your problem.

kohlert
Offline
Joined: 2003-06-16
Points: 0

What version of wscompile are you using. To find the version run: wscompile -version

abhishek_anna
Offline
Joined: 2005-06-15
Points: 0

when i gave wscompile -version i got

JAX-RPC Standard Implementation (1.1.2_04, build R45)

kohlert
Offline
Joined: 2003-06-16
Points: 0

Hi,
JAX-RPC 1.1.2 does not support xsd:choice. There really is no good way to get this to work. However, JAX-WS 2.0 (the follow on product to JAX-RPC) does support 100% of schema. You can try the EA (which was still called JAX-RPC 2.0, read my blog about the name change at:
http://weblogs.java.net/blog/kohlert/archive/2005/05/jaxrpc_20_renam.html

You can read about JAX-RPC 2.0 EA at:
http://weblogs.java.net/blog/kohlert/archive/2005/04/jaxrpc_20_stand_1.html

You can also get access to the JAX-WS sources on java.net:
http://weblogs.java.net/blog/kohlert/archive/2005/05/jaxws_20_cvs_re.html

JAX-WS 2.0 Early Access 2 should also be out in the next week.

Give either the EA or EA 2 a shot.