Access denied (iRc=-69) | Community
Skip to main content
New Participant
September 13, 2017
Solved

Access denied (iRc=-69)

  • September 13, 2017
  • 16 replies
  • 10340 views

HI

I am trying to test the SOAP api to do a delivery. I am able to get the session token correctly ( authenticated). When I try to use the session token to do an external call to delivery ( using nms:delivery wsdl) I get access denied error ( iRc= -69).

Any help is appreciated

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ddphotoFr

Here a full working API call based on default template:

<?xml version='1.0'?>

<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='urn:xtk:queryDef' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'><SOAP-ENV:Body>

<urn:SubmitDelivery xmlns='urn:nms:delivery' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>

<urn:__sessiontoken xsi:type='xsd:string'></urn:__sessiontoken>

<urn:strScenarioName>mail</urn:strScenarioName>

<urn:elemContent>

<delivery xtkschema="nms:delivery">

  <scheduling validationMode="auto" />

  <targets >

    <deliveryTarget>

      <targetPart>

        <where filteringSchema="nms:recipient">

          <condition expr="@email = 'recipient@domain.com'"/>

        </where>

      </targetPart>

    </deliveryTarget>

  </targets >

  <content>

    <html><source>

<![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD>

</HEAD>

<BODY>foobar</BODY></HTML>

]]></source>

    </html>

  </content>

  <mailParameters mirrorPagePolicy="default" needMirrorPage="0" useDefaultErrorAddress="true">

    <subject><![CDATA[Hello world]]></subject>

    <senderName><![CDATA[]]></senderName>

    <senderAddress><![CDATA[no-reply@domain.com]]></senderAddress>

    <replyAddress><![CDATA[no-reply@domain.com]]></replyAddress>

    <replyName><![CDATA[]]></replyName>

  </mailParameters>

</delivery>

</urn:elemContent>

</urn:SubmitDelivery>

</SP-ENV:Body></SOAP-ENV:Envelope>

This API call send an email to an existing recipient (based on email filtering condition - line 13)

I've also forced to automatic validation do directly start the delivery (not just the analysis) - see line 8

Line 28, i set the subject and following lines, i have added some mandatory field such as the sender & reply addresses

If you have any error, please check in UI to see what is the error.

Damien senderAddress

16 replies

New Participant
September 14, 2017

HI

I created a deliver template called testdelivery. now I get the below error. not sure why is complaining for the template.Also configuring for external source where I can do that?

What I am trying to perform is using the soap service to send emails by passing content to it. I got the nms:delivery WSDL and trying to use SubmitDelivery. can I do the same thing from the message center through APi?

<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Body>

      <SOAP-ENV:Fault>

         <faultcode>SOAP-ENV:Server</faultcode>

         <faultstring xsi:type="xsd:string">Error while executing the method 'SubmitDelivery' of service 'nms:delivery'.</faultstring>

         <detail xsi:type="xsd:string">The file '/usr/local/neolane/nl6/datakit/urn/eng/schema/delivery.xml' does not exist on the server. Unable to load the document of identifier 'urn:delivery' and type 'xtk:schema'.

Failed to analyze delivery (identifier '11193940').</detail>

      </SOAP-ENV:Fault>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Employee
September 14, 2017

Do you have any existing delivery template named "test" pre-configured to use an external source?

What are you trying to perform?

It looks like a message center use case, using this, it will be simpler.

Damien

New Participant
September 14, 2017

thanks for the response. now that the access denied has been resolved I get SQL error. I am just trying to test the delivery using SOAP following the documentation. any idea what I am missing here? can someone provide with sample request to send soap delivery?

