Finally I found a solution:
According to
this link we just have to use 'WebFaultException' which will change the http status. Now there is also a nice method to return the handled error :
Public Function TestMethod2(ByVal name As String) As String Implements IService.TestMethod2
If name = "" Then
Dim str As New ErrMessage
str.intErr = 1
str.strErrMessage = "bla bla bla"
Throw New WebFaultException(Of ErrMessage)(str, HttpStatusCode.BadRequest)
End If
Return name
End Function
Then the status will change and the returned object will be an error. Personally I prefer to return object error instead of anything else ...
Cheers :)