WSDL import issue with Delphi - web-services

I am trying to use the Reuters webservice and getting errors when I build a sample program to access the webservice. I am using Delphi 2010 and the wsdl is located at https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl.
After importing the WSDL the Interface is defined as:
ExtractionService = interface(IInvokable)
['{CD3DF44F-6D8E-C594-D58C-6A258701D678}']
// Headers: EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetVersion: VersionInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetInstrumentSearchTypes: ArrayOfInstrumentSearchTypeInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetInstrumentExtractionTypes: ArrayOfInstrumentExtractionTypeInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetLegalEntityExtractionTypes: ArrayOfLegalEntityExtractionTypeInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCounterpartyExtractionTypes: ArrayOfCounterpartyExtractionTypeInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetInstrumentIdentifierTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetLegalEntityIdentifierTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCounterpartyIdentifierTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetBondScheduleTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCoraxEvents: ArrayOfCoraxEventInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCoraxShareTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetInstrumentTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetSymbolCrossReferenceTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsPutCallTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsExerciseStylesTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsCurrencyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsExchangeTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFuturesAndOptionsStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesAssetCategoryTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesCurrencyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesDomicileTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesExchangeTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesFairValueIndicatorTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesGicsIndustryTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesInstrumentSubTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEquitiesStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpCurrencyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpCountryTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpIndustryTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpContributorTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpAssetStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpMoodyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpStandardPoorsTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpSubGroupTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetGovCorpSubGroupExtTypes: ArrayOfValueInfoSubvalue; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetUSMunicipalsAssetStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetUSMunicipalsMoodyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetUSMunicipalsStandardPoorsTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetUSMunicipalsStateTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetTimeseriesLookbackPeriodTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateTypes: ArrayOfEstimateTypeInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateDeltaDaysValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateHistoricalRelativeSemiAnnualValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateHistoricalRelativeQuarterValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateHistoricalRelativeFiscalYearValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateFutureRelativeSemiAnnualValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateFutureRelativeQuarterValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateFutureRelativeFiscalYearValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetEstimateCompanyTypeValues: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCmoAbsAssetStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCmoAbsSubGroupTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetCmoAbsSubGroupExtTypes: ArrayOfValueInfoSubvalue; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsAgencyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsAmortizationTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsAssetStatusTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsPoolTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsSecurityGroupTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetMbsSettleMonthTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFundAllocationTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFundsCurrencyTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetFundsDomicileTypes: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function GetComparisonOperators: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsSourceValues: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsNoveltyFields: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsNoveltyOperators: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsRelevanceOperators: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsSentimentValues: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsAnalyticsTopicCodes: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsItemsTopicCodes: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsItemsSourceValues: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetRatingsSourceValues: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetNewsItemsLanguages: ArrayOfValueInfo; stdcall;
// Headers: EjvServerHeader:pIn
function GetPremiumPricingTypes: ArrayOfValueInfo; stdcall;
function GetIssuerAssetClasses: ArrayOfValueInfo; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function Define(const request: DataDictionaryRequest): DataDictionaryResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function ValidateInstruments(const request: InstrumentValidationRequest): InstrumentValidationResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function ValidateLegalEntities(const request: LegalEntityValidationRequest): LegalEntityValidationResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function ValidateCounterparties(const request: CounterpartyValidationRequest): CounterpartyValidationResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function SearchInstruments(const request: InstrumentSearchRequest): InstrumentSearchResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function SearchLegalEntities(const request: LegalEntitySearchRequest): LegalEntitySearchResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function SearchCounterparties(const request: CounterpartySearchRequest): CounterpartySearchResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function Extract(const request: ExtractionRequest): ExtractionResponse; stdcall;
// Headers: CredentialsHeader:pInOut, EjvServerHeader:pIn, OperationInfoHeader:pOut
function ReportUsage(const request: UsageRequest): UsageResponse; stdcall;
end;
The initialization defined below, seems to be defined correctly but I get an error whenever it references the ExtractionService as if the import has not defined the IInvokable interface correctly but I cant see what is not correct. The first error shows (E2089 Invalid typecast) on the registerinterface line against the Typeinfo(ExtractionService) and additional errors are displayed whenever the ExtractionService is referenced.
initialization
InvRegistry.RegisterInterface(TypeInfo(ExtractionService), 'http://reuters.com/datascopeselect/ExtractionService/v1/', 'UTF-8');
InvRegistry.RegisterAllSOAPActions(TypeInfo(ExtractionService), '|http://reuters.com/datascopeselect/ExtractionService/v1/GetVersion'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetInstrumentSearchTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetInstrumentExtractionTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetLegalEntityExtractionTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCounterpartyExtractionTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetInstrumentIdentifierTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetLegalEntityIdentifierTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCounterpartyIdentifierTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetBondScheduleTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCoraxEvents'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCoraxShareTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetInstrumentTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetSymbolCrossReferenceTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsPutCallTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsExerciseStylesTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsCurrencyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsExchangeTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFuturesAndOptionsStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitiesAssetCategoryTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesCurrencyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesDomicileTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesExchangeTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesFairValueIndicatorTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesGicsIndustryTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesInstrumentSubTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEquitesStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpCurrencyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpCountryTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpIndustryTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpContributorTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpAssetStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpMoodyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpStandardPoorsTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpSubGroupTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetGovCorpSubGroupExtTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetUSMunicipalsAssetStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetUSMunicipalsMoodyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetUSMunicipalsStandardPoorsTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetUSMunicipalsStateTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetTimeseriesLookbackPeriodTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateDeltaDaysValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateHistoricalRelativeSemiAnnualValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateHistoricalRelativeQuarterValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateHistoricalRelativeFiscalYearValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateFutureRelativeSemiAnnualValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateFutureRelativeQuarterValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateFutureRelativeFiscalYearValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetEstimateCompanyTypeValues'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCmoAbsAssetStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCmoAbsSubGroupTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetCmoAbsSubGroupExtTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsAgencyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsAmortizationTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsAssetStatusTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsPoolTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsSecurityGroupTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetMbsSettleMonthTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFundAllocationTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFundsCurrencyTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetFundsDomicileTypes'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/GetComparisonOperators'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/Define'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/ValidateInstruments'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/ValidateLegalEntities'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/ValidateCounterparties'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/SearchInstruments'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/SearchLegalEntities'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/SearchCounterparties'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/Extract'
+'|http://reuters.com/datascopeselect/ExtractionService/v1/ReportUsage'
);
InvRegistry.RegisterInvokeOptions(TypeInfo(ExtractionService), ioDocument);
InvRegistry.RegisterInvokeOptions(TypeInfo(ExtractionService), ioSOAP12);
InvRegistry.RegisterHeaderClass(TypeInfo(ExtractionService), EjvServerHeader2, 'EjvServerHeader', 'http://reuters.com/datascopeselect/ExtractionService/v1/');
InvRegistry.RegisterHeaderClass(TypeInfo(ExtractionService), OperationInfoHeader2, 'OperationInfoHeader', 'http://reuters.com/datascopeselect/ExtractionService/v1/');
InvRegistry.RegisterHeaderClass(TypeInfo(ExtractionService), CredentialsHeader2, 'CredentialsHeader', 'http://reuters.com/datascopeselect/ExtractionService/v1/');
Any help would be greatly appreciated....

