XFire
  1. XFire
  2. XFIRE-579

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2-RC
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      jboss404, windows xp and linux 2.6kernal
    • Number of attachments :
      1

      Description

      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.

        Activity

        Hide
        Dan Diephouse added a comment -

        This was fixed in 1.2 AFAIK

        Show
        Dan Diephouse added a comment - This was fixed in 1.2 AFAIK
        Dan Diephouse made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.2 [ 12649 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Dan Diephouse
            Reporter:
            Alex Fishlock
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: