Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[GRAPHDB-484] improvements and fixes related to tests

  • Loading branch information...
commit 2f8da039f0c20fdae9b0a6313d999fd50d44e74b 1 parent 33a0d03
Markus Zorn authored
View
6,314 Applications/TagExampleWithGraphMappingFramework/some.wsdl
6,314 additions, 0 deletions not shown
View
23 GraphDS/Client/Implementations/GraphDSRemoteClient/ErrorHandling/RemoteException.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using sones.Library.ErrorHandling;
+
+namespace sones.GraphDS.GraphDSRemoteClient.ErrorHandling
+{
+ public class RemoteException : ASonesException
+ {
+ private String _msg;
+
+ public RemoteException(String myMessage)
+ {
+ _msg = myMessage;
+ }
+
+ public override string Message
+ {
+ get { return _msg; }
+ }
+ }
+}
View
1  GraphDS/Client/Implementations/GraphDSRemoteClient/GraphDSRemoteClient.csproj
@@ -43,6 +43,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ConvertHelper.cs" />
+ <Compile Include="ErrorHandling\RemoteException.cs" />
<Compile Include="GraphDS_RemoteClient.cs" />
<Compile Include="GraphElements\ARemoteBaseType.cs" />
<Compile Include="GraphElements\ARemoteEdge.cs" />
View
1  GraphDS/Client/Implementations/GraphDSRemoteClient/GraphDS_RemoteClient.cs
@@ -17,6 +17,7 @@
using sones.Library.PropertyHyperGraph;
using System.ServiceModel.Description;
using System.Xml;
+using sones.GraphDS.GraphDSRemoteClient.ErrorHandling;
namespace sones.GraphDS.GraphDSRemoteClient
{
View
16 GraphDS/Client/Implementations/GraphDSRemoteClient/StubExtensions/QueryResult/ServiceQueryResult.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using sones.GraphQL.Result;
+using sones.GraphDS.GraphDSRemoteClient.ErrorHandling;
namespace sones.GraphDS.GraphDSRemoteClient.sonesGraphDSRemoteAPI
{
@@ -11,11 +12,22 @@ public partial class ServiceQueryResult
internal QueryResult ToQueryResult(IServiceToken myServiceToken)
{
ResultType type;
- if(this.TypeOfResult == ServiceResultType.Successful)
+ if (this.TypeOfResult == ServiceResultType.Successful)
+ {
type = ResultType.Successful;
+ }
else
+ {
type = ResultType.Failed;
- return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)));
+ }
+ if (!String.IsNullOrEmpty(this.Error))
+ {
+ return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), new RemoteException(this.Error));
+ }
+ else
+ {
+ return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)));
+ }
}
}
}
View
9 Plugins/GraphDS/Services/Implementations/RemoteAPIService/DataContracts/QueryResult/ServiceQueryResult.cs
@@ -27,6 +27,7 @@
using sones.GraphDS.Services.RemoteAPIService.DataContracts.InstanceObjects;
using sones.GraphDS.Services.RemoteAPIService.DataContracts.ServiceTypeManagement;
using sones.GraphDB.TypeSystem;
+using sones.Library.ErrorHandling;
namespace sones.GraphDS.Services.RemoteAPIService.DataContracts.QueryResult
{
@@ -38,11 +39,9 @@ public ServiceQueryResult(sones.GraphQL.Result.QueryResult myQueryResult)
{
this.Duration = myQueryResult.Duration;
if (myQueryResult.Error != null)
- if (myQueryResult.Error.Message != null)
- this.Error = myQueryResult.Error.Message;
- else
- this.Error = myQueryResult.Error.InnerException.Message;
-
+ this.Error = myQueryResult.Error.Message;
+ else
+ this.Error = null;
this.NameOfQueryLanguage = myQueryResult.NameOfQuerylanguage;
this.NumberOfAffectedVertices = myQueryResult.NumberOfAffectedVertices;
this.Query = myQueryResult.Query;
Please sign in to comment.
Something went wrong with that request. Please try again.