<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Body>

      <SOAP-ENV:Fault>

         <faultcode>SOAP-ENV:Server</faultcode>

         <faultstring xsi:type="xsd:string">Error while executing the method 'SubmitDelivery' of service 'nms:delivery'.</faultstring>

         <detail xsi:type="xsd:string">SQL statement 'SELECT   D0.iDeliveryId, D0.sLabel, D0.sDesc, D0.sInternalName, D0.tsStart, D0.tsEnd, D0.iStatus, D0.sJobType, D0.sXtkschema, D0.iBuiltIn, D0.iIsModel, SecondsDiff(Coalesce(D0.tsEnd , GetDate()) , D0.tsStart), D0.iFolderId, D0.iFolderProcessId, D0.iCreatedById, D0.iModifiedById, D0.tsCreated, D0.tsLastModified, D0.iFCPOrSeedCount, D0.iMidRemoteId, D0.tsScenarioModTime, D0.iToDeliver, D0.iImportReject, D0.iSeedProcessed, D0.iReject, D0.iPropositionCount, D0.iToDeliver + D0.iImportReject + D0.iReject, Percent(D0.iReject , (D0.iToDeliver + D0.iImportReject + D0.iReject)), D0.iHtml, D0.iText, D0.iMultipart, Percent(D0.iHtml , D0.iToDeliver), Percent(D0.iText , D0.iToDeliver), Percent(D0.iMultipart , D0.iToDeliver), D0.iUrl, D0.iToValidate, D0.iCtrlGrpReject, D0.iDeliveryProviderId, D0.iWeightType, D0.iWeight, D0.dRate, D0.dDuration, D0.sValidationMode, D0.iDelayed, D0.tsContact, D0.tsValidity, D0.tsWebValidity, D0.iWebResPurged, D0.tsExtraction, D0.dDelayExtraction, D0.tsExtracted, D0.sIPAffinity, D0.iForecasted, D0.sLogin, D0.iMsgPriority, D0.tsExpectedTarget, D0.tsExpectedContent, D0.tsExpectedBudget, D0.tsExpectedExtraction, D0.tsExpectedFCP, D0.tsExpectedForecast, D0.tsExpectedEdition, D0.tsExpectedExternal, D0.tsReminderTarget, D0.tsReminderContent, D0.tsReminderBudget, D0.tsReminderExtraction, D0.tsReminderFCP, D0.tsReminderForecast, D0.tsReminderEdition, D0.tsReminderExternal, D0.iSandboxMode, D0.iUseBudgetValidation, D0.iUseTargetValidation, D0.iUseContentValidation, D0.iUseExtractionValidation, D0.iUseFCPValidation, case when IsBitSet(D0.iUseFCPValidation , 1) &lt;> 0 then 1 else 0 end, case when IsBitSet(D0.iUseFCPValidation , 2) &lt;> 0 then 1 else 0 end, case when IsBitSet(D0.iUseFCPValidation , 4) &lt;> 0 then 1 else 0 end, case when IsBitSet(D0.iUseFCPValidation , 8) &lt;> 0 then 1 else 0 end, D0.iUseTaskCreation, D0.iUseLinkedDeliveryValidation, D0.iDisableNotification, D0.iValidationMode, D0.iAssignEdition, D0.iExternalValidation, D0.iRetry, D0.iMaxRetry, D0.dRetryPeriod, D0.tsNextPass, D0.tsBroadStart, D0.tsBroadEnd, D0.tsPassStart, D0.iTypologyId, D0.iMappingId, D0.iProofedDeliveryId, D0.iNeedMirrorPage, D0.iOfferSpaceId, D0.iOfferCategoryId, D0.iOfferAnonymousCategoryId, D0.iCmsAccountId, D0.sPublishingNamespace, D0.sPublishingName, D0.iInsertMode, D0.iDirty, D0.tsLastErrorComputation, D0.iErrorPending, D0.tsLastTrackingComputation, D0.iTrackingPending, D0.iProcessed, D0.iSent, D0.iSuccess, D0.iSuccessWithoutSeeds, D0.iError, D0.iNewQuarantine, D0.iUnknownUser, D0.iInvalidDomain, D0.iUnreachable, D0.iDisabled, D0.iMailboxFull, D0.iNotConnected, D0.iRefused, D0.iRecipientOpen, D0.iTotalRecipientOpen, D0.iPersonClick, D0.iRecipientClick, D0.iTotalRecipientClick, D0.iForward, D0.iMirrorPage, D0.iOptOut, D0.iTransaction, D0.dAmount, D0.iArticle, D0.iWebPage, D0.iTotalWebPage, Percent(D0.iProcessed , D0.iToDeliver), Percent(D0.iSuccess , D0.iProcessed), Percent(D0.iError , D0.iProcessed), Percent(D0.iNewQuarantine , D0.iProcessed), D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused, Percent(D0.iUnknownUser , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iInvalidDomain , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iUnreachable , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iDisabled , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iMailboxFull , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iNotConnected , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iRefused , (D0.iUnknownUser + D0.iInvalidDomain + D0.iUnreachable + D0.iDisabled + D0.iMailboxFull + D0.iNotConnected + D0.iRefused)), Percent(D0.iErrorPending , D0.iError), case when (D0.iToDeliver - D0.iText) = 0 then 0 else round(CAST(D0.iRecipientOpen AS NUMERIC) * D0.iToDeliver / (D0.iToDeliver - D0.iText) , 0) end, Percent((case when (D0.iToDeliver - D0.iText) = 0 then 0 else round(CAST(D0.iRecipientOpen AS NUMERIC) * D0.iToDeliver / (D0.iToDeliver - D0.iText) , 0) end) , D0.iSuccessWithoutSeeds), case when (D0.iToDeliver - D0.iText) = 0 then 0 else round(CAST(D0.iTotalRecipientOpen AS NUMERIC) * D0.iToDeliver / (D0.iToDeliver - D0.iText) , 0) end, Percent((case when (D0.iToDeliver - D0.iText) = 0 then 0 else round(CAST(D0.iTotalRecipientOpen AS NUMERIC) * D0.iToDeliver / (D0.iToDeliver - D0.iText) , 0) end) , D0.iSuccessWithoutSeeds), Percent(D0.iRecipientClick , D0.iSuccessWithoutSeeds), Percent(D0.iForward , D0.iSuccessWithoutSeeds), Percent(D0.iOptOut , D0.iSuccessWithoutSeeds), Percent(D0.iTotalRecipientClick , D0.iSuccessWithoutSeeds), Percent(D0.iMirrorPage , D0.iSuccessWithoutSeeds), Percent(D0.iRecipientClick , (case when (D0.iToDeliver - D0.iText) = 0 then 0 else round(CAST(D0.iRecipientOpen AS NUMERIC) * D0.iToDeliver / (D0.iToDeliver - D0.iText) , 0) end)), Percent(D0.iTransaction , D0.iSuccessWithoutSeeds), case when D0.iTransaction = 0 then 0 else D0.dAmount / D0.iTransaction end, case when D0.iTransaction = 0 then 0 else D0.iArticle / D0.iTransaction end, D0.iWebAnalyticsAccountId, D0.iPublicationStatus, D0.sEventType, D0.tsContentModTime, D0.sNature, D0.iUseDce, D0.iAnalysisStep, D0.iMessageType, D0.iDeliveryMode, D0.iState, D0.iFCP, D0.iMidSourcing, case when D0.iMidSourcing &lt;> 0 then D0.iMidRemoteId else D0.iDeliveryId end, D0.iPriority, D0.sDeliveryCode, D0.iHasAttachments, D0.iDeleteStatus, D0.tsDelete, D0.iCommitmentLevel, D0.dEstimatedCost, D0.dRealCost, D0.dComputedCost, D0.tsLastComputed, D0.iComputationState, D0.dTotalRealized, D0.dTotalMargin, D0.dTotalEstimatedRealized, D0.dTotalEstimatedMargin, D0.iOperationId, D0.iOwnerOperationId, D0.iRoutingDeliveryId, D0.iWorkflowId, D0.iBudgetId, D0.iSupplierModelId, D0.iLinkedDeliveryId, D0.iRecurringDeliveryId, D0.iDeliveryOutlineId, D0.iContentStatus, D0.iTargetStatus, D0.iBudgetStatus, D0.iExtractionStatus, D0.iSandboxStatus, D0.iTouchpointNum, F1.sLabel, F1.iFolderId, F2.sLabel, F2.iFolderId, COALESCE(O3.sLabel, '') || E' (' || COALESCE(O3.sName, '') || E')', O3.iOperatorId, COALESCE(O4.sLabel, '') || E' (' || COALESCE(O4.sName, '') || E')', O4.iOperatorId, E5.sLabel, E5.sMirrorURL, E5.iExtAccountId, T6.sLabel, T6.iTypologyId, T6.sIPAffinity, COALESCE(D7.sLabel, '') || E' (' || COALESCE(D7.sSchema, '') || E')', D7.sSchema, D7.iDeliveryMappingId, D7.sName, D7.sLabel, D7.sRecipientLink, D7.iBuiltIn, D7.iCreatedById, D7.iModifiedById, D7.tsCreated, D7.tsLastModified, D7.iDefaultOriginId, D7.sBroadLogSchema, D7.sBroadLogExclSchema, D7.sTrackingLogSchema, D7.iFolderId, COALESCE(O8.sLabel, '') || E' (' || COALESCE(O8.sName, '') || E')', O8.iOperatorId, COALESCE(O9.sLabel, '') || E' (' || COALESCE(O9.sName, '') || E')', O9.iOperatorId, COALESCE(D10.sLabel, '') || E' (' || COALESCE(D10.sInternalName, '') || E')', D10.iDeliveryId, F11.sLabel, F11.iFolderId, COALESCE(D12.sLabel, '') || E' (' || COALESCE(D12.sInternalName, '') || E')', D12.iDeliveryId, D12.iWorkflowId, COALESCE(O13.sLabel, '') || E' (' || COALESCE(X14.sLabel, '') || E')', O13.iOfferSpaceId, O13.iDefaultStatus, O13.iDisablePropositionStorage, O13.iEnvId, X14.iFolderId, X15.sLabel, X15.iFolderId, X16.sLabel, X16.iFolderId, E17.sLabel, E17.iExtAccountId, E18.sLabel, E18.iExtAccountId, COALESCE(O19.sLabel, '') || E' (' || COALESCE(O19.sInternalName, '') || E')', O19.iOperationId, COALESCE(O20.sLabel, '') || E' (' || COALESCE(O20.sInternalName, '') || E')', O20.iOperationId, COALESCE(D21.sLabel, '') || E' (' || COALESCE(D21.sInternalName, '') || E')', D21.iDeliveryId, COALESCE(W22.sLabel, '') || E' (' || COALESCE(W22.sInternalName, '') || E')', W22.iWorkflowId, B23.sLabel, B23.iBudgetId, S24.sLabel, S24.iSupplierModelId, COALESCE(D25.sLabel, '') || E' (' || COALESCE(D25.sInternalName, '') || E')', D25.iDeliveryId, D25.iDelayed, D25.tsContact, D25.tsExtraction, D25.tsValidity, D25.tsWebValidity, COALESCE(D26.sLabel, '') || E' (' || COALESCE(D26.sInternalName, '') || E')', D26.iDeliveryId, D27.sLabel, D27.iDeliveryOutlineId, L28.iDeliveryId, D0.mData, D7.mData, X14.mData, E18.mData FROM NmsDelivery D0 JOIN XtkFolder F1 ON (F1.iFolderId = D0.iFolderId) JOIN XtkFolder F2 ON (F2.iFolderId = D0.iFolderProcessId) JOIN XtkOperator O3 ON (O3.iOperatorId = D0.iCreatedById) JOIN XtkOperator O4 ON (O4.iOperatorId = D0.iModifiedById) JOIN NmsExtAccount E5 ON (E5.iExtAccountId = D0.iDeliveryProviderId) JOIN NmsTypology T6 ON (T6.iTypologyId = D0.iTypologyId) JOIN NmsDeliveryMapping D7 ON (D7.iDeliveryMappingId = D0.iMappingId) JOIN XtkOperator O8 ON (O8.iOperatorId = D7.iCreatedById) JOIN XtkOperator O9 ON (O9.iOperatorId = D7.iModifiedById) JOIN NmsDelivery D10 ON (D10.iDeliveryId = D7.iDefaultOriginId) JOIN XtkFolder F11 ON (F11.iFolderId = D7.iFolderId) JOIN NmsDelivery D12 ON (D12.iDeliveryId = D0.iProofedDeliveryId) JOIN NmsOfferSpace O13 ON (O13.iOfferSpaceId = D0.iOfferSpaceId) JOIN XtkFolder X14 ON (X14.iFolderId = O13.iEnvId) JOIN XtkFolder X15 ON (X15.iFolderId = D0.iOfferCategoryId) JOIN XtkFolder X16 ON (X16.iFolderId = D0.iOfferAnonymousCategoryId) JOIN NmsExtAccount E17 ON (E17.iExtAccountId = D0.iCmsAccountId) JOIN NmsExtAccount E18 ON (E18.iExtAccountId = D0.iWebAnalyticsAccountId) JOIN NmsOperation O19 ON (O19.iOperationId = D0.iOperationId) JOIN NmsOperation O20 ON (O20.iOperationId = D0.iOwnerOperationId) JOIN NmsDelivery D21 ON (D21.iDeliveryId = D0.iRoutingDeliveryId) JOIN XtkWorkflow W22 ON (W22.iWorkflowId = D0.iWorkflowId) JOIN NmsBudget B23 ON (B23.iBudgetId = D0.iBudgetId) JOIN NmsSupplierModel S24 ON (S24.iSupplierModelId = D0.iSupplierModelId) JOIN NmsDelivery D25 ON (D25.iDeliveryId = D0.iLinkedDeliveryId) JOIN NmsDelivery D26 ON (D26.iDeliveryId = D0.iRecurringDeliveryId) JOIN NmsDeliveryOutline D27 ON (D27.iDeliveryOutlineId = D0.iDeliveryOutlineId) LEFT JOIN NmsLastDlvSnapshot L28 ON (L28.iDeliveryId = D0.iDeliveryId) WHERE (D0.sInternalName = :#(1)#) AND ((D0.iDeleteStatus = :#(2)#))' could not be executed.

  Param(0)=test

  Param(1)=0

