tracker issue : CF-4126521

select a category, or use search below
(searches all categories and all time range)
Title:

Web service based on CFC and wsdlfile fails to return string; produces error instead

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): A. Bakia / A. Bakia (A. Bakia)

Created: 03/09/2016

Components: Web Services

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: Alpha3_v12 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

Problem Description: I created a web service CFC which includes just one function. The CFC has attribute wsdlfile, whose value is a relative URL. I experiment interchangeably with values of 1 and 2 for the wsversion attribute. The function has no argument, and has string returntype.

With wsversion=1, I get the error: "org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException". 

With wsversion=2, I get the error: "coldfusion.runtime.UndefinedVariableException: Variable MYRETURNVAR is undefined. " (Here, MYRETURNVAR is the variable to which I assign the function's return value). 

Steps to Reproduce: (1) Copy the attached files (wsTest.cfm and testComp.cfc) to a directory under the Coldfusion webroot.
(2) Open testComp.cfc in a text editor, temporarily delete the attribute wsdlfile of the cfcomponent tag and save.
(3) Open in the browser the URL to testComp.cfc?wsdl. For example, mine is http://127.0.0.1:8500/workspace/cfRaijin/testComp.cfc?wsdl . Coldfusion generates, as a result, the WSDL file for the web service. It is an XML file.
(4) Save the contents of the XML file, within the same directory, as testComp.wsdl.
(5) Reopen testComp.cfc in the editor and restore the attribute wsdlfile of the cfcomponent tag to the value "testComp.wsdl".
(6) Open in the browser the URL to wsTest.cfm. For example, mine is http://127.0.0.1:8500/workspace/cfRaijin/wsTest.cfm . 
(7) In testComp.cfc, change the value of the attribute wsversion from 1 to 2.
(8) Again open in the browser the URL to wsTest.cfm.  

Actual Result:
With wsversion=1, you will get the error: "org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException". 

With wsversion=2, you will get the error: "coldfusion.runtime.UndefinedVariableException: Variable MYRETURNVAR is undefined. " (Here, MYRETURNVAR is the variable to which the function's return value is assigned). 

Expected Result: No error, and MYRETURNVAR displayed as the string "Doe, John"  

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126521

External Customer Info:
External Company: (withheld for privacy)
External Customer Name: A. Bakia
External Customer Email: A.BAKIG@CHELLO.NL
External Test Config:  


Bug File Paths:
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha3_v12\4096292\error_message_with_wsversion1.html
	 
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha3_v12\4096292\error_message_with_wsversion2.html
	 
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha3_v12\4096292\wsTest.cfm
	 
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha3_v12\4096292\testComp.wsdl
	 
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha3_v12\4096292\testComp.cfc

Attachments:

  1. June 16, 2016 00:00:00: 1_wsversion1.zip
  2. June 16, 2016 00:00:00: 2_wsversion2.zip

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Fix By Product Milestone newValue: HF2 oldValue: Gold Master oprid: sjayaram recordName: RQ_DEFECT timpestamp: 2016-03-02 14:48:10.0 action: updated fieldName: Dev Assigned newValue: mjain oldValue: pnibinkj oprid: sjayaram recordName: RQ_DEFECT timpestamp: 2016-03-02 14:48:10.0 action: updated fieldName: Owner newValue: mjain oldValue: pnibinkj oprid: sjayaram recordName: RQ_DEFECT timpestamp: 2016-03-02 14:48:10.0 action: updated fieldName: Severity newValue: 2 oldValue: 3 oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-12-21 17:50:05.0 action: updated fieldName: Reason newValue: BugVerified oldValue: Blank oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Fix By Milestone newValue: Gold Master oldValue: Blank oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Found in Phase newValue: Beta1 oldValue: Blank oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Owner newValue: pnibinkj oldValue: aksriniv oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Fix By Product Milestone newValue: Gold Master oldValue: Blank oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-12-08 14:29:29.0
Comment by CFwatson U.
3876 | March 09, 2016 02:26:47 AM GMT
Added By: PreRelease User User Name:A. Bakia Note Added: Entered Bug. Original reporter of this bug is Christian Polintan. See https://bugbase.adobe.com/index.cfm?event=bug&id=CF-4094858 and https://forums.adobe.com/thread/2016725 Date Added :2015-12-06 13:53:10.0
Comment by CFwatson U.
3877 | March 09, 2016 02:26:49 AM GMT
Added By:aksriniv Note Added: On updating CF10 with jdk1.8 update 60,and corresponding tools.jar in cfusion/lib, I do not find wrong version issue. Its throws WstxEOFException for version="1". Error detail: The fault returned when invoking the web service operation is:<br> <pre>org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:124) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:68) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at testwebservice.Bug_CF-4096292TestCompCfcStub.performInquiry(Bug_CF-4096292TestCompCfcStub.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMetho... ''</pre> Date Added :2015-12-10 10:26:53.0 Added By:aksriniv Note Added: Paul, for Cf10, it throws this message : coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: C:\ColdFusion10\cfusion\stubs\WS-1852605083_2\src\bug_CF-4096292\Document.java:18: cannot access java.lang.Object bad class file: java\lang\Object.class(java\lang:Object.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class Document ^ . Should I change jdk version or tools.jar? Please let me know. Date Added :2015-12-08 14:50:28.0 Added By:aksriniv Note Added: I tested with Cf10,11 and 12. For wsversion set to 2 with {refreshWSDL="true"} on invoking the web service, the exception was not thrown. But with wsversion=1 the following errors were thrown : On CFRaijin : The fault returned when invoking the web service operation is:<br> <pre>org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:124) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:68) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at testwebservice.Bug_CF-4096292TestCompCfcStub.performInquiry(Bug_CF-4096292TestCompCfcStub.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMetho... ''</pre> On Cf11 : The fault returned when invoking the web service operation is:<br> <pre>org.apache.axis2.AxisFault: Connection refused: connect at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:402) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at testwebservice.Bug_CF-4096292TestCompCfcStub.performInquiry(Bug_CF-4096292TestCompCfcStub.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.... ''</pre> On CF10 : C:\ColdFusion10\cfusion\stubs\WS-1852605083_2\src\bug_CF-4096292\Document.java:18: cannot access java.lang.Object bad class file: java\lang\Object.class(java\lang:Object.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class Document ^ Message Errors reported by Java compiler: C:\ColdFusion10\cfusion\stubs\WS-1852605083_2\src\bug_CF-4096292\Document.java:18: cannot access java.lang.Object bad class file: java\lang\Object.class(java\lang:Object.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class Document ^ I will update more on Cf10 message. Date Added :2015-12-08 14:35:26.0
Comment by CFwatson U.
3878 | March 09, 2016 02:26:50 AM GMT
@Akhila I tried in my local environment on CH2016, please provide a snippet where this issue can be reproduced.
Comment by Mayur J.
3879 | April 19, 2016 12:16:27 AM GMT
Not an issue. Wsdlfile is adhering to version 1 whereas in code wsversion specified is as 2 . When wsversion is specified as 1 as wsdlfile is adhering to version 1 then correct output is getting generated (Name of employee is: Doe, John). Also, please specify wsverion in cfc .Attaching the sample code for both version2 and version1 which works fine. If this works fine for you , can I close this bug.
Comment by Poonam J.
3880 | June 16, 2016 03:50:32 AM GMT