Soap response with stripped end tag - soap

I have iPhone app that worked fine with SOAP and WSDL untill today. It suddenly started sending SOAP response with stripped end tag. for example
...../SOAP-ENV:Body></SOAP-ENV:Envelop
instead of
..../SOAP-ENV:Body></SOAP-ENV:Envelope>
Nothing have been changed from server. Any idea why i am getting this error

After spending 3 hours i got solution. Thought to share here if somebody else get this sort of problem.
It was due to weired characters. Windows automatically put some characters into soap file. So when it return response it counts no. of characters but because there are hidden BOM http://en.wikipedia.org/wiki/Byte_order_mark characters so it included them and sends actual response stripped.
So just find BOM and remove them and you will be fine
Thanks

Related

Issues Recreating Http Headers from an older application

I am having an issue uploading files to my server on a frontend rewrite I am working on.
I am getting an error response 500 "Premature end of script headers:" I have my headers recreated almost exactly the same as the legacy web app I am trying to recreate with two exceptions.
Backstory: I am recreating a Flash web application in Vue.js. I am using the exact same back end intact, it is Perl, cgi scripts, generally, I am able to use axios to talk to the backend scripts no problem.
Current Flash Frontend: When I upload a file with the current flash app my header looks like this.
Note the highlighted text at the bottom.
Replacement Vue Frontend: I see a couple differences with my new header, I don't have the Content-Type: application/octet-stream bit directly underneath the filedata part of the header. And the end of the header is "--" which is the convention, I am guessing the old application used some outdated header ending I can't find and doesn't know how to handle mine. Please help I could not find anything on the Google. I also note the new header has "WebKitFormBoundarys" not sure if that could cause an issue with some old header standards or something.
Issues were related to outdated Perl packages, once they were upgraded to backend script recognized the header correctly.

How do I make Websphere application server accept url without encoding (Issue only with IE)?

This is an issue only with IE as the browser is not doing the encoding part on it's own. The service has got two query parameters with values containing special characters and spaces. It works well with all browsers except IE. Getting a 400 bad request on IE

Apple Push Notification in Hebrew shows as '????????'

I have an iPhone app that gets push notifications from a Windows server as well as other data over HTTP, the data I get over HTTP looks good on the screen, but the push notification shows only questions marks, I tried encoding it as UTF-8, ASCII but still I get the question marks, my iPhone is configured to hebrew and i have a he.lproj file and no en file
does any one has an idea??
Got what was the bug, Im using a push notification server based on Moon-Apns and after checking in source code i found out that they are encoding the needed chars to UTF-8... but they dont use the string they encode to, they pass the original string to the apn, so i fixed it and now all is well, thank you all for trying to help me! if anyone need this fix ill be glad to point to it and give the code
It seems to me that your server side in encoding Hebrew incorrectly. Try to ensure that server response is correct. I had the same problem with Russian encoding, it was solved only when we set php response code to UTF-8 (not Latin1 as it was set by default).
Use nslog to see what data is receiving in pushnotification and appdelegate didreceive remote notification method, and if there is no data, then you have problem at server side that may be in correct parameter assigning to notification object
Make sure that the encoding on both the sending and receiving site is the same (e.g. UTF8).
For me specific help, your code is necessary.
If you are not able to print non-latin text with NSLog(), this question could probably help you.

UTF8 encoding problem, same results work fine in wordpress

I have a wordpress installation that clients can edit, all characters display ok. On the main homepage I query the same database for the same title and post content, but it doesn't display correctly - just a question mark
I have tried sending the utf8 headers manually, through htaccess and through meta tags. I have used SET name UTF8 (which turns the characters into the diamond symbol with a questionmark inside).
I genuinely cant figure out what it could be now and I really need these characters to display correctly.
Heres the homepage, you can see in the Sounddhism 6 preview that there are lots of question marks, if you click on it you will see what they are meant to look like
http://nottingham.subverb.net
I have passed it through the validator and it gives me this error:
Sorry, I am unable to validate this document because on line 373 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
The error was: utf8 "\xA0" does not map to Unicode
Which, i appreciate is supposed to help me, but I don't know what to do about it. Especially since that line, the letter generating the error is supposed to be a space and is AFTER the offending question marks.
Can anyone help?
Compare the encoding of both the back-end scripts in Wordpress and also your homepage script. If you're using IE, right-click the page and check the encoding. Sometimes it's set to "Auto-detect" and IE will often detect a different encoding for different pages, causing strange issues like this.
If you're not using IE, try using a tool like Fiddler to see exactly what encoding (and what bytes are being sent back and forth both in the back-end and your homepage script.
If forcing UTF-8 on your homepage script doesn't work, I would guess that the back-end is not using UTF-8.

iPhone "Web Site Error"

I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone. :P
The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit http://www.appvee.com/iphone/ads or http://www.appvee.com/iphone/latest for the XML files.
And a message box will show up with the following error messages:
"Web Site Error
Conversion of data failed. The file is not UTF-8, or in the encoding specified in XML header if XML.
"
Maybe I must add header("Content-type: text/xml"); at the beginning of the PHP files? I didn't add this line and it worked well before.
Any help is greatly appreciated.
I agree with ceejayoz, looks like this is a special characters issue.
I would suggest using the htmlentities method to encode the data in the xml file.
It might be the unescaped special character (looks like it's supposed to be a curly apostrophe) in the 'latest' XML. (in the line that goes "Find out information about what[THIS IS THE CHARACTER]s around you and how...")
Does adding an XML content type header resolve the issue? You ask it if's necessary but give no indication if it helps or not.