Affects Version/s: 1.2-RC
Fix Version/s: 1.2
Environment:jboss404, windows xp and linux 2.6kernal
Number of attachments :
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
@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.