Hello,

 

I am trying to enable a web service for a portal user. When I try to trigger the service however, I receive a 500 Error. 

When I trigger the service using an internal user account, the service triggers with no issues. My test portal user however receives the error. To me that says portal users are unable to trigger a batch query but I've been unable to find anything that says it for sure. Is there a setting I need to adjust?

Like 0

Like

6 comments

Hello,



Please make sure that portal users have access to your web service.



More details on the academy website:



https://academy.creatio.com/docs/developer/application_components/porta…



https://academy.creatio.com/docs/developer/application_components/porta…

Cherednichenko Nikita,

I have followed the provided academy pages. Though when trying to compile, I receive the errors.

 

" The type or namespace name 'SspServiceAccess' could not be found (are you missing a using directive or an assembly reference?)"

 

"The type or namespace name 'SspServiceAccessAttribute' could not be found (are you missing a using directive or an assembly reference?)"

Try to generate source code for all schemas and run compilation again.

After generating source code for all schemas and compiling again, I am still receiving the same errors. Is there a namespace I am missing?

namespace Terrasoft.Configuration.KeenGlbInterviewService
{
	using System;
	using System.IO;
	using System.Collections.Specialized;
	using System.Globalization;
	using System.Runtime;
	using System.Runtime.Serialization;
	using System.ServiceModel;
	using System.ServiceModel.Web;
	using System.ServiceModel.Activation;
	using System.Threading;
	using System.Threading.Tasks;
	using System.Web;
	using Terrasoft.Core;
	using Terrasoft.Core.Factories;
	using Terrasoft.Configuration.GlbInterviewService;
	using Terrasoft.Web.Common;
    using Terrasoft.Web.Common.ServiceRouting;
 
	#region Class: KeenGlbInterviewService
 
	[DefaultServiceRoute] 
	[SspServiceRoute]
	[SspServiceAccess(nameof(BatchQuery))]
	[ServiceContract]
	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
	public class KeenGlbInterviewService : BaseService
	{
 
		#region Methods: Public
		private static readonly GlbInterviewService _baseService = new GlbInterviewService();
 
		[OperationContract]
		[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
		public InterviewServiceResponse Start(InterviewServiceRequest request)
		{
			return _baseService.Start(request); 
		}
 
		[OperationContract]
		[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
		public InterviewServiceResponse Complete(InterviewServiceRequest request)
		{
			return _baseService.Complete(request);
		}
 
		#endregion
 
	}
 
	#endregion
 }

 

Please see another community post:

https://community.creatio.com/questions/call-web-service



Perhaps there is an answer to your question.

Cherednichenko Nikita,

Thank you for the recommended page. However I have already looked through this page and it makes no mention of using SspServiceAccess which is the piece I'm having difficulty with.

Show all comments

Hello community!!

I need construct a batchquery but in one column is necesary constuct a string with the id of the object. How can call the id object in the insert?

 

var insert = Ext.create("Terrasoft.InsertQuery", {
		                        rootSchemaName: "Entity"
			                    });
insert.setParameterValue("EmailURL", "?entityid=" + //Need put the Id of object Entity//, this.Terrasoft.DataValueType.TEXT);
 
bq.add(insert);

 

Like 0

Like

2 comments

Dear Federico,

In order to use the Id of the entity you created, you need to specify this ID before creation.

You can generate new Id by using Terrasoft.generateGUID() method:

var newGuid = Terrasoft.generateGUID();
var insert = Ext.create("Terrasoft.InsertQuery", {
   rootSchemaName: "Entity"
});
insert.setParameterValue("Id", newGuid, Terrasoft.DataValueType.GUID);
insert.setParameterValue("EmailURL", "?entityid=" + newGuid, this.Terrasoft.DataValueType.TEXT);
 
bq.add(insert);

Regards,

Anastasia

Anastasia Botezat,

 



Is there a way to do Terrasoft.generateGUID(); in server side web service?

 

 

Show all comments