detail.php
OW2 Forge: Detail: 306049 Generated client contains compilation errors when operation has user-difined fault

Advanced - Powered by Google


   
Log In
New Account
  
 
Home
My Page
Project Tree
Project Openings
Celtix ESB
          
 
 
Summary
Forums
Tracker
Lists
Tasks
News
Files
SVN
                
 

Tracker: Bugs

Submit New | Browse | Admin | ExportToXml

[ #306049 ] Generated client contains compilation errors when operation has user-difined fault

Date:
2006-08-25 22:39
Priority:
5
Submitted By:
Nobody (None)
Assigned To:
Nobody (None)
Category:
Code Generation
State:
Open
Summary:
Generated client contains compilation errors when operation has user-difined fault

Detailed description:
The generated client code as produced by the wsdl2java command has a compilation error if a user-defined fault is specified for an operation which is returning a non-void. Here's how to reproduce this: - change the hello_world.wsdl to have the operation pingMe return a something. ... <element name="pingMeResponse"> <complexType> <sequence> <element name="requestType" type="string"/> </sequence> </complexType> </element> ... In this case i have pingMe will be returning a "string". - compile using the following wsdl2java command: > wsdl2java -verbose -all -d . hello_world.wsdl - Take a look at the generated client code in: .\org\objectweb\hello_world_soap_http\GreeterClient.java and you'll see that the code to call pingMe is as follows: ... try{ java.lang.String _pingMe_requestType= port.pingMe(); } catch(PingMeFault e){ System.out.println("Expected exception: PingMeFault has occurred."); System.out.println(e.toString()); } System.out.println("pingMe.result=" + _pingMe_requestType); ... Clearly _pingMe_requestType is defined inside the try block and will be out of scope when accessed later on in the output statement statement: System.out.println("pingMe.result=" + _pingMe_requestType); This will cause a compilation error.

Add A Comment:

Please login

Followup

Message
Date: 2006-08-29 07:48
Sender: jimma
Logged In: YES 
user_id=7994

Thanks for reporting.
This issue has been  
fixed . Try it with the latest build. (see
http://forge.objectweb.org/tracker/index.php?func=detail&aid=
305700&group_id=192&atid=350241)

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item

Copyright © 1999-2008, OW2 Consortium | contact | You have a difficulty, a problem ? Please report an issue using your OW2 forge account credentials