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

Server Monitoring API WSDL

Guest
Dec 07, 2008 Dec 07, 2008
Can anyone tell me how I can generate the WSDL for servermonitoring.cfc? Unfortunately, I can't generate it by simply pointing to severmonitoring.cfc?wsdl as AXIS errors result due to the fact that many of the functions don't specify a return type. I've read about these issues in the Adobe bug tracking tool, but I haven't found a workaround.

I know I can use the API through CF, but I want to invoke the web service operations from a Flex application and currently can't because the application isn't able to consume the web service due to those errors.

Thanks,
-Jose
1.5K
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

correct answers 1 Correct answer

Deleted User
Dec 14, 2008 Dec 14, 2008
Hi Charlie,

Yes, you're right, other than fundamentals, there isn't too much out there on Flex/CF using remote objects. However, you pointed me to this great resource:

http://www.flashcomguru.com/index.cfm/2006/11/11/flex2remoting

The poster raised many of the same questions that I had and was unable to find answers to. Anyway, after reading the posts, I was successfully able to call CF Admin API methods, using mx:RemoteObject, on both my localhost and a remote server, like so:

<mx:RemoteOb...
Translate
Community Expert ,
Dec 07, 2008 Dec 07, 2008
Jose, what happens if you change your Flex from trying to call the CFC as a web service to instead call it as a remote object: mx:RemoteObject? I've not done it yet myself, but I would bet that solves the problem. Rather than invoking it remotely, you're then technically invoking it via a proxy, the flex2gateway, which gets called when you invoke remote objects that way from Flex).

Let us know if this works for you.

/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
Guest
Dec 09, 2008 Dec 09, 2008
Hi Charlie,

I should be more specific: my application is an AIR application, so I don't think the flex2gateway is involved here. I did try using mx:RemoteObject, but without any luck, as follows:

<mx:RemoteObject id="ro" endpoint=" http://myserver.domain.com/cfide/adminapi/servermonitoring.cfc" />

I used button and text input controls to invoke and display the result, as follows:

<mx:Button label="Get Data" click="ro.getAverageResponseTime()" x="0" y="50" />
<mx:Text text="Result" x="0" y="100" />
<mx:TextInput text="{ro.getAverageResponseTime.lastResult}" x="50" y="100" color="#FFFFFF"/>

I then got the following RPC error when clicking the button to invoke the service:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: ' http://myserver.domain.com/cfide/adminapi/servermonitoringproxy.cfc'"

I would appreciate any additional help you or anyone else can provide.

Thanks,
-Jose
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 ,
Dec 10, 2008 Dec 10, 2008
Jose, I'm literally about to run out the door to teach a class for 3 days, so can't offer too much help. But whether calling from AIR or Flex it should be the same (about calling a CFC on a CF server). And in that regard, I'll propose that you look for (search for) references to people accessing the admin API from flex. The CF server monitor is itself a Flex app calling those APIs, so it certainly does work. It may be that there are some steps you need to take (and certainly other methods you need to call before the servermonitoring cfc methods, including the login method of the adminstrator.cfc, though I don't think that's the cause of your error above).

In fact, the error almost makes me think there's instead some configuration problem (since it refers to "badversion"). I don't do enough Flex to know, and again can't search for it at the moment, but I would focus first on that error, and search for info on that (without mention of the admin api, since the error may not have anything to do with it). In that regard, can you call any other CFCs, besides the admin api, as a test? Just trying to help. Will likely be several hours before I can reply.

/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
Guest
Dec 12, 2008 Dec 12, 2008
Charlie, as you suggested, I tried calling a method (just returns a number) from a very simple CFC that requires no authentication and I still get the "BadVersion" error. I also tried invoking a remote method from my local ColdFusion 8 development instance with the same result as well.

I've tried scouring the internet for help, but there seems to be very little out there regarding Flex and web services/remote objects, so it's difficult finding answers. In any case, I'll continue to look, but if you can offer any other suggestions, I'd appreciate it.

