Link to home
Start Free TrialLog in
Avatar of RCorfman
RCorfman

asked on

Visibility of SOAP Envelope in CFCs

I'm working with another group here in my company to troubleshoot/diagnose a webservices implementation. I've built a CFC in cold fusion that I can call with straight http calls and it works (I've called it from my Oracle database... as basic of http as you can get). I can send the SOAP envelope and am getting the data back.

But, that is my call. The group I'm working with would like me to provide them back the data on their soap call so they can ensure it is structured correctly.  Is there a way to view the soap envelope from within the CFC?

I've gotten cfmail to work within the cfc so I can see when it is called. I've also played with getHTTPRequestDAta. From there I can see all the headers, the protocol, and the method, that all works. The problem is that the 'content' portion of this is an empty string.

Any suggestions?
Avatar of Plucka
Plucka
Flag of Australia image

RCorfman,

Not sure I understand why you need this?

But <cflog is your friend rather than cfmail, it's a nicer solution where you can log all parts of your app and see what's happened, especially good to log stuff when using try / catch sections.

Regards
Plucka
Avatar of RCorfman
RCorfman

ASKER

It is just a debugging phase. I can call my routine fine, and it works. I've tested the routine. Another application in my company is trying to call the routine. I think their soap call is fine since they are getting a 200 response back, but they were asking ME to let them know what the soap envelope looked like.
I thought "no problem, getHTTPRequestData should have that". Interestingly enough, it doesn't provide the data that came along with the call, the content of the request isn't there. I was wondering if there is a way to get that information.

The cfmail was just a way to have the cfc let me know that it was called during this debugging phase and send me information. That works and I don't have to monitor any logs or anything, just sends it right as intended.

I will keep that in mind though, I haven't played with it before and I'm sure it will be useful for other stuff.

So, when a .cfc is called via soap, is there a way to get the soap envelope data?  Not that it will do any good for the other group, I already know they are doing the call right because they are getting a 200 response and I'm sending them data, they just aren't mapping it right. BUT, when I looked for the envelope, I couldn't get to the data so it begged the question above.
RCorfman,

Ok, I could be wrong, but I think the CF server takes all that info and then passes the relevant bits to the CFC, so your CFC never gets the actually raw SOAP request, CF server does.

So I think the answer is no, unless CF logs this info in a logfile, wouldn't hurt to check.

Regards
Plucka
I'm not an administrator, and don't have any administrative rights. I can just publish code.  As far as I know, I don't have access to the logs. It is just interesting that I can get the headers through GetHTTPRequestData, but not the content.

The question still stands, does the .cfc have access to the soap envelope data?
ASKER CERTIFIED SOLUTION
Avatar of Plucka
Plucka
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yep, that looks like the the function. Unfortunately, I don't have CF7 available, just 6.1mx. I think that's why they ended up deploying this function.
Ahh,

Time for an upgrade, CF7 is very worthwhile.

Although, I hear that Scorpio isn't far away, and i'm hearing wispers that it will be a major release, so perhaps hold off for 8.
Yeah, that is is so simple. I work for a very large company. Standards with shared hardware. CF7 is coming soon, but not here yet. I'm going to leave the question open for a week or so if that is ok to see if anyone else has any bright ideas, but I suspect it can't be done in 6.1.  I should know in the short time I've been here that specifying version can be all important for answers.