0
Problem with SOAP call in CFMX
New Here
,
/t5/coldfusion-discussions/problem-with-soap-call-in-cfmx/td-p/282104
Jul 02, 2007
Jul 02, 2007
Copy link to clipboard
Copied
Hi,
we use CFMX 6.1 (Build 6,1,0,hf59825_611) and JVM 1.4.2 on Win2003.
If we want to call a special web service of a third party tool for newsletter services we get the following error:
Error Occurred While Processing Request
[]coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: Found 1 semantic error compiling "C:/CFusionMX/stubs/WS-561498559/de/broadmail/api/WebserviceException.java": 24. public java.lang.Object getCause() { <--------> *** Error: The return type of method "java.lang.Object getCause();" does not match the return type of method "java.lang.Throwable getCause();" inherited from type "java/rmi/RemoteException". .
Otherwise: The Babelfish web service runs perfectly.
Thank you very much for any help!
Best regards
Mathias Weber
AP Design GmbH
we use CFMX 6.1 (Build 6,1,0,hf59825_611) and JVM 1.4.2 on Win2003.
If we want to call a special web service of a third party tool for newsletter services we get the following error:
Error Occurred While Processing Request
[]coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: Found 1 semantic error compiling "C:/CFusionMX/stubs/WS-561498559/de/broadmail/api/WebserviceException.java": 24. public java.lang.Object getCause() { <--------> *** Error: The return type of method "java.lang.Object getCause();" does not match the return type of method "java.lang.Throwable getCause();" inherited from type "java/rmi/RemoteException". .
Otherwise: The Babelfish web service runs perfectly.
Thank you very much for any help!
Best regards
Mathias Weber
AP Design GmbH
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/coldfusion-discussions/problem-with-soap-call-in-cfmx/m-p/282105#M25208
Jul 02, 2007
Jul 02, 2007
Copy link to clipboard
Copied
Hi Mathias,
CFMX6.1 uses an older version of Axis and seems to be having problems with this webservice. CF8 appears to work directly and I suspect CFMX7 would work also. However, if you can handle a little java it appears this service can work with CFMX6.1.
First, read the following technote on using WSDL2java. Run wsdl2java against the webservice like in the technote. But update the command using the -W (Nowrap) switch. My command is:
C:\>c:\j2sdk1.4.2_13\bin\java -cp C:/CFusionMX/lib/webservices.jar
org.apache.axis.wsdl.WSDL2Java -o d:\rpcservicesWS -vW http://api.broadmail.de/s
oap11/RpcSession?wsdl
NOTE I added the -W where the technote only used a -v (verbose).
However, do not immediately compile the stubs as in the last section of the technote. If you do you will see something like:
C:\>c:\j2sdk1.4.2_13\bin\javac -classpath C:/CFusionMX/lib/webservices.j
ar D:\rpcservicesWS\de\broadmail\api\*.java
D:\rpcservicesWS\de\broadmail\api\WebserviceException.java:24: incompatible type
s
found : java.lang.Object
required: java.lang.Throwable
return cause;
^
1 error
This is much like the original error that is thrown inside CFMX6.1. It indicates that wsdl2java and Axis are creating 'cause' as a class of java.lang.Object, but what is needed is 'cause' to be created as a class of java.lang.Throwable. We can make this update easily enough. Open the file de\broadmail\api\WebserviceException.java in a code editor. We will need to change 4 lines:
line 13: private java.lang.Object cause;
change to:
private java.lang.Throwable cause;
line 18: java.lang.Object cause,
change to:
java.lang.Throwable cause,
line24: public java.lang.Object getCause() {
change to
public java.lang.Throwable getCause() {
line 28: public void setCause(java.lang.Object cause) {
change to
public void setCause(java.lang.Throwable cause) {
Now save the file and compile just as indicated in the technote.
If you then go to the output directory you used for the commands you can create a jar file with all the classes included. My command was:
jar -cvf rpcSession.jar .
Note the space and period after rpcSession.jar. You can open the file with winzip and you will see all the files and their paths "de\broadmail\api".
Next include this jar in CFMX's classpath using the java and jvm page in the cfadmin. Restart cfmx appserver as indicated.
Now in order to use these stubs we need to update the code. I prefer using CreateObject call inside cfscript to cfinvoke. My code is:
CFMX6.1 uses an older version of Axis and seems to be having problems with this webservice. CF8 appears to work directly and I suspect CFMX7 would work also. However, if you can handle a little java it appears this service can work with CFMX6.1.
First, read the following technote on using WSDL2java. Run wsdl2java against the webservice like in the technote. But update the command using the -W (Nowrap) switch. My command is:
C:\>c:\j2sdk1.4.2_13\bin\java -cp C:/CFusionMX/lib/webservices.jar
org.apache.axis.wsdl.WSDL2Java -o d:\rpcservicesWS -vW http://api.broadmail.de/s
oap11/RpcSession?wsdl
NOTE I added the -W where the technote only used a -v (verbose).
However, do not immediately compile the stubs as in the last section of the technote. If you do you will see something like:
C:\>c:\j2sdk1.4.2_13\bin\javac -classpath C:/CFusionMX/lib/webservices.j
ar D:\rpcservicesWS\de\broadmail\api\*.java
D:\rpcservicesWS\de\broadmail\api\WebserviceException.java:24: incompatible type
s
found : java.lang.Object
required: java.lang.Throwable
return cause;
^
1 error
This is much like the original error that is thrown inside CFMX6.1. It indicates that wsdl2java and Axis are creating 'cause' as a class of java.lang.Object, but what is needed is 'cause' to be created as a class of java.lang.Throwable. We can make this update easily enough. Open the file de\broadmail\api\WebserviceException.java in a code editor. We will need to change 4 lines:
line 13: private java.lang.Object cause;
change to:
private java.lang.Throwable cause;
line 18: java.lang.Object cause,
change to:
java.lang.Throwable cause,
line24: public java.lang.Object getCause() {
change to
public java.lang.Throwable getCause() {
line 28: public void setCause(java.lang.Object cause) {
change to
public void setCause(java.lang.Throwable cause) {
Now save the file and compile just as indicated in the technote.
If you then go to the output directory you used for the commands you can create a jar file with all the classes included. My command was:
jar -cvf rpcSession.jar .
Note the space and period after rpcSession.jar. You can open the file with winzip and you will see all the files and their paths "de\broadmail\api".
Next include this jar in CFMX's classpath using the java and jvm page in the cfadmin. Restart cfmx appserver as indicated.
Now in order to use these stubs we need to update the code. I prefer using CreateObject call inside cfscript to cfinvoke. My code is:
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
MatWeber
AUTHOR
New Here
,
LATEST
/t5/coldfusion-discussions/problem-with-soap-call-in-cfmx/m-p/282106#M25209
Jul 02, 2007
Jul 02, 2007
Copy link to clipboard
Copied
Hi Ken,
many thanks, we updated to CF7 and it works.
Best regards
Mathias
many thanks, we updated to CF7 and it works.
Best regards
Mathias
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

