0
votes

I'm using VS2012 and ServiceStack 4.0.46. I have setup a web service which is working as expected. I now need to setup a second web service which makes calls to the first one.

In my second web service I have tried to add a ServiceStack reference to the first service. This mostly works however in the file created I get

/* Options:
Date: 2015-11-11 09:25:20
Version: 4.046
BaseUrl: http://nlc20030:8008/api

//GlobalNamespace: 
//MakePartial: True
//MakeVirtual: True
//MakeDataContractsExtensible: False
//AddReturnMarker: True
//AddDescriptionAsComments: True
//AddDataContractAttributes: False
//AddIndexesToDataMembers: False
//AddGeneratedCodeAttributes: False
//AddResponseStatus: False
//AddImplicitVersion: 
//InitializeCollections: True
//IncludeTypes: 
//ExcludeTypes: 
//AddDefaultXmlNamespace: http://schemas.servicestack.net/types
*/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using NLC.Library;
using Waste.Collection;
using Wards;
using Syndication.RSS;
using AbandonedVehicle;
using Search.Address;
using Waste.Collection.Asbestos;
using Waste.Collection.Asbestos.SinceDate;
using Waste.Collection.Bulky;
using Waste.Collection.Bulky.SinceApril;
using Waste.Collection.Bulky.SinceDate;
using Calendar.BinCollection;
using Calendar;
using Search.Civica.Client;
using Search.Civica;
using Dog.Fouling.Cleanse;
using Waste.Litter.Cleanse;
using Search.Confirm;
using CrossSystem;
using Dog;
using DateInfo.English;
using Encrypt;
using Flytipping;
using ;
using Dog.Fouling.Investigate;
using Waste.Litter.Investigate;
using IsValid.NINO.ECS;
using IsValid.NASS;
using IsValid.NINO;
using IsValid;
using IsValid.PostCode;
using IsValid.UPRN;
using IsValid.USRN;
using Job;
using Job.Recent;
using Light;
using LLPG;
using LLPG.Property;
using Requests;
using Noise;
using Odour;
using VictoriaForms;
using Waste.PrivateProperty;
using Encrypt.RC4.Hex;
using Encrypt.RC4;
using Search;
using Smoke;
using SOA.Call.Environment;
using SOA.Call.Environment.Operations;
using SOA.Call.Environment.Operations.System.IsError;
using SOA.Call.Environment.Operation.System.IsError.StartRecord;
using SOA.Call.Environment.Operations.System;
using SOA.Message;
using SOA;
using Search.Street;
using Waste.Collection.Tomorrow.Feed;
using Waste.Collections.Tomorrow;

It's the

using ; 

line which is causing me issues

I've checked the DTO's in my original web service and there appears to be nothing that is out of order. If I delete the line above, it reappears when I save the file.

I've clearly done something wrong but am unsure how to figure out what

1
You've not provided any details on what could be causing the issue, so there's no chance anyone can identify the issue either. Can you at least post the start of the generated DTO's showing the header options and all the namespaces.mythz
Hi Mythz, thanks for your quick response. I've edited the question and hopefully now have included enough information.Steve

1 Answers

1
votes

After some investigation I have discovered the root cause of this issue, it was, as I originally suspected, my fault. I tracked it down to one particular Service and it turned out that the get method was using the wrong class, which happened to have the same name, as the intended request DTO.

So I had

Public Class HonorificService
    Inherits ServiceStack.Service

    Public Function [Get](request As Honorific) As Object

When I should have had

Public Class HonorificsService
    Inherits ServiceStack.Service

    Public Function [Get](request As Lookups.Honorific) As Object