anyone have any ideas on why I can't access a wsdl...
# cfml-general
a
anyone have any ideas on why I can't access a wsdl file form a remote cfc? i.e. localhost/path/to/cfc.cfc?wsdl - this syntax works on my laptop and all of our dev servers, but not on my desktop. I can't find anything in IIS or CF Admin that is different on this one machine, but it just renders an empty file
j
My first guess is IIS may not have a handler mapping for .cfc (if it's locked down), the CF server may have sandbox enabled with something blocking remote CFC's - there is various settings in CF that may lockdown remote CFC's especially in prod servers. But if it was working prior to today, that may not be it (unless an admin recently locked things down)
a
yes, there is a handler mapping... only thing I can think of maybe somewhat related, is I created a new cf instance for another sandbox over the weekend. I wonder if wsconfig changed something on this instance.
j
Can't hurt to try to redo the connector
I'm not too experienced with remote CFC's - just throwing in my two cents.
When you say you can't access it, is it a 404?
a
yea, I rebuilt it, but no change... good idea though
no, it's 200 success... just a 0 byte response
j
Weird. Rebuild the connector and restart IIS and CF. I've had some very weird issues with the IIS connectors. Otherwise, hopefully someone more experienced can chime in
d
When in doubt, check the logs, or bump up logging levels. 😄
You should be able to track the request all the way through and see where it's getting lost.
a
I tried checking all the CF logs, so my guess is for some reason it's not getting to CF
d
What do the IIS logs say? Where does it think it's finding the page?
Can you copy it to a different file name, and find it that way? Do non-existent files also give 200 responses?
a
No, if I change the url to be a file that doesn't exist, I get a 404
and, the web service still works if I call it through Postman or SoapUI, it responds. But the ?wsdl isn't working
and I'm having a strange error from Axis2 if I have a certain number of arguments on one function it seems, but that's separate from the wsdl issue
d
The WSDL thing rings a vague bell… is this Adobe or Lucee? I want to say it may need to regenerate it, and there's a way to force that regeneration, but I'm drawing a blank.
a
Adobe CF2023
I upgraded to latest update 8 today to see if that made a difference, but didn't seem to.
d
Yeah it would be like in cfclasses or something I presume, so you'd want to wipe out caches basically
This is the same endpoint that is throwing an axis error?
a
yea, there is a function in that cfc that accepts a few arguments... an ID and 4 date fields to update... it works fine if I pass just the ID and one date... but if I provide 2 or more dates, it gives an Axis2 error... what's strange is in production it works fine. But all of our dev servers and sandboxes have this error. i've commented out the entire function body so it doesn't even do anything and it only errors with 2 or more date arguments.
if I look in the axis log, I see this: 2024-07-30 135712,605 [ajp-nio-127.0.0.1-8016-exec-5] AXIS2 ERROR org.apache.axis2.rpc.receivers.RPCMessageReceiver - Index 7 out of bounds for length 7 java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7 if I change the number of arguments in the function, index 7 of 7 changes with it... so I can arbitrarily add <cfargument name="someArgName" type="string" required="false" default=""> and that error will change to index 8 of 8.
d
It really seems like it needs to regenerate the classes or something, have you cleared out all the caches?
a
I've used the Clear Template Cache button in the admin
Easiest being adding a
refreshwsdl=true
to the call
a
seems like it's refreshing because the call takes slightly longer but no change in result
d
Hmm, a zero byte response, but only for the ?wsdl call eh? And nothing in the CF logs? Theoretically there is stuff getting generated for it in like
cfclasses
or a similar location, which you could try looking at, to see what's being generated. (I used to know the exact spots but it's been a while.)
a
yea, I cleared the cfclasses folder and I can see after running again, it created some class files
d
if you've got an editor plugin that converts classes to java you can try seeing if there's anything in there that catches your eye, maybe it only stores the bytecode versus the generated java… but also maybe troubleshooting the extra arguments will give a clue
for the extra arguments, you should be able to inspect the request, and see exactly what is being sent across the wire
Both IIS and CF have logging, so as long as you control both ends, it shouldn't be too difficult to verify
a
strange... seems when I add ?wsdl it doesn't log it in the IIS log file... I can see any other request in the file as soon as I request it... but if I call it with ?wsdl it doesn't log anything
d
Wonder if it's the age-old virus protection type deal getting in the way?
Maybe some filters that are triggering for security, basically?
a
Idk... it worked last week
j
To validate you're hitting the correct endpoint, try breaking it to see if it fails. Once I was spending half a day trying to figure something out and realized I was on the wrong server. Only when I made a breaking change (invalid CFML [missing </cfif>]) did I realize it.
💯 1
😀 1
a
yea, if I rename the cfc file I get a 404
j
ugh - dang.
d
does a cfabort with a dump show up too?
Oh I guess you were changing the arguments and that was changing the errors, neh?
a
nothing I change in the file will change the wsdl displaying
and it's not related to this one wsdl... there is another we have that hasn't been modified in over a year and the wsdl won't load for that either
but one of my developers they both work on her machine
it's something with my machine (laptop and desktop) it seems
d
Have you tried a different browser? 😄
(I'm only half-joking)
a
yes, lol
I was thinking maybe Chrome did something
j
Check out HTTPie - great UI tool for testing your endpoints and has a free Desktop version
a
well, I tried FF earlier... I just decided to try IE (I literally never use it) and it works in IE
🎉 1
I think I know why... IE isn't redirecting to https... Chrome and FF are even though I took the http -> https redirect out of the web.config files
j
eliminate the browser - https://httpie.io/
👍 2
d
there's some site cookies that prevent you from switching back to http once you've done https for security reasons
a
ah, I always thought just removing the redirect in IIS/web.config was enough... so that solves the wsdl problem at least... thanks for the help 🙂
that httpie works great too
🙌 1
j
Actually i think that's HSTS http header directive - once that header is received, browser will always only connect to HTTPS
👍 2
a
I still get the strange axis2 error on that particular function
🤔 1
d
you should [somehow] be able to look at the xml for the call and see what exactly it's sending fwiw
a
well, I mean, in Postman or SoapUI, I can see exactly what is being passed to the web service, but for some reason the web service gives an array out of bounds error that seems to be based on the number of cfarguments are in the function
d
and now that you can see the wsdl, you can tell that it accepts the arguments you think it does?
a
yep
Copy code
<xs:element name="UpdateJob">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="JobID" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="ScheduledCutDate" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="ConfirmDate" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="MaterialAvailableDate" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="CADCompleteDate" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="UpdatedBy" type="xs:double"/>
<xs:element minOccurs="0" name="RemoteIP" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="EventID" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
so there are 4 dates... if I pass JobID, UpdatedBy and any of the 4 dates... it works exactly as expected... if I include 2 of the dates, an axis error occurs saying index 7 of 7 is out of bounds
d
Hmm that is pretty weird!
Could it be the way they are formatted somehow?
a
yea... and in production it works with all arguments
d
oh yeah, forgot that part, stranger and stranger 😄
a
yea, extremely odd
d
and you've cleared out the caches and whatnot already… what else is different from production/coworkers?
a
yes, tried clearing the cache. Not sure what else could be different from production. The majority of cf settings are the same. But on our official dev testing server everything was working fine all week until today. I think I'm giving up today. Maybe come back in the morning with a fresh look and it'll come to me.
d
Often that does the trick! Could it be some date logic that happens only when there is more than one date? I guess everyone would see the same behavior if that was the case.
a
Shouldn’t be. Because I commented out the whole body of the function so it doesn’t do anything. Just as a test.
d
Maybe a hotfix not applied?
Or applied, as the case may be? 😄
Same versions of Java?
a
On my local I updated to the latest update for cf2023 earlier. Thought about trying to update axis manually but not sure where to start with that plus IT probably won’t allow that in production.
I tried latest Java too. lol. I’ve been trying everything lol
d
Hmm, downgrading might be something to try when you're feeling fresh again, tho you'd probably know if the same update was already applied to dev and not prod.
a
Even more confusing... I came back after dinner and getting my kid to bed and ran the exact same request I had been running earlier and it worked perfectly fine. Which leads me to think it's something to do with the way the web service is being cached. I found this article and while I didn't need to do anything with it, I'm going to try some of these things tomorrow if the problem comes back. https://coldfusion.adobe.com/2019/06/may-need-refreshwsdl-calls-web-services/
d
Did it start working in dev too? Gotta love the intermittent problems — they build character, so to speak!
a
lol... so we have strange setup... we have a primary dev server which is usually reserved for anything committed to develop and planned for next release... then we have a few additional dev servers that are really more for UAT... on the uat servers and local sandboxes I was having those intermittent problems. We moved the code to the primary dev server and everything has worked as expected. The only differences I can see is the primary dev server has a publicly addressable IP and domain name and no requirements to be on the corp vpn. It also has it's own SSL and not a self-signed SSL. It seems like either of those have something to do with the intermittent problems I was having since everything seems fine on the main dev server. It's just uncommon for us to test code that hasn't been approved for the next release on that server, but in this case it seems it was necessary.
d
Ah, right on! (Big fan of UAT!) Yeah since it's dealing with XML and there are specs and stuff that get loaded via the network, things like that could be the cause or contributors!
a
it's always the little things that make things interesting lol
🎯 1