38
B2B Application Integration Using Web Services Nagarjuna Nagulapati Under the guidance of Dr. Daniel Andresen (Major Professor) Dr. Torben Amtoft Dr. William J. Hankley

B2B Application Integration Using Web Services

Embed Size (px)

DESCRIPTION

B2B Application Integration Using Web Services. Nagarjuna Nagulapati Under the guidance of Dr. Daniel Andresen (Major Professor) Dr. Torben Amtoft Dr. William J. Hankley. Outline. Problem Statement Solution Application Integration Technologies B2B Application Integration & Web Services - PowerPoint PPT Presentation

Citation preview

Page 1: B2B Application Integration Using Web Services

B2B Application Integration Using Web Services

Nagarjuna Nagulapati

Under the guidance of

Dr. Daniel Andresen (Major Professor)Dr. Torben AmtoftDr. William J. Hankley

Page 2: B2B Application Integration Using Web Services

Outline Problem Statement Solution Application Integration Technologies B2B Application Integration & Web

Services SOAP SOAP Style & Encoding Implementation Performance Evaluation

Page 3: B2B Application Integration Using Web Services

Problem Statement Market Globalization

• Need to stay ahead of competitors

Solutions from multiple vendors

• Unable to share information and isolated functionality

Page 4: B2B Application Integration Using Web Services

Solution Application Integration(AI)

• Application integration is the real-time controlled sharing of data and business processes among any connected applications and data sources within inter and intra organizations.

Page 5: B2B Application Integration Using Web Services

Advantages

Increased productivity Controlled procurement processes Interoperability with partners Reuse of existing systems

Page 6: B2B Application Integration Using Web Services

Types of AI Enterprise Application Integration

• Integrating applications within an enterprise• EDI – based on ANSI standards• Point-to-point integration

B2B Application Integration• Integrating applications across enterprises• Middlewares – facilitate communication

between two or more software systems• Point-to-point NOT feasible

Page 7: B2B Application Integration Using Web Services

Why Web Services? Java Middleware Technologies

• RMI, JMS - Language dependent

Distributed objects• CORBA, DCOM - Platform dependent

Message Brokers• Require sweeping changes in participating

applications and hence expensive

Open standards, platform and language independent, loosely-coupled integration

Page 8: B2B Application Integration Using Web Services

B2B AI and Web Services Organizations favoring open

standard protocols

XML becoming lingua franca for data formatting and interpretation

Web Services are XML-based middleware built on open standards

Page 9: B2B Application Integration Using Web Services

Web Services Web services are middleware components that

implement business logic via services and expose these services programmatically over the web, which could be invoked by service clients

using SOAP over HTTP Based on open standards like UDDI, WSDL,

SOAP, XML, HTTP Separation of specification from implementation

Page 10: B2B Application Integration Using Web Services

Web Services Stack Transport protocol – HTTP, SMTP Data encoding – XML Standard Message Structure – SOAP Service Description – WSDL Service Discovery - UDDI

Page 11: B2B Application Integration Using Web Services

Web Services Framework

UDDIWSDL

ClientWeb

Service

Points to service

description

Describes service

SOAP

HTTP

Finds servicePublishes

service

proxy

Page 12: B2B Application Integration Using Web Services

SOAP Simple Object Access Protocol, a lightweight,

message-based protocol built on XML and standard Internet protocols, such as HTTP and SMTP for information exchange in a decentralized environment

Defines specification for message structure and data encoding

Facilitates structured and typed messages to be exchanged

Page 13: B2B Application Integration Using Web Services

SOAP SOAP message must contain a SOAP envelope, a

SOAP body and optional SOAP header

Encoding - serialization of data inside a SOAP message

SOAP encoding is based on XML Schemas and relies on the XML Schema data types, namespace and the type attribute

Page 14: B2B Application Integration Using Web Services

SOAP

<soap:envelope> <soap:header> …………………</soap:header><soap:body> <add> <num1 xsi:type="xsd:int">5</num1> <num2 xsi:type="xsd:int">10</num2> </add> </soap:body>

</soap:envelope>

SOAP envelope

SOAP payload

SOAP header

Container to hold the SOAP message

Sequence numbers,authentication credentials

Method calls, parameters, Application-specific data

Page 15: B2B Application Integration Using Web Services

WSDL Describes Web Service methods to

heterogeneous clients in a platform and language independent manner

SOAP toolkits generate proxy classes using WSDL

Service contract which specifies the methods available and type information needed to properly compose SOAP requests

Page 16: B2B Application Integration Using Web Services

WSDLpublic int add(int num1, int num2)

<?xml version="1.0" encoding="utf8" ?> <definitions >

  <types /> <message name="addSoapIn">  <part name="num1" type="s:int" />   <part name="num2" type="s:int" />   </message> <message name="addSoapOut">  <part name="addResult" type="s:int" />   </message> <portType name="sampleSoap"> <operation name="add">  <input message="tns:addSoapIn" />   <output message="tns:addSoapOut" />   </operation> </portType> <binding name="sampleSoap" type="tns:sampleSoap">  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />

