Here

advertisement
Engaging your Customer Base
through Web Services
Presented by Ben Liyanage
Edge Web Hosting
• We provide
– Mission Critical Hosting
– Load Balanced Solutions
– Cloud Hosting
– Dedicated Server Hosting
• We are experts with .NET, ColdFusion, and PHP.
• 24/7 Call Center
• 20-25 Employees
Why did we implement Epicor ITSM?
• Consolidate our data.
• SAS70
• Stream line our customer onboarding process
• Better Support Ticket Management
Our Epicor Environment
• VMWare for Application Servers
• Dedicate Server for SQL
• Windows 2008 Server R2
• Windows 2008 SQL Server R2
• Development, Staging, and Product Environment
Custom Portal vs Sharepoint
• Share Point
– Simple point and click customizations.
• Custom Portal
– Customer Portal can have a richer user experience.
– Look and Feel can be tailored to your Brand
– Can combine data from different sources.
What are web services?
• A web service exposes data, and processes from one
application for use in another application.
• Web Services provides a layer of abstraction which
protects external applications from breaking if the
internal mechanics change.
• There are many types of web services. Epicor uses a
SOAP based system.
• Access to your central database can be secured.
What are web services?
Web Application
Epicor Client
App Server
Database
When should I use Epicor web services?
• When creating data.
• When updating data.
• When you need to take advantage of epicor logic.
– Example: Support Templates.
– Example: Attachments.
When to not use Epicor web services?
• When displaying data.
• Epicor tends to pass too much information.
Displaying Data
Displaying Data
Set Up a Web Service in VS 2010
• Right Click your
Project in the Solution
Explorer
• Select “Add Web
Reference…”
Epicor’s Global User Conference © 2010 Epicor Software Corporation.
Set Up a Web Service in VS 2010
• Type in the URL to the
Service you are
interested in.
• Look in your Epicor
Install folder for a
“Server” folder to list
all of the services
available.
• Epicor Web Services
default to install on the
following URL:
http://{ServerName}/EpicorITSM/Server/{Service}.asmx
Epicor’s Global User Conference © 2010 Epicor Software Corporation.
Set Up a Web Service in VS 2010
• Type in the URL to the
Service you are
interested in.
• Look in your Epicor
Install folder for a
“Server” folder to list
all of the services
available.
• Epicor Web Services
default to install on the
following URL:
http://{ServerName}/EpicorITSM/Server/{Service}.asmx
Epicor’s Global User Conference © 2010 Epicor Software Corporation.
Simple C# example with the Answerbook
Module.
• Give your Web Service
a name.
• Click Add Reference.
• You have now added
this Web Service to
your Project.
Invoking a Web Service
• Browse to your Web
Services’ URL.
• EX)
/EpicorITSM/Server/
AnswerBookPage.asmx
• The URL will provide a list
of commands you can
execute
• Epicor has some standard
commands across all web
services.
Invoking a Web Service
• GetNew()
– Most GetNew requests do not take a parameter.
– AnswerBookPages take the Guid of the Book the
page will be in as a parameter.
• GetByID()
– Most Epicor Webservices have a GetByID()
service, which lets you get a specific record of
data, by referencing it’s GUID.
• Update()
– Updates a record using a record returned from
GetNew() or GetByID()
Invoking a Web Service
• GetList()
– Allows you to search for rows on the Web
Service.
– The data returned is the same data you would get
on a search form in the client.
– You need to use a FindCriteria to specify your
search criteria.
Setting Up FindCriteria
• To Setup the FindCriteria you must add an Epicor
DLL to your project.
• Right Click References.
• Select Add Reference
Setting Up FindCriteria
• Navigate to the Epicor Client Folder.
• Select “Clientele.Application.Common.dll”
• Click “Ok”.
Setting Up FindCriteria
• Make sure you use the DLL in your code so you can
use the shorthand later.
• Generally Speaking, you can search on any column
you see in the database.
• FindCriteria are strongly typed. This is a bit
annoying.
Invoking a Web Service
• Delete()
– Allows you to delete a record.
– You delete the record by specifying the Guid.
Sample Files
• Below is some sample code used in the examples in
this presentation.
Contact Information
Ben Liyanage
bliyanage@edgewebhosting.net
Presentation & Code Available for Download Here
http://perfectresolution.com/?p=415
(You can also find it under the Epicor tag)
Download