The requested database record does not exist.

Cannot load document of type 'Deliveries (nms:delivery)' satisfying condition '(@internalName = 'test') AND ((@deleteStatus = 0))'.

Failed to analyze delivery (identifier 'unknown').</detail>

      </SOAP-ENV:Fault>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Employee
September 14, 2017

Hello,

this session token element should not be used anymore:

to do a proper (and safe) call, you have to provide it in a cookie header, and the associated security token in X-Security-Token header like explained in documentation Web service calls

So, your post to soaprouter.jsp must look like:

POST /nl/jsp/soaprouter.jsp HTTP/1.1

Content-Type: application/soap+xml; action=nms:delivery#SubmitDelivery; charset=utf-8

Accept-Language: en

SOAPAction: nms:delivery#SubmitDelivery

Cookie: __sessiontoken=___XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

X-Security-Token: @XxxxXX...X==

[...]

<?xml version='1.0'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:delivery">

<soapenv:Header/>

<soapenv:Body>

<urn:SubmitDelivery>

<urn:sessiontoken></urn:sessiontoken>

<urn:strScenarioName>test</urn:strScenarioName>

[...]

Regards,

Damien

New Participant
September 13, 2017

HI Vipul

the user is Administrator on the system

below is the Soap request to do the delivery

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:delivery">

<soapenv:Header/>

<soapenv:Body>

<urn:SubmitDelivery>

<urn:sessiontoken>___1526c1c1-536c-4f86-add5-72c3138f66cc</urn:sessiontoken>

<urn:strScenarioName>test</urn:strScenarioName>

<urn:elemContent>

<delivery xtkschema="urn:delivery">

<targets fromExternalSource="true">

<externalSource><![CDATA[MsgId|ClientId|Title|Name|FirstName|Mobile|Email|Market_segment| Product_affinity1|Product_affinity2| Product_affinity3|Product_affinity4| Support_Number|Amount|Threshold1|000001234|M.|Phulpin|Hervé|0650201020|asemko@gmail.com|1| A1|A2|A3|A4| E12|120000|100000]]></externalSource>

</targets>

</delivery>

</urn:elemContent>

</urn:SubmitDelivery>

</soapenv:Body>

</soapenv:Envelope>

vraghav
Employee
September 13, 2017

Hi,

Can you add the SOAP call used. I think you are trying to start the delivery.

Now generating a sesison token doesn't guarantee that you will have the required rights to perform a certain task.

Can you confirm the operator used for generating session token as proepr rights on the delivery folder and also has the named right to start the delivery.

Regards,
Vipul