Thursday, March 14, 2013

SOAP Error on Encoding

If you are trying to get a web service operational and encounter errors similar to the following:


SOAPUI error:

The message could not be processed. This is most likely because the action 'http://tempuri.org/ISas9Users/GetSasUsers' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

SAS error:

ERROR: org.springframework.ws.client.WebServiceTransportException: Cannot process the message because the content type 'text/xml;

charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'. [415]

WCF Error: The caller was not authenticated by the service.
 
 
Make sure you use basicHttpBinding vs wsHttpBinding in your web.config if using WCF (which I am). 
 
 
Also, you may need to check your XML and make sure you have the encoding defined in the XML header:
 
 

SAS throwing RPC error

If you are doing code in C#  and get this error when creating a LanguageService: The RPC server is unavailable. (Exception from HRESULT:...