TypeInfo is a function in System unit.
i've checked my application that use wsdl, the TypeInfo is used from System unit as a function. Please try refactoring the TypeInfo class that was generated by Delphi in your code or add System unit name to all TypeInfo castings to make it a function from System unit.
InvRegistry.RegisterInterface(TypeInfo(ExtractionService), 'http://reuters.com/datascopeselect/ExtractionService/v1/', 'UTF-8');
change it like this.
InvRegistry.RegisterInterface(System.TypeInfo(ExtractionService), 'http://reuters.com/datascopeselect/ExtractionService/v1/', 'UTF-8');
I've tried second way and successfuly compiled.

Related

Postman pre-request script oder - does not run the requests in the order I expect

Total postman noob. I have a script (well I don't I am trying to) to do the drudge tasks of authentication and authorization which takes 2 requests:
console.log("START");
var authenticationToken;
// Identity token
var authenticationTokenRequest = {
url: 'xxxx',
method: 'POST',
timeout: 0,
header: {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic xxxxx="
},
body: {
mode: 'urlencoded',
urlencoded: [
{key: "grant_type", value: "password"},
{key:"username", value: "xxxxx"},
{key:"password", value: "xxxx"},
]}
};
pm.sendRequest(authenticationTokenRequest, function (err, res) {
**console.log("01 send first request body");**
var responseJson = res.json();
console.log(responseJson);
pm.environment.set('ACCESS_TOKEN', responseJson['access_token']);
authenticationToken = responseJson['access_token'];
});
**console.log("Authentication token local var: " + authenticationToken);
console.log("Authorization token env var: " + pm.environment.get('ACCESS_TOKEN'));**
var authorizationTokenRequest = {
url: "xxxx",
method: "POST",
header: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authenticationToken,
"Accept": "application/xxx+json"
},
body:{
tenantId: "xxx",
deviceId: "xxx"
}
}
pm.sendRequest(authorizationTokenRequest, function (err, res) {
**console.log("02 second request call");**
var responseJson = res.json();
pm.environment.set('ACCESS_TOKEN', responseJson['access_token']);
});
//
When I run this and look at the console, the console messages of the local vars show undefined. The console message for the second request shows in console before the first request. The second request depends on a value from the first.
What am I doing wrong? Thanks

Update empty field to contain value - rest API

