Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
roblaw #1
Re: Web service and SOAP problems
kamos, Just trying to keep this thread active. I have been searching for some
CF tools to work with the Adwords API, but haven't had any luck. Haven't done
much PHP, but think I will have to go there. Please post if you find a
workable solution and I will do the same. It seems like there is a large void
of CF support in the SEO/SEM community. roblaw
roblaw Guest
-
ASP.NET Web Service (non-standard SOAP)
Hi, I'm working with a SOAP client which uses non-standard headers and a non-standard doc... It uses the "SOAPAction" header to supply an... -
Web service and SOAP error. HELP!
Hi Luke, I was working with Bill on this issue and just wanted to let you know that the fix worked...much thanks! Gary will help: Error... -
Using .NET web service with SOAP Toolkit 3
I have written a .NET web service and would like to consume it using a SOAP client. To handle complex types I need to create a WSML file. I... -
ATL Unmanaged Soap Service <-> ASP.Net question
Hi Mike, I have reviewed your issue. Due to the nature of your issue I need to do additional research to determine the best way to provide... -
How to create a SOAP service
Hi gurus and nubys, I've been googleing around for a while to see how to build a SOAP server with the least effort in ruby. I found a cool... -
Tom Jordahl #2
Re: Web service and SOAP problems
More details would help.
What is the problem? What are the errors? Do you need to set SOAP headers?
Do you need to create complex CFML structures that map to the XML Schema
types in the WSDL?
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest
-
CFMunster #3
Re: Web service and SOAP problems
Tom, I have been banging my head against a similar problem, and I have talked
with others recently who have had issues as well. I have been trying to get
around it using WSDL2Java to create the base Java classes necessary to make a
call from Java. I have done that successfully, and I have written a class that
will run in Eclipse and will call the web service correctly, but whenever I try
to call the Locator class, I get a 500 Servlet error in JRun. I thought the
problem might be related to my Web service, which is very complex. I duplicated
the problem with a call to the Babelfish Web service. I generated the Java
classes using WSDL2Java in CFMX 7 (developer mode) \JRun4\lib\webservices.jar,
and I built a basic class in Eclipse to test the service. That all works, but
when I call the class from CF, I get the same 500 servlet error. This is
driving me nuts. I would be happy to do a writeup to help others get around
this issue using my technique if I can just get it working. I have uploaded
all the Java code here: [url]http://www.funkymojo.com/code/babelfish.zip[/url] Attached
is the CF call I tried to make to babel.class. It runs ok if you comment out
the getBabel() call and the cfdump, but the getBabel call internally tries to
instantiate BabeFishServiceLocator, and that's where it bombs. Any ideas?
<cfscript>
wsObj = createObject("java","babel");
ws = wsObj.init();
res = ws.getBabel("en_es","Hello World");
</cfscript>
<cfoutput>
<cfdump var="#res#">
</cfoutput>
CFMunster Guest
-
Tom Jordahl #4
Re: Web service and SOAP problems
For CFMX 7, do not use the webservices.jar file from runtime/lib. You need
to use the Axis jar files in the lib directory of ColdFusion
(CFusionMX7/lib). They are different versions of Axis.
Jar files you will need on your class path:
axis.jar
commons-discovery.jar
common-logging-1.0.2.jar
saaj.jar
jaxrpc.jar
log4j.jar
xercesImpl.jar
xml-apis.jar
wsdl4j.jar
jrun.jar
Here is what will work (watch the wrap):
set
CLASSPATH=c:\CFusionMX7\lib\axis.jar;c:\CFusionMX7 \lib\saaj.jar;c:\CFusionMX
7\lib\commons-logging-1.0.2.jar;c:\CFusionMX7\lib\jaxrpc.jar;c:\CFusionM X7\l
ib\log4j.jar;c:\CFusionMX7\lib\xercesImpl.jar;c:\C FusionMX7\lib\commons-disc
overy.jar;c:\CFusionMX7\lib\wsdl4j.jar;c:\CFusionM X7\runtime\lib\jrun.jar;c:
\CFusionMX7\lib\xml-apis.jar
Try that and see if the internal error goes away. By the way, the
exception.log or JRun error-log files probably have the real error you are
getting in them.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest
-
CFMunster #5
Re: Web service and SOAP problems
Victory is mine! Many thanks, Tom. Setting the classpath properly threw me.
We're using Enterprise on all our systems, so my classpath was a bit different,
but I got the gist that it should be %cfusion_root%\lib. I have attached the
batch file code I used to generate my classes. I also set my external libraries
in Eclipse to include all the jar files, and I set my JRE in the Eclipse
project to the JRun4\jre path. I am going to write up a more extensive
explanation for this on my blog. The bottom line is that I am able to
instantiate my class, have it connect to the Web service, and return the data I
need, even complex objects. Extremely cool.
set
CLASSPATH=c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\web-inf\cfusion\lib\a
xis.jar;c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\web-inf\cfusion\lib\saa
j.jar;c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\web-inf\cfusion\lib\commo
ns-logging-1.0.2.jar;c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\web-inf\cf
usion\lib\jaxrpc.jar;c:\JRun4\servers\cfusion\cfus ion-ear\cfusion-war\web-inf\cf
usion\lib\log4j.jar;c:\JRun4\servers\cfusion\cfusi on-ear\cfusion-war\web-inf\cfu
sion\lib\xercesImpl.jar;c:\JRun4\servers\cfusion\c fusion-ear\cfusion-war\web-inf
\cfusion\lib\commons-discovery.jar;c:\JRun4\servers\cfusion\cfusion-ear\cfusion-
war\web-inf\cfusion\lib\wsdl4j.jar;c:\JRun4\lib\jrun.jar;c :\JRun4\servers\cfusio
n\cfusion-ear\cfusion-war\web-inf\cfusion\lib\xml-apis.jar
java -cp %CLASSPATH% org.apache.axis.wsdl.WSDL2Java url_to_wsdl_file
CFMunster Guest
-
Tom Jordahl #6
Re: Web service and SOAP problems
> Victory is mine!
Glad I could help. Post or send me your blog URL when you publish it, I
would love to read it.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest
-
CFMunster #7
Re: Web service and SOAP problems
OK, I just built a simple example using the Babelfish Web service to illustrate
the method I used here, and I just posted the code and a description of how I
arrived at the solution. I am going to post a step-by-step tutorial using
Babelfish and a more complicated example when I get a chance this weekend, but
you can see the basic example on my blog. [url]http://www.funkymojo.com/blog/[/url]
CFMunster Guest
-
CFMunster #8
Re: Web service and SOAP problems
What classpath do I need to use for CFMX 6.1? I tried:
c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib\webservices
..jar
c:\JRun4\lib\jrun.jar
That didn't seem to work. Any help?
CFMunster Guest
-
ckv60 #9
Re: Web service and SOAP problems
Hello Rob,
I have read your informations with great interest. Can you tell me, if it is
possible to do a multithreaded (means parallel) xml - request towards several
(in this case 23) different servers ? I have problems to do so. A programmer
coded this in pure java; but when creating the object in CF MX 6.1 the server
goes up to 100% and does nothing. The same class runs on pure javaserver in ms
to the needed results. Do you have any information, that threading isn?t
possible in combination wiuth CFMX 6.1 ? Any answers to this problem would be a
great help, because otherwise I would have to buy the whole solution to program
this in JSP and enterprise beans (someone told me so).
Thanks for your information.
Christian
ckv60 Guest
-
CFMunster #10
Re: Web service and SOAP problems
Christian,
I'm not clear what you mean by multi-threading. Do you mean you have a Java
class that spawns a bunch of threads to make Web service calls? If so, is there
a reason it spawns multiple threads? Is that so it can make all the Web service
calls in parallel rather than making them serially? That seems to be what you
are saying. I haven't had a reason to do anything like that. Seems like a
reasonable thing to be able to do, though.
It could be that your problem has nothing to do with multi-threading. If you
have a class written against an external Java server, you may need to recompile
the class with CLASSPATH statements that link the classes that CF uses in order
to get the whole solution working against the CF server. The biggest hurdle I
found with my solution was getting the CLASSPATH set correctly. I could get it
working in Eclipse no problem, but I had to generate the ws stubs and compile
my class using the information Tom Jordahl pointed out in this thread. BTW, the
paths listed here are CFMX7-specific, I have been looking at what it takes to
compile in 6.1, but I haven't had time to finish that yet.
CFMunster Guest
-
Phil.Cruz #11
Re: Web service and SOAP problems
Originally posted by: Newsgroup User
For CFMX 7, do not use the webservices.jar file from runtime/lib. You need
to use the Axis jar files in the lib directory of ColdFusion
(CFusionMX7/lib). They are different versions of Axis.
Jar files you will need on your class path:
axis.jar
commons-discovery.jar
common-logging-1.0.2.jar
saaj.jar
jaxrpc.jar
log4j.jar
xercesImpl.jar
xml-apis.jar
wsdl4j.jar
jrun.jar
Here is what will work (watch the wrap):
set
CLASSPATH=c:\CFusionMX7\lib\axis.jar;c:\CFusionMX7 \lib\saaj.jar;c:\CFusionMX
7\lib\commons-logging-1.0.2.jar;c:\CFusionMX7\lib\jaxrpc.jar;c:\CFusionM X7\l
ib\log4j.jar;c:\CFusionMX7\lib\xercesImpl.jar;c:\C FusionMX7\lib\commons-disc
overy.jar;c:\CFusionMX7\lib\wsdl4j.jar;c:\CFusionM X7\runtime\lib\jrun.jar;c:
\CFusionMX7\lib\xml-apis.jar
Try that and see if the internal error goes away. By the way, the
exception.log or JRun error-log files probably have the real error you are
getting in them.
--
Tom Jordahl
Macromedia Server Development
What would be te correct jars/classpath for CFMX6.1?
-Phil
Phil.Cruz Guest
-
CFMunster #12
Re: Web service and SOAP problems
Phil,
I talked to Tom about that very subject at one point before I decided to stick
with CFMX 7. Here was his response:
===========
For CFMX 6.1, you should use the webservices.jar in cfusion/lib. You can then
include jrun.jar and things should work OK.
If it doesn?t, what classes does Java say you are missing? You could probably
just add all the jar files in cfusion/lib and you would catch anything you are
missing.
===========
I never got my solution working in 6.1, but to be honest I didn't bother with
trying what Tom recommended because I had 7 in place already.
Rob
Originally posted by: Phil.Cruz
What would be te correct jars/classpath for CFMX6.1?
-Phil
CFMunster Guest



Reply With Quote

