Main.Invoicing.invoice-service.Implementation guide.Technical reference.PayEx Connect (API).SampleServicemanual - Sample Service manual 
Page of - last modified by David Persson on 2020/01/21 09:34 
Sample Service manual 

David Persson

2020/01/21 09:34
Table of Contents
Prerequisites
Service Overview - SampleService
Data types sample
Session state sample
Web methods
SampleMethod
InitializeSessionValue
UpdateSessionValue

This section covers the sample service and web the methods used for sample scenarios.
here.
Common documentation covering architecture, security, error handling etc is found in the common implementations manual.
Prerequisites
Before you start intregrating a system with PayEx Connect please make sure that:
�	You have basic knowledge of Web Services, including WSDL, Soap and WS-Security.
�	You understand that PayEx Connect is designed to simplify integration for clients using Microsoft .Net, Java Axis or other frameworks that have built-in support for WS-Security and other W3C standars.
Service Overview - SampleService
The sample service exposes web methods used for sample scenarios. Access to this service requires explicit permissions on company number level.
The complete Wsdl specification for this service can be found at:
https://connect.payex.com/SampleService.asmx?wsdl.
Data types sample
The web method SampleMethod demonstrates the different string formats supported by PayEx Connect.
Session state sample
The web methods InitializeSessionState  and UpdateSessionState  demonstrates the per-user session state management used in some parts of PayEx Connect. Methods requiring per-user session management has the following text in the Remarks section:
This method utilizes optimistic versioning concurrency control to ensure object consistency. This requires per-user session management by the service consumer. Details about versioning and session support can be found in the common documentation.
Web methods
SampleMethod
Sample method that returns a string containing the input string, an amount, a date and a datetime. Demonstrates the basic concepts of PayEx Connect and the ideal method to use when beginning a PayEx Connect integration.

SampleMethodRequestType	
					
SampleText	String	Yes	16	The input text to be returned as part of the return value. Throws SOAP fault error code 3010 if max text length of 16 characters is exceeded.	

sampleMethodResponsetype	
			
SampleText	String	The input as a value	
SampleAmount	String	A string representing a sample amount	
SampleDate	String	A string representing a sample date	
SampleDateTime	String	A string representing a sample date and time	

Specific exceptions for this method.
detail.ErrorCode	SOAP faultCode	Description	
3010	Client.3010	Request invalid. Invalid or missing sample text.	
InitializeSessionValue
This method is part of the sample demonstrating session state across multiple requests. Use this method to initialize the numeric value managed through server state. Use the UpdateSessionState method to update the value.

InitializeSessionValueRequestType	
				
InitialValue	Integer	Yes	Initial numeric value. Possible values are 0 to 1000.	

InitializeSessionValueResponseType	
			
CurrentValue	Integer	Current numeric value managed through server state.	

This method utilizes optimistic versioning concurrency control to ensure object consistency. This requires per-user session management by the service consumer.
UpdateSessionValue
This method is part of the sample demonstrating session state across multiple requests. Use this method to add a value to the numeric value managed through server state. Use the InitializeSessionState method to initiate the value before calling UpdateSessionState.

UpdateSessionValueRequestType	
				
AddedlValue	Integer	Yes	Value to add. Possible values are 0 to 1000.	

UpdateSessionValueResponseType	
			
CurrentValue	Integer	Current numeric value managed through server state.	

Specific exceptions for this method.
detail.ErrorCode	SOAP faultCode	Description	
4001	Client.4001	Concurrency control failure. Item not loaded into session state. InitializeSessionValue  must be invoked before UppdateSessionValue	

This method utilizes optimistic versioning concurrency control to ensure object consistency. This requires per-user session management by the service consumer.