So I have a snippet of code that will update a field value if the field has content, although if the field that I'm trying to update is null than the value won't update. Am I doing something wrong?
siteURL = _spPageContextInfo.webAbsoluteUrl;
var apiPath = _spPageContextInfo.webAbsoluteUrl +"/_api/lists/getbytitle('Training%20Copy')/items/getbyid(9)";
$.ajax({
url: apiPath,
type: "POST",
headers: {
Accept: "application/json;odata=verbose"
},
data: JSON.stringify
({
__metadata:
{
type: "SP.Data.Training_x0020_CopyItem"
},
Admin_x0020_Function: "Have content"
}),
headers: {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
async: false, success: function(data) {
console.log("Item updated successfully");
}, eror: function(data) {
console.log("An error occurred. Please try again.");
}
})
There are two headers parameters in your ajax request, it is not clear whether it will affect.
My test code for your reference:
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
Update()
function Update(){
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Doc')/items(9)",
type: "POST",
headers: {
"accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"content-Type": "application/json;odata=verbose",
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
data: JSON.stringify({__metadata:{'type':'SP.Data.DocItem'},test:'test'}),
/*where Title is column name and add your desired new data*/
success: function(data) {
console.log(data);
},
error: function(error) {
alert(JSON.stringify(error));
}
});
}
})
</script>

How to pass List<int> to kendo grid read()

I just want to pass list of integer values to read() method.
used "parameterMap" to map parameter. also tried to set data object.
transport: {
read: {
url:
"#Url.HttpRouteUrl("ActionApi", new {controller = "Regions",action = "GetByCountries" })",
//dataType: "json",
contentType: "application/json; charset=utf-8"
},
parameterMap: function (options, operation) {
debugger;
if (operation === "read") {
return { countries: selectedCountries};
}
}
},
my Controller like bellow
[System.Web.Http.ActionName("GetByCountries")]
[System.Web.Http.HttpGet]
public List<Region> GetByCountries(List<int> countries)
{
return new RegionMgt().GetByCountries(countries).ToList());
}
gives null value for countries parameter.
This Work for me :)
transport: {
read: function(options) {
$.ajax({
type: "POST",
url: "#Url.HttpRouteUrl("ActionApi", new { controller = "Regions", action = "GetByCountries" })",
data: JSON.stringify(selectedCountries),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
options.success(result);
}
});
}
},
Hope anyone help...!

sendRequest does not seem to use Headers values I specify in the Test

I'm using sendRequest function to send a 2nd request as part of the Test for my 1st request. But it seems that sendRequest does not use the Headers I specify in the function. Any ideas why and how to fix it?
Here is part of my Test, that sends 2nd request:
var runHost = pm.environment.get("MyHost");
var runToken = pm.environment.get("Token");
pm.sendRequest({
url: runHost,
method: 'PUT',
headers: {
"Authorization": "Auth "+runToken,
"Accept": "application/json",
"Content-Type": "application/json"
},
body: {
mode: 'raw',
raw: JSON.stringify(jsonData)
}
}, (err, res) => {
console.log(res);
});
Here is what I see as an actual Request Headers sent (what I see in Console):
PUT https://some_url
Request Headers:
Content-Type:"text/plain"
User-Agent:"PostmanRuntime/7.15.2"
Accept:"*/*"
Cache-Control:"no-cache"
Postman-Token:"5e3543c-1ww0-dfc4-bert-92ba9a455667"
Host:"my_host"
Accept-Encoding:"gzip, deflate"
Content-Length:1876
Connection:"keep-alive"
I expect Request Headers to have the following attributes and values:
Authorization:"Auth current_token_value"
Accept:"application/json"
Content-Type:"application/json"
...
The key for the object that contains the Request Headers should be header, like in the example below:
pm.sendRequest({
url: runHost,
method: 'PUT',
*header*: {
"Authorization": "Auth "+runToken,
"Accept": "application/json",
"Content-Type": "application/json"
},
body: {
mode: 'raw',
raw: JSON.stringify(jsonData)
}
}, (err, res) => {
console.log(res);
});

Error when returning from jQuery Ajax call

I have this in my web service;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello Worlds";
}
}
And this as my jQuery;
$(document).ready(function () {
$.support.cors = true;
$.ajax({
type: "POST",
url: "http://localhost:61614/Service1.asmx/HelloWorld",
data: "{}",
dataType: "json",
success: function (msg) {
alert(0);
alert(msg);
}, error: function (a,b,c) { alert(c); }
});
});
When I run, my breakpoint in the web service fires and I return "Hello Worlds".
However, on return back to the jQuery I drop into the error function. Safari simply alerts an empty string and IE alerts "No Transport".
Can anyone see what I'm doing wrong?
You also need to add ScriptMethod attribute:
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
[WebMethod]
public string HelloWorld()
{
return "Hello Worlds";
}
Also, you need to specify contentType in your ajax call:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "http://localhost:61614/Service1.asmx/HelloWorld",
data: "{}",
dataType: "json",
...
Also, a good article on the topic: Here.