Attached is a decompiled and modified version of org.codehaus.xfire.util.Resolver;
It fixes the bug in a messy way; but it highlights the problem
the problem is:
Deploy a WSDL file inside your jars and reference if from an annotation
eg.
@WebService(serviceName = "MyService", targetNamespace = "http://blah..",
wsdlLocation = "MyService.wsdl",
when deployed the webservice WSDL is get on its first call successfully at .http://..MyService?WSDL
the second call returns an empty document.
the bug is due to the fact that the WSDL is located in the classpath and loaded once as an input stream. The resource writer reads from this input stream and writes it out by copying between the streams.
obviously once written, the input stream is empty, so cannot be used agiain.
the patched file reads the input stream once, and stores the contents, then hands out a new ByteArrayOutputStream on every invocation to getInputStream()
this fixed the problem for me.