Thanks,
-Jose
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 ,
Dec 12, 2008 Dec 12, 2008
Jose, you say you can't find much about Flex calling remote objects. Really? There are many, many such resources.

But maybe you mean that refer to this badversion error. Doing a little digging, I see references to issues related to SSL/HTTPS. Is that a part of what you're doing? Check out these.

http://www.adobeforums.com/webx/.59b4dc44

http://www.nabble.com/SSL-Https-communication-between-swf-and-data-service---life-cycle-is-failed-td...

Here also is an entry where someone writes about calling a CFC from Flex, and in a comment he mentions the badversion error. Though he never mentions resolving it specifically, he seems to have gotten things working, so maybe among the few things discussed is a solution for you.

http://www.flashcomguru.com/index.cfm/2006/11/11/flex2remoting

I also see one that suggests that the badversion error is just a generic error reflecting another problem in the connection. While it discusses AMFPHP, which is an open alternative to the FlashRemoting built into CF, it may still offer insight:

http://www.5etdemi.com/blog/archives/2005/06/i-did-it-i-killed-netconnectioncallbadversion

If none of them are it, since it seems maybe you're having difficulty calling ANY CFC component from AIR/Flex, check out any of these examples to see if you can get them to run:

http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_4.html

http://tutorial519.easycfm.com/

http://www.cftips.net/post.cfm/flex-data-grid-with-coldfusion-flash-remoting-using-cfc

Just be careful as you're looking at resources for Flex examples: some are for 1.5, some for 2, some for 3.

Hope that helps.

/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
Community Expert ,
Dec 12, 2008 Dec 12, 2008
One more thought, Jose, going back to the comment of not too many resources on Flex/CF integration, I realize you may mean something other than fundamentals, and fair enough. But in case you do mean even basics, I'll offer a couple more resources that may help you at least confirm that things should work *at all*.

There are also a couple of Adobe TV videos showing Flex/CF integration:

http://tv.adobe.com/#vi+f1472v1498

http://tv.adobe.com/#vi+f1472v1517

The first does everything from scratch, in CF and FlexBuilder (18 minutes). The second shows using the Wizard in the Eclipse Extensions for CF (10 minutes).

Again, sorry if you're not interested in such basics. Just offering it in case you may have been.

/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
Guest
Dec 14, 2008 Dec 14, 2008
Hi Charlie,

Yes, you're right, other than fundamentals, there isn't too much out there on Flex/CF using remote objects. However, you pointed me to this great resource:

http://www.flashcomguru.com/index.cfm/2006/11/11/flex2remoting

The poster raised many of the same questions that I had and was unable to find answers to. Anyway, after reading the posts, I was successfully able to call CF Admin API methods, using mx:RemoteObject, on both my localhost and a remote server, like so:

<mx:RemoteObject id="ro"
destination="ColdFusion"
endpoint=" http://localhost:8500/flex2gateway/"
source="cfide.adminapi.servermonitoring"
fault="Alert.show(event.fault.message, 'Error')" />

I first had to authenticate by calling the login method of the administrator.cfc (also via mx:RemoteObject), but it works perfectly. My confusion was over the use of the endpoint property -- which I was using incorrectly -- and the posts on this page cleared my confusion.

Anyway, I definitely appreciate your help. I'm very happy to get through this small hurdle, as I'm a big fan of both CF and Flex.

Thanks again,
-Jose
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 ,
Dec 15, 2008 Dec 15, 2008
LATEST
Very good news, Jose. Thanks for sharing. Yes, sometimes when trying to solve a problem, it pays to bring things down to the shortest possible demo, so as to eliminate many potential causes of conflict. In this case, the end point was the issue. Sorry that I (or others) didn't recognize that in your first note. I just don't do enough flex to have spotted it immediately. Would have saved you a week. 🙂

Be sure to mark your last reply as the answer, so that future readers can see it right away. 🙂

/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
Resources