Inmagic Forums
Inmagic Forums
Scripting
Client found response content type of text/html|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
Hello
I am having slight problems when using web references to connect to content server textbases via soap. The project builds fine but anything I try to run inside the page e.g. searching for records - it displays the following error "Client found response content type of 'text/html, but expected 'text/xml'. I am certain there is no problems with permissions or IIS as the project works fine on my work machine but not on my home machine. Thank you in advance. |
|||
|
Check the Version Properties on MSXML4.DLL on your home machine. If they say "MSXML 4.0 SP 2" you may need to follow the procedure in Support Knowledgebase article 2500.
|
||||
|
Hi Lisa
Thank you for your reply. In terms of the dll file, I have version SP1 on my machine and tried to update to a new version without any success. Some people who have had this error have mentioned that it could be the web config file and by removing it from the project, it may work, this has not worked either. Any other suggestions? |
||||
|
Have you verified that normal CS/WebPublisher PRO edit forms work correctly on your machine?
The sample CARS textbase has a "Prices (edit links)" form which has edit links. Clicking Submit on the resulting edit form may return a more informative message. If you get "XML document must have a top level element," check the bottom of the HTML source of the page. It may show the HTML message being returned. |
||||
|
I have tested the prices edit links form via localhost and finally I got it to update the records, at first it gave complained about the textbase needed write access and fixed that. Strange thing is at home it updates the records fine where as at work when I tested it, it gave me the "XML document must have a top level element" and when I checked view source it was returning xml but at home it is updating the records fine. This proves that writing to the textbase works but I still get that "client expecting xml..." error, how can I fix this error?
|
||||
|
Check the Version Properties on MSXML4.DLL on your work machine. If they say "MSXML 4.0 SP 2" you may need to follow the procedure in Support Knowledgebase article 2500. However, since you're using SOAP at work, if you don't need Web Edit to work at work, you may be able to stay at SP2.
Since Web Edit works at home, I'm afraid I'm at a loss as to why SOAP does not. Inmagic Genie uses SOAP and Inmagic Support has had reports of errors with Genie when using new firewall options in virus scanning software. They were able to resolve the conflict by changing settings in the virus scanning software. However, I'm not sure if the virus software didn't like SOAP or Microsoft .net or .aspx. I believe it involved passing the correct authentication through IIS. You can create an xmlinput.log file in the QSETS subdirectory. Once the file exists, WebPublisher PRO will write most XML input to this file. (Verify that it works using Web Edit, which will normally write the XML input to the file even if it returns the "XML document must have a top level element error", before you test your SOAP application.) This will let you see if the XML is getting to WebPublisher at least. If it is, I can send you a test HTML page which you can modify to include your Raw XML input and get Raw output back. |
||||
|
I've fixed it!!!!!!!
Basically all that was going wrong was the application mapping for the file extension .ICX in IIS. In the ICS-WPD virtual directory, by selecting configuration, you need to change the icx extension which points to the icswppro.dll (which I did when it still wasnt working), but you need to change Program Files to progra~1 in dos equivalent and also remove the quote marks and would you believe it, this stupid error took me 3/4 days to figure out, but anyway I'm glad its all fixed now Thanks for all your help anyway Lisa. Regards |
||||
|
I'm sorry. ICX mismappings are one of the most common problems I've seen with using SOAP. I've just never seen it manifest in quite the way you described.
Different versions of Windows require different methods of specifying the .ICX mapping. Some, as you experienced, require the DOS/short file name. Others require the long file name. And the operating system which requires one will not accept the other. |
||||
|
There is nothing to be sorry about Lisa, thank you for all your advice in trying to help me, very much appreciated.
|
||||
|
Hi Majid,
I am Ashok. I am facing same problem as ur's. When i access websevice method in the local system it works fine and when i access method in remote system i am getting error "Client found response content type of 'text/html, but expected 'text/xml'. I tried to follow u r approach to fix the problem but in IIS Virtual Directory --> Configuration --> App Mappings list i don't find any .icx extension. Any suggestion in this regard will help me to solve this problem as i am new to webservices. Thanks Ashok
|
||||
|
If you don't have .icx listed, you need to add it. It should point to the icswppro.dll file (assuming you're using CS/WebPublisher PRO and not DB/Text WebPublisher PRO, the latter uses .iwx and points to dbtwpub.dll).
Depending on your Windows version, you may need to use the short (c:\progra~1\inmagic\icsweb\exec\icswppro.dll) or long file name (c:\program files\inmagic\icsweb\icswppro.dll). If one doesn't work, try the other. The IIS Browse button doesn't seem to paste the correct value when you need to use the short file name. |
||||
|
Hi Ashok
Have you installed cs/web publisher as after the installation of web publisher, you will notice the icx extension is added into IIS. If you havent, then you will have no icx extension, thus you will be unable to connect via soap. Regards Majid |
||||
|
Ok, I had this same error using VS.Net 2005 to connect with a 3rd party vendor.
I was trying to send an XML message in a string. "Client found response content type of 'text/html', but expected 'text/xml'. The request failed with the error message:" That error was not really the problem. It was a generic message sent back to me because I was not actually passing my certificate along with me WebService message. They told me this. After looking into all sorts of ways to do this, including installing WSE 3.0, and messing with that for 4 hours, I finally found the solution without WSE. I had to install the cert. they sent me locally, then reference it in my code. I then had to add a Web Reference to my project using the https url they gave me. I also had to add a ?wsdl to the end of it before it actually connected (another 3 hours wasted)( https://3rdpartyvendor.com/ourservice.asmx?wsdl ) Now, with that referenced, it asked me to select my cert before it was added. That worked. Now, the code in C#. 3rdPartyVendorWS.CreateSessionService 3rdWS = new 3rdPartyVendorWS.CreateSessionService(); // xml to be sent StringBuilder sb = new StringBuilder(); sb.Append("<?xml version='1.0' encoding='UTF-8' ?>"); sb.Append("<smsrss:myXMLRequest xmlns:smsrss='http://blahblah.xsd'>"); sb.Append("<smsrss:UserId>myInputValue</smsrss:UserId>"); sb.Append("</smsrss:myXMLRequest>"); // create cert file System.Security.Cryptography.X509Certificates.X509Certificate certfile; certfile = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile("C:\\mycertfolder\\3rdPartyVendor.cer"); 3rdWS.ClientCertificates.Add(certfile); try { string yourresponse = 3rdWS .execute(sb.ToString()); } catch (Exception ex) { throw; } Good luck. |
||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Inmagic Forums
Inmagic Forums
Scripting
Client found response content type of text/html
