Coldfusion web service premature end of file




















Ahh - that's a great post. I'm working on integrating an external java api that returns xml and I've been getting this error, but inconsistently. In other words, it pops up with certain resultsets from our data, not xml and doesn't with others. I'll still give it a shot using Ben's regexp and see if that fixes it. If not, it's gotta be some other bad data. Will keep y'all updated though. Yes it is through SSL. I did read your post and it is very similar to the setup that I'm working with.

That was the first thing I set up before doing anything else. I'm still working on diagnosing the problem with xmlParse that I'm having. Should have a solution sometime tomorrow. Update: Ben's ReReplace worked for the part that I was having trouble with. But I ran into another, similar, yet not so similar issue.

This time, I'm consuming another webservice using cfhttp get, and when output the FileContent using the loop, instead of the special character, I have a long string of error message like "System.

Services yada yada". So I went ahead and tried this:. Oh and btw, I could've done the regexp different but that is my level of regexp knowledge. I wonder where that error is coming from. After you remove it, are you left with XML? Ben's solution to strip the BOM worked just fine.

I was having issues with another webservice. There is no trace to a document and line number, so I'm just randomly looking through the application trying to find out what the heck went wrong. I'm on hour 4 right now; gonna take a quick break and then get right back on it. Sometimes you just gotta distance yourself when you've been bashing your head against the wall for too long.

Hi Ben, I have also faced the same problem but after using Replace function it shows an error:Premature end of file. This was being caused by a fraud setting in the ColdFusion administrator. Once disabled, I had no problems. I am calling the coldfusion webservice from the flash file.

I used Rereplace and error is out, but got Premature end of file. Webservice accepts XMl as input. In the coldfusion Webservice I got the error.

Also I see there are no bad characters in the received XMl. Ben, Thanks for the post. I have a fix around this issue. I see the issue with the input XML. This made the XMLParse giving an error. But it is a temporary solution. From flash need to send a clean XML as an input. For that in flash used a property called xmlSpecialCharsFilter and it worked. Now no issues with webservices. If I send the url without the? I am not sure why that is happening. In an XML setting, a premature end of file error might indicate that there is an open tag missing a related close tag?

I am not sure. I have only heard of this feature, but I have never really looked into it myself. Do you have to send it as part of the query string? It might be much easier to encode the request in that way. I used your example to loop through the xml reponse data and, whereas your example has leading data such as [] - , mine has [] - 32 at the end!

I'm getting the same error as described above. Ok, we have been using CF8 and accessing a middleware webservice with the createObject call successfully for quite some time. Is there a way to ignore the BOM using the createObject call? Content is not allowed in prolog".

Responseheader struct [empty] Statuscode Connection Failure. Status code unavailable. Text YES. I am not sure if it is a Firewall or proxy change issue. Can you please assist me in this regard. Thanks in advance. Light Dark. This will fail because we are not passing any of the require information, but at least it will return an XML result error message that we can then use.

Be sure to Trim the content to get rid of any white space. PaulH, Interesting point. I guess this is some sort of bug, if this is following standards. Shayne, It's funny that you bring that up cause as I was writing the RegEx, that thought did pop into my mind, but I ignored it. Also, RegEx Coach rocks : I have it in my quick-launch at all times. Eric Apr 22, at PM 7 Comments. Ben, you are wicked smart. David, Thanks : To be honest, I don't even know that much about encoding at all.

Thanks for the post. Thilo, I can confirm that my example in the post above was done in ColdFusion 8. Thilo, I can test tomorrow using Ben's example. I'll let you know what I find out. Thilo, This error also occurs on CF8 version: 8,0,0, I'm not sure there's a need to get hostile, but maybe I'm reading too much into it. Chris May 13, at AM 1 Comments. Javi, Glad you both got and contributed some value here : Sweeet. Thanks Ben!

Ben thanks, and like the other guy said you are wicked smart! I hope we can chat sometime. I've been banging my head against the wall with this prolog issue the past few days. Just came across this issue myself, thanks for the blog post :. Bret Jul 6, at PM 11 Comments. Ben, I am running across similar.

I think this is isolated to CF7, but not sure. Any ideas on this would be helpful. Fun stuff. Are you supposed to just invoke once? Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 5 months ago. Active 5 months ago. Viewed 83 times. Here is the test service hello. Dan Bracuk Charlotte Williams Charlotte Williams 23 4 4 bronze badges. What's the error message you're getting? This allows the caller aka consumer to interface with the web service. The method for doing this will depend on the platform consuming the web service. One of the best things about XML is that it can be transformed into any language the consumer wishes.

ColdFusion Web Services.



0コメント

  • 1000 / 1000