Portable Class Library Clients!​
The biggest feature of this release is the release of the new Portable Client NuGet packages:
- ServiceStack.Interfaces.Pcl
- PCL Profiles: iOS, Android, Windows8, .NET 4.5, Silverlight5, WP8
- ServiceStack.Client.Pcl
- PCL Profiles: iOS, Android, Windows8, .NET 4.5
- Custom builds: Silverlight 5
- ServiceStack.Text.Pcl
- PCL Profiles: iOS, Android, Windows8, .NET 4.5
- Custom builds: Silverlight 5
This now allows sharing binaries between the above platforms. To illustrate this a new Hello Repository was created to show how to use the same portable class libraries and DTO's across the different client platforms above.
Breaking Changes​
Adding PCL support to the client libraries involved a lot of internal re-factoring which caused a few external user-facing changes:
- The
IDbConnectionFactory
andIHasDbConnection
interfaces referencing System.Data was moved to ServiceStack.Common - Properties exposing the concrete
NameValueCollection
are now behind anINameValueCollection
interface - Dynamic classes like
DynamicJson
have been moved under theServiceStack
namespace
Improved SOAP Support​
For maximum compatibility with different SOAP clients, SOAP Exceptions are now treated as "Soft HTTP Errors" where exceptions
are automatically converted to a 200 OK but returns the original Status Code in the X-Status
HTTP Response header or X-Status
SOAP Header.
Errors can be detected by looking at the X-Status headers or by checking the ResponseStatus.ErrorCode property on the Response DTO. This is transparently handled in ServiceStack's built-in SoapClients which automatically converts Response Errors into populated C# WebServiceExceptions, retaining the same behavior of ServiceStack's other typed clients, as seen in WebServicesTests.
IHttpRequest.OperationName now reports the Request DTO name for SOAP requests as well, which it gets from the SOAPAction HTTP Header in SOAP 1.1 requests or the Action SOAP Header for SOAP 1.2 Requests.