Issue Details (XML | Word | Printable)

Key: XFIRE-579
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Dan Diephouse
Reporter: Alex Fishlock
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

WSDL procustion gives empty document on the 2nd and subsequent calls

Created: 11/Aug/06 05:54 PM   Updated: 31/Aug/06 09:15 AM   Resolved: 31/Aug/06 09:15 AM
Component/s: None
Affects Version/s: 1.2-RC
Fix Version/s: 1.2

Time Tracking:
Not Specified

File Attachments: 1. Java Source File Resolver.java (4 kB)

Environment: jboss404, windows xp and linux 2.6kernal


 Description  « Hide

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.



Dan Diephouse added a comment - 31/Aug/06 09:15 AM

This was fixed in 1.2 AFAIK