Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
umutonat committed Jul 29, 2020
1 parent 1771f2d commit 6347bd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion SCTransformation/ClientApplicationGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ private static string BuildJavaApplication(SmartContractDescriptor smartContract

foreach (var parameter in function.Outputs)
{
template.Add("outputparameterarray", new[] {parameter});
var privateParameter = new Parameter
{
FirstCapital = ToUpperFirstLetter(parameter.Name),
Name = parameter.Name,
ParamType = parameter.Type
};
template.Add("outputparameterarray", new[] {privateParameter});
}

controllerFunctions += template.Render();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@RequestMapping(value = "/query/€event.Name€", method = RequestMethod.POST, consumes = {MediaType.APPLICATION_JSON_VALUE\})
public List<Occurrence> query€event.FirstCapital€(@RequestBody QueryInput input) {
List<Parameter> parameters= new ArrayList<Parameter>(){
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.Type\"\}").build());\}};separator="\n"
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.ParamType\"\}").build());\}};separator="\n"
\};
return scipClientFunctions.performQuery(null,"€event.Name€",parameters,input.getFilter(),input.getTimeFrame());
\}
Expand All @@ -12,7 +12,7 @@
@RequestMapping(value = "/subscribe/€event.Name€", method = RequestMethod.POST, consumes = {MediaType.APPLICATION_JSON_VALUE\})
public Observable<SubscribeResponse> subscribe€event.FirstCapital€(@RequestBody SubscribeInput input) {
List<Parameter> parameters= new ArrayList<Parameter>(){
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.Type\"\}").build());\}};separator="\n"
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.ParamType\"\}").build());\}};separator="\n"
\};
return scipClientFunctions.performSubscribe(null,"€event.Name€",parameters,input.getFilter(),input.getCorrelationIdentifier(), input.getDegreeOfConfidence());
\}
Expand All @@ -21,7 +21,7 @@
@RequestMapping(value = "/unsubscribe/€event.Name€", method = RequestMethod.POST, consumes = {MediaType.APPLICATION_JSON_VALUE\})
public UnsubscribeResponse unsubscribe€event.FirstCapital€() {
List<Parameter> parameters= new ArrayList<Parameter>(){
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.Type\"\}").build());\}};separator="\n"
eventoutputparameterarray:{it|{add(new Parameter().builder().name("€it.Name€").type("{\"type\": \"€it.ParamType\"\}").build());\}};separator="\n"
\};
return scipClientFunctions.performUnsubscribe("€event.Name€",null,parameters,null);
\}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
inputparameterarray:{it|{add(Parameter.builder().name("€it.Name€").type("{\"type\": \"€it.ParamType\"\}").value(parameter.get€it.FirstCapital€()).build());\}};separator="\n"
\};
List<Parameter> outputParameters = new ArrayList<Parameter>(){
outputparameterarray:{it|{add(new Parameter().builder().name("€it.name").type("{\"type\": \"€it.type\"\}").build());\}};separator="\n"
outputparameterarray:{it|{add(new Parameter().builder().name("€it.Name").type("{\"type\": \"€it.ParamType\"\}").build());\}};separator="\n"
\};
return scipClientFunctions.performInvoke("€function.Name€",inputParameters,outputParameters,parameter.getDegreeOfConfidence()).get();
\}
Expand Down

0 comments on commit 6347bd9

Please sign in to comment.