Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion does not have the latest Apache wsdl2java code bundled

Participant ,
Jul 11, 2011 Jul 11, 2011

ColdFusion 9 has a jar 'webservices.jar' in the Jrun4/lib directory which contains the Apache classes such as

org.apache.axis.wsdl.WSDL2Java

but it appears that this is an older version. When used it does not generate proper Java code for the web services we are trying to use. When we use a standard Apache jar like axis.jar instead things work ok.

What can be done to include the proper code? Will removing this jar from the ColdFusion installation cause things to break?

Regards,

Joop Kaashoek

2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

FYI The AXIS jar that works contains Axis version 1.4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

The Manifest file of the webservices.jar file bundled with ColdFusion 9 (latest!) says that the Axis version is 1.1

So JRUN/ColdFusion is behind a few revisions.

What is the best upgrade strategy?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2011 Jul 11, 2011

Yes Joop, the version of Axis provided with CF (even 9) is rather old. Adobe announced earlier this year that the next release of CF will update to Axis 2. See the review of the announcements of what was comingand goingin the next release in Ray's blog entry:

http://www.coldfusionjedi.com/index.cfm/2011/3/3/ColdFusion-X-Writeup

Until then, it would seem risky (and certainly unsupported) to try to update the jars yourself. But you may find that some have documented doing it. Have you done some searching?

Here's one thread on cf-talk where someone said they did it and it went fine:

http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62098

Of course, it's not clear what they were upgrading from and to. The person asking wanted to go from 1.2 to 1.4. The person answering couldn't remember what he did for sure, but was encouraging. You're talking about a full release upgrade, so that's riskier, in terms of the impact on built-in CF functionality.

Of course, one might propose you could put the jars somewhere else and call them directly (such as using Mark Mandel's Javaloader), if you are prepared to then call the Java objects manually. That would not work if you're trying to use the built-in features to handle web services, though.

Still another solution is using CXF, as discussed in this comment on this old blog entry:

http://tjordahl.blogspot.com/2007/09/coldfusion-8-getting-started-code.html?showComment=1240356180000#c8668262517232495242

Hope that helps, until someone offers more.

/charlie


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

Charlie,

Thanks for the info, I will look into it and post my findings. I had removed the webservices.jar file altogether before, and added the Apache jars, but I thought that killed the JRun console although I am not 100% sure. I am just looking for a safe way to overcome this issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2011 Jul 11, 2011

I would see no connection at all between the webservices.jar and the JRun console.

Indeed, to be clear, do you really mean the jrun console? OR the CF Admin? If you really mean the jrun admin console, I'd wonder: why would you be using that? It's like the appendix in our body: a vestige of functionality no longer needed.

/charlie


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

For sure, the JRUN console is using classes like org.apache.axis.AxisEngine...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

Here is how I fixed my predicament:

- I edited the jar file webservices,jar, took out the entire org.apache.axis directory, in effect removing the org directory. Renamed it to webservices_modified.jar

- removed webservices.jar from /jrun4/lib

- I did not want to mess with more jars, so I just put the following apache jars into the /jrun4/lib directory:

  . axis.jar

  - commons-discovery-0.2.jar

  - commons-logging-1.0.4.jar

This allows our applications to use the proper Axis version and also does not break the JRun Console and any other Jrun/ColdFusion componenet we are using, as far as I can tell.

This does the trick for now.

Regards,

Joop

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

This does not solve the whole problem, since calling java code from Cold Fusion uses the CF Server path which includes yet another Axis library version (1.2) in <server>/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/axis.jar

Lots of code libraries appear to be duplicated in a CF server, including different versions...

This problem has persisted for quite a few versions, I guess not many sites mix J2EE and ColdFusion code together....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 12, 2011 Jul 12, 2011
LATEST

I had mentioned that you would want to use the javaloader, which should resolve that.

http://javaloader.riaforge.org/

Thanks for the clarification on why you were using the JRun Admin console. Just wanted to make sure it wasn't being used needlessly. I see that a lot. Your use makes sense (and yes, many do use both CF and Java at once, but its probably a fraction of a percent of all CF users--and even fewer would have the concern about Axis, possibly.)

Thanks for sharing your observations and explorations. Perhaps they will help others in the future. Keep us posted how it turns out.

/charlie


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2011 Jul 11, 2011

Charlie, you asked why would we be using the JRun Console? We have an application that is a mix of J2EE and ColdFusion, so the JRUN console is used to manage J2EE resources such as JMS queues and Data Sources.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources