Skip to main content

WSDL required in war files

5 replies [Last post]
dhunter21
Offline
Joined: 2005-06-20

Is the WSDL a required artifact to be included with the war file?

We noticed in the fromjava sample that the wsdl was not bundled in the server war file. The wsdl was being autogenerated at runtime.

When we tried this with our codebase, and we noticed that we were getting errors. We had a server method foo(bar[] b) that is being called thru the wsdl. If we do not include the wsdl, when the client invokes the server, the parameter 'b' is null. However, I noticed that the client side code that is generated from the wsdl thinks that the parameter is really a List instead of an area. For grins, I changed the method to take a single bar element (foo(bar b)) and everything works.

Alternatively, we noticed that if we simply keep the wsdl with the war file, that the test also works without changing the interface.

Does JAX-WS or JAX-B have issues working with arrays?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohlert
Offline
Joined: 2003-06-16

When writing the client in the original case, did you import the WSDL from the deployed web service? If so, did it give you a List? And when you invoked this method you got a null?

dhunter21
Offline
Joined: 2005-06-20

I imported the wsdl from the wsdl file that was created from the wsgen task. IOW, i used:
keep="true"
base="${classes.dir}"
sourceBase="${generated-client-java.jwsdp}"
wsdlFile="${generated-non-java.jwsdp}/com.mycompany.foo/FooService.wsdl"
>

Yes, this returned a List.

kohlert
Offline
Joined: 2003-06-16

I would like to know that if you do not bundle your WSDL in the war, is the WSDL generated at deploy-time the same as the WSDL generated with wsgen?

dhunter21
Offline
Joined: 2005-06-20

I believe they are the same. I'm sending the wsdls to your email if you can inspect.

hr_stoyanov
Offline
Joined: 2004-04-01

Doug-,
If you play with the test Dustin sent you last few days, you will see the null array problem in the server method, when the WSDL/XSD pair is not included in the war, under the WEB-INF folder.

Thanks,
Hristo