Fiddler has detected a protocol violation in session. Content-Length mismatch: Response Header claimed 292 bytes, but server sent 293 bytes.
It errors on each call to the webservice due to the response size it returns. I have access to the both the webservice (http://gator1122.hostgator.com/~soptions/demo/administrator/components/com_vm_soa/services/VM_CategoriesService.php?WSDL)
When I add a product with the following code (I realise password is showing, this is okay, as it is a demo开发者_开发百科 database).
VM_Categories_ws.VM_Categories proxy = new VM_Categories_ws.VM_Categories();
VM_Categories_ws.loginInfo logindetails = new VM_Categories_ws.loginInfo();
logindetails.login = "admin";
logindetails.password = "password";
VM_Categories_ws.AddCategoryInput categoryInput = new VM_Categories_ws.AddCategoryInput();
category.name= "13";
category.description = "test";
category.category_flypage = null;
category.category_browsepage = "browse_1";
category.category_publish = "Y";
categoryInput.loginInfo = logindetails;
categoryInput.category = category;
proxy.AddCategory(categoryInput);
I have access to both the webservice and C# client, but can't get them to work together.
This may be due to '\r\n' sent instead of '\n'. One extra byte which is a non-printable character.
Check if your web service is calculating the content length from the actual byte array sent and not the length of the output string, specially when sending Unicode characters since those use more than one byte. When using strictly ASCII, the content length is usually the same as the string length because each character uses one byte. That's not the case with Unicode.
If you can't override the calculation, then you have to escape the Unicode characters.
精彩评论