This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private RoyalMail.SecurityHeaderType getSecurityHeaderType(RecId _recId = 0) | |
{ | |
RoyalMail.SecurityHeaderType securityHeaderType = new RoyalMail.SecurityHeaderType(); | |
str passwordDigest; | |
str userName; | |
System.Byte[] hashedPassword; | |
System.Byte[] digest; | |
str concatednatedDigestInput; | |
str encodedNonce; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void createShipment( utcdatetime _shipmentDate, | |
SalesTable _salesTable, | |
str _noOfParcels = "1" | |
) | |
{ | |
RoyalMail.shippingAPIPortTypeClient serviceClient; | |
RoyalMail.createShipmentRequest shipmentRequest; | |
RoyalMail.createShipmentResponse shipmentResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private RoyalMail.integrationHeader getIntegrationHeader(str _identifier) | |
{ | |
RoyalMail.integrationHeader integrationHeader; | |
RoyalMail.identificationStructure identificationStructure; | |
identificationStructure = new RoyalMail.identificationStructure(); | |
identificationStructure.set_applicationId(this.parmRMTTApplicationID()); | |
identificationStructure.set_transactionId(strFmt("%1", _identifier)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private str getNonce(RecId _recId) | |
{ | |
str nonce; | |
System.Random random = new System.Random(); | |
System.Int32 randomNumber = random.Next(); | |
if(_recId > 0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int getRandomInt() | |
{ | |
int randomNumber; | |
RandomGenerate randomGenerate; | |
randomGenerate = RandomGenerate::construct(); | |
randomGenerate.parmSeed(new Random().nextInt()); | |
randomNumber = RandomGenerate.randomInt(0, 9); // get a random integer between 0 and 9 inclusive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private System.Byte[] getSHA1(Str _input) | |
{ | |
System.Security.Cryptography.SHA1Managed sha1Managed; | |
System.Text.Encoding encoding; | |
System.Byte[] bytes; | |
str errorMessage; | |
try | |
{ | |
sha1Managed = new System.Security.Cryptography.SHA1Managed(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ZoomFSRoyalMail.RoyalMail.shippingAPIPortTypeClient getRMServiceClient() | |
{ | |
CLRObject clientType; | |
RoyalMail.shippingAPIPortTypeClient serviceClient; | |
RoyalMail.EndPointBehaviour endPointBehaviour; | |
System.ServiceModel.EndpointAddress endpointAddress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ServiceModel.Description; | |
using System.ServiceModel.Dispatcher; | |
using System.ServiceModel.Channels; | |
namespace RoyalMail | |
{ | |
public class RoyalMailOperationBehavior : IOperationBehavior | |
{ | |
public RoyalMailOperationBehavior() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ServiceModel.Description; | |
namespace RoyalMail | |
{ | |
public class EndPointBehaviour: IEndpointBehavior | |
{ | |
RoyalMailHeaderCredentials _credentials; | |
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void createDomesticShipment( utcdatetime _shipmentDate, | |
SalesTable _salesTable, | |
str _noOfParcels = "1" | |
) | |
{ | |
RoyalMail.shippingAPIPortTypeClient serviceClient; | |
RoyalMail.createShipmentRequest shipmentRequest; | |
RoyalMail.createShipmentResponse shipmentResponse; |