<operation name="add">  <soap:operation soapAction="http://tempuri.org/add" style="rpc" /> <input>  <soap:body use="encoded" namespace="http://tempuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />   </input> <output>  <soap:body use="encoded" namespace="http://tempuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />   </output>  </operation>  </binding> <service name=“Sample"> <port name="sampleSoap" binding="tns:sampleSoap">  <soap:address location="http://agena.cis.ksu.edu:8080/axis/services/Sample" />   </port>

</service>  </definitions>

Describes entry points to web serviceHTTP-POST, HTTP-GET, SOAP

Describes style and encoding of the SOAP messagesfor each operation

Methods available along with input and output messages

Number and type of input and output parameters

Describes custom or complexData types

Page 17: B2B Application Integration Using Web Services

Implementation Web Services feasibility in integrating

heterogeneous applications B2B application modeling online

trading system’s supply chain management

Web Services integrate the business processes of participating applications in a real-time fashion

Page 18: B2B Application Integration Using Web Services

System Architecture

Purchaser(.NET)

Publisher(.NET)

VENDOR(J2EE)

SOAP OVER HTTP

Web ServiceWeb Service

Web Service

Page 19: B2B Application Integration Using Web Services

Technologies used ASP.NET, ADO.NET, C# ASP.NET WebMethod Framework J2EE 1.3.1, EJB AXIS 1.1 Framework JBOSS 3.2.1 XDoclet IIS 5.0 Microsoft ACT

Page 20: B2B Application Integration Using Web Services

Message FlowPurchaser Vendor Publisher

orderAvailability()

orderAvailabilityResponse

confirmRequest()

orderInvoice

orderInvoice

invoiceConfirmation

Delegates request to EJBwhich processes the request

Inserts order into database

Page 21: B2B Application Integration Using Web Services

Detailed System Architecture

Purchaser(.NET)

proxy

IIS Server

Vendor(J2EE)

EJB

EJB.NET web service

J2EE web service

.NET web service

Publisher(.NET)

IIS Server

JBOSS Application Server

Database

Database

Business tier

SOAP/HTTP

Marshalls native .NET method calls to XML

Unmarshalls SOAP message to native Java method calls

Unmarshalls SOAP message tonative .NET method calls

Page 22: B2B Application Integration Using Web Services

Class Diagram

BookShoppingCart

xmlCart : XmlDocument

BookShoppingCart()addBookToCart()deleteBookFromCart()getCartDescription()voidCart()

Signin

butLoginFromCustomer_Click()butClearFromCustomer_Click()

AdminWebService

AdminWebService()AuthenticateCustomer()getLoginDataSet()

ConfirmCart

createConfirmCart()checkout_Click()update_Click()

ProcessRequest

page_load()query_Click()

BooksWebService

BooksWebService()addBookOrder()addOrderDetails()getAllBooks()getAllCategories()getMaxOrderID()

1..*

1

0..1

1

Start

catID : int

displayCategories()showCart()showCatalog()

0..1

1

BookCatalog

DataSource : BooksWebServicedsAllBooks : DataSet

createSummaryTable()catalogByCategory()catalogItemDetails()catalogRangeByCategory()initCatalog()

1

1

ConfirmDetails

adminWS1 : AdminWebServiceloginDataSet : DataSetxmlLoginDocument : XmlDocument

0..1 1

1

1

0..1 1

1..*

1

ShoppingCartUpdate

updateShoppingCart()calculateSubTotal()parseISBN()

1

0..1

OrderRequestSoapBindingImpl

validateOrderRequest()processOrder()

OrderRequestBean

checkAvailability()processOrder()ArrayDeserializer

deserializeArray()

CustomSQLConnection

initializeConnection()executeReader()

OrderAvailabilityHandler

getBookAndQuantity()loopBooks()queryAvailability()

OrderInvoiceGenerator

orderIDGen()invoiceXMLDomGen()orderInvoiceGen()

PurchaserRPC

checkAvailabilityRPC()processOrderRPC()

PublisherRPC

acceptInvoice()insertPublishOrder()

PublisherInterface

viewAllOrders()viewBackOrders()viewAvailableOrders()

Invoice

page_load()processInvoice()renderInvoice()1

1

0..*

1

1

1

1

1

1

11..*

1..*1

0..1 1

1

1

0..1

0..1 1

1

Purchaser Module12 classes

Publisher Module2 classes

Vendor Module8 classes

Web Services

RPC-Style ~1200 LOCDocument-Style ~1350 LOC

Page 23: B2B Application Integration Using Web Services

SOAP processing in .NET

HTTPHandler

ASP.NETEngine

HTTP modules

XmlSerializer

ASP.NETWeb Service Handler

