As the post name implies this error mostly caused by a syntax error in SAP system which publishes the related webservice. In that case just enter into ABAP Runtime Error transaction. There you will see a detailed explanation about your runtime error. Many reasons can cause syntax errors but as my experience you should mostly suspect about request transportation issues if you come up this error in a target SAP system lets say in Production environment.
Today i faced this issue and after working on it , i realized that although we have transported Service Definitions to production system , we had left some of dictionary objects in development system. For instance ,in my case Service Definition was created for a function group but one of function modules in that function group had not been transported to Production system and that has leaded to a syntax error.
In conclusion keep in mind that Service Definition objects which is referenced to a function group should be carefully transported to Production system as each function module in the group is required to be compatible with the corresponding operation of the Service Definition .