I have service 1 and service 2
Service 2 is configure with:
Container.Register<IServiceGateway>(c =>
new JsonServiceClient("http://localhost:5000"));
So in my Interface project of service 2, I use Add ServiceStack Reference and point to my Service 1
All good… Except When I start my service 2, now In my metadata it’s seem that I can call all my request from service 1.
My service look like:
using ServiceStack;
using ServiceStack.OrmLite;
using SSRabbit2.ServiceModel.Person.Request;
using SSRabbit2.ServiceModel.Person.Response;
using SSRabbit2.ServiceModel.Person.Types;
using SSRabbit.ServiceModel.Addresse.Request;
using SSRabbit2.ServiceModel.Person;
namespace SSRabbit2.ServiceInterface.Person
{
public class PersonServices : Service
{
public object Get(CustomersRequest request)
{
var result = Db.LoadSingleById<Customer>(request.Id);
if (result is null)
{
throw HttpError.NotFound("Customer");
}
var response = new CustomersResponse { Customer = result};
if (result.AddressId.HasValue)
{
//csharp-ref http://localhost:5000 Address or Add ServiceStack Reference
var addr = Gateway.Send(new AddressesRequest { Id = result.AddressId.Value });
response.Address = addr.Adresses.ConvertTo<Address>();
}
return response;
}
}
}
The funny thing, AddressesRequest is not listed and that’s the one I use from CustomersRequest:
When I import my Service in PostMan the Circle one does not belong to Service 2
Anyway to Exclude the circle one ?