IIS SERVER

Service Object SOAP

Request

SOAPResponse

Page 24: B2B Application Integration Using Web Services

SOAP processing in AXIS

HTTPHandler

Handlers

Handlers

SerializationFramework

SOAP MESSAGE PROCESSOR WS CONTAINER

Axis engine

Web service

JBOSS APPLICATION SERVER

JETTY WEB SERVER EJB’S

SOAPRequest

SOAPResponse

SERVICE provider

Page 25: B2B Application Integration Using Web Services

Demo

Page 26: B2B Application Integration Using Web Services

SOAP style & encoding RPC/Encoded

One-to-one mapping between SOAP payload elements and service method

Encoding is based on Section 5, SOAP specification

SOAP framework handles (de)serializing of method calls to/from XML

Application developer deals with native objects

Page 27: B2B Application Integration Using Web Services

SOAP style & encoding Document/Literal

No one-to-one mapping between SOAP payload and service method

SOAP payload can contain arbitrary XML

Encoding is based on the XML schema agreed upon by both parties

Application developer deals with raw SOAP payload

Page 28: B2B Application Integration Using Web Services

RPC (Vs) Document-style public int add(int num1, int num2)<soapenv:body>

<ns:add><num1 xsi:type=“xsd:int”>10</num1> <num2 xsi:type=“xsd:int”>8</num2>

</ns:add></soapenv:body>---------------------------------------------------------------------------------------

public Document add(Document operation)<soapenv:body>

<ns:operation><add>10</add> <add>8</add><multiply>1</multiply><multiply>2</multiply>

</ns:operation></soapenv:body>

Method nameparameterparameter

Arbitrary XML

Page 29: B2B Application Integration Using Web Services

Performance Evaluation SOAP payload (Vs) Processing time

2.35

2.4

2.45

2.5

2.55

2.6

2.65

5 10 15 20

SOAP Payload

Pro

cess

ing

Tim

e (

log

)

RPC-Style

Doc-Style

ASPWEBWindows BoxDual processor292 MHz, 512MB

AgenaSolaris Box360 MHz, 128MB

Page 30: B2B Application Integration Using Web Services

Performance Evaluation SOAP payload (Vs) Requests/Sec

0

0.5

1

1.5

2

2.5

3

3.5

4

5 10 15 20

SOAP Payload

Req

/Sec RPC-Style

Doc-Style

Page 31: B2B Application Integration Using Web Services

Results analysis Results

RPC/Encoded solution performed better than Document/Literal solution

Theoretically Document/Literal should perform better

Analysis Implementation was limited to simple data

types in RPC/Encoded• Document/Literal solutions perform better for complex

data types Axis serialization (vs) Custom serialization

• SAX (Vs) DOM

Page 32: B2B Application Integration Using Web Services

Lessons learned Service-oriented application development

in both .NET and J2EE Better understanding of SOAP protocol,

message structure, encoding and SOAP message processing in .NET and Apache AXIS frameworks

Application integration technologies currently being used in enterprises and how they work.

Page 33: B2B Application Integration Using Web Services

Implementation issues Insufficient reference resources on the

Document-styled Web services

Interoperability between .NET and J2EE technologies still in its nascent stages

Working simultaneously with both .NET based API’s and Java based API’s

Page 34: B2B Application Integration Using Web Services

Conclusion SOAP is text-based, Web Service

calls may be too slow for applications that require frequent and fast communications

Web Services are not suitable for applications which need to access wide variety of objects and classes

Page 35: B2B Application Integration Using Web Services

Future work Security is utmost concern

• Authentication credentials in SOAP headers• User/Passwd, Security tokens and SSL• Encoded NOT encrypted

Consortia and organizations working towards the interoperability and security of Web Services : WS-I & WS-Security

Page 36: B2B Application Integration Using Web Services

References www.msdn.com http://ws.apache.org/axis http://java.sun.com/blueprints/webservices/using/webservbp3.html http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/DotNetInterop http://www.gotdotnet.com/team/XMLwebservices/gxa_overview.aspx http://www.aei.on.ca/index.php/aei/notes/edi http://ecommerce.about.com/cs/b2bresources/a/aa080108a.htm http://www.topxml.com/b2b/articles/ts4b2b/default.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/

eappint-ch01.asp http://www.darc.com/software/2ndLevelArt/News/Application_Integration_for_E-

Business.pdf http://www-900.ibm.com/developerWorks/cn/xml/developerConf/ http://www-106.ibm.com/developerworks/webservices/library/ws-whichwsdl/ http://www.jboss.org/index.html?module=bb www.msdn.com/newsgroups

Page 37: B2B Application Integration Using Web Services

Acknowledgements Dr. Daniel Andresen Dr. Torben Amtoft Dr. William J. Hankley Sterling Hanenkamp Travis Bradshaw

Page 38: B2B Application Integration Using Web Services

Questions?