Title: Malek Kemmou
1Interoperability and Integrationusing Web
Services
- Malek Kemmou
- Technology Architect, Application Platform
- Microsoft Middle East Africa
- malek_at_microsoft.com
2Agenda
- What is Interoperability
- Services, Objects and Messages
- Common Interoperability Problems
- WS-I Basic Profile 1.0
- The Contract First Approach
- Wrapping existing Code with Web Services
3What is Interoperability
- Disparate systems working meaningfully together
- Multiple Vendors / Platforms
- Communication
- Transport Protocol
- Data Format
- Common Interface
- Meaning
- Objects (RPC)
- Messages (Services)
- Documents (EDI )
4Web Services
- Multiple Vender / platform
- Vender support
- Open Standards
- Communication
- Standard Web Protocols for transport (http, smtp
) - Standard "format" for Data Exchange (XML/SOAP)
- Standard Language for interface description
(WSDL) - Meaning ?
5RPC vs. Message Approach
Transport
Service
Client
Transport
Both source and destination must understand the
object
Service
Client
Create Message
Interpret Message
Source and destination may see message differently
6RPC vs. Message Approach
Application A
Application B
Programming Language
Programming Language
DBMS
DBMS
Transport Protocols
Object Model
Object Model
Messages
OS
OS
App Server
App Server
7Message Approach
- Advantages
- Loose coupling
- Contract Based (WSDL)
- Total independence of implementation
- Total independence of object model
- Total independence of development platform
- Only message format is important
8A first approach to services
- Create the service
- Auto-Generate its contract
- Service consumers use the contract to create a
client
9First look at WS
10An Interop test
- Hello World Works great
- Nested Array
- string myArray
- Very simple Nested struct
- public struct Contact
- public string lastName
- public string firstName
- public string telephone
- public Address address
- Datetime
- Untyped DataSet (.NET)
- Typed DataSet (.NET)
public struct Address public string
street public string city public string
country
11Test Results
- HelloWorld works
- Nested struct Works
- NestedArray some issues
- Schema interpretation
- DateTime
- .NET doesnt accept null DateTime (struct)
- Untyped DataSet
- No notion of dynamic schema in java
- Typed DataSet
- XML received correctly
- No Type generation on java side (unless
proprietary APIs are used)
12Example
- Java Service
- public java.util.Date GetDate()
- //may return null
-
- .Net Client
- public DateTime GetDate()
- //error when return value is null
-
13Common Interop Problems
- Dynamic format
- Example untyped Datasets
- Interpretation
- Examples
- DTD in the SOAP message
- ArrayType attributes
- Types
- Example Nillable types
- Non conformant WSDL or SOAP
14WS-I Basic Profile 1.0a
- Industry effort to deliver on Interop
- WS-I (Web Services Interoperability Organization)
- Specification for SOAP
- Specifications for WSDL
- Specification for UDDI
- Conformity Test tools
15Multi-Version interop ?
- Create Service v1
- Auto generate WSDL
- Use WSDL to create proxy on client
- Modify Service (v2)
- Example add field to data
- Auto Generate WSDL
- Use WSDL v2 to create proxy on client v2
- What happens to clients still on v1 ?
16The contract First Approach
- Design the contract First
- WSDL that conforms to WS-I Basic Profile
- Eventually with evolved version support
- Use test tool to test for conformity
- Be aware of Arrays and nillable types
- On the Server
- Generate the interface from the WSDL
- Implement the Web Service
- On the Client
- Generate the proxy from the WSDL
17Advantages
- "Guaranteed" interoperability
- If both client and service Conform to WS-I Basic
Profile 1.0a - More granular control over contract
- Take full advantage of XSD constructs
- Additional information (ex facets)
- Possible non object representations
- Use of wildcards to allow evolution
- Conformity Claims
18Designing the WSDL
Service
Port
Binding
Port Type
Operation
Message
Part
Part
Message
Part
Part
19Generate the Server Interface
- WSDL.exe /server WSDL.exe /classes WSDL.EXE
/si (.Net Framework 2) - Generates the server interfaces
- Generates all declared types
20Implement the Interface
- Public class myService WebService,
ServerInterface - Implement the WebMethods
21Generate the Client Proxy
- WSDL.exe (or Add WebReference)
- Generates the proxy class
- Generates all declared types
22Tips Tricks
- For better reuse
- Splitting the WSDL (wsdlimport)
- Using XSD files (xsdimport)
- For flexibility
- Make use of wildcards
- With WSE (or custom implementation), make use of
Policy to allow multiple scenarios
23Going Forward
- Advanced architectures
- Conversation models
- Two Way (request/Response)
- One Way
- Duplex
- Service Contract includes policy
- To define possible scenarios
24Going Forward
- Contract First on advanced Web Services (WSE 2)
- Contract involves both WSDL and Policy
- The same approach applies
- Need to implement Policy manually
- Visual Studio 2005
- Visual tools to generate interfaces from contract
- Support for Nillable types
- Basic Profile conformance through attributes
- Intellisense on XML (easier to create WSDL)
25Interoperability Recommendations
- How about WS-Security?
- IBM WebSphere 5.1.2
- Claim conformance to OASIS WSS 1.0
- Reality X509 sign limited, X509 enc WSE-gtWLS
Limited - Good Luck hacking deployment files
- BEA WebLogic 8.1.3
- Claim conformance to OASIS WSS 1.0
- Reality X509 sign OK, X509 enc WSE-gtWLS OK
- Sun JWSDP 1.4
- Claim conformance to OASIS WSS 1.0
- Reality X509 sign OK, X509 enc OK
- Happy XML hacking! ltggt
26Interoperability Recommendations
- More WS-Security Findings
- No WS-SecureConversation yet from competitors
- No WS-Policy yet from competitors
- Moving in the right direction with .xml config
files - Username/Token Support is sketchy
- Digests appear to be difficult to digest
- No support for timestamps from competitors
- Kerberos Support
- No mainstream support
- Wedgetail 3rd party solution
27Integration of Web Services
- How do I enable Web Services for my existing
applications?
This is great, but what about my existing
applications that dont support Web Services
today?
28Integration of Web Services
- How do I enable Web Services for my existing
applications?
Yeah, these tend to be Host Systems
(mainframes), Client/Server applications (VB and
PowerBuilder) and other channels
29Integration of Web Services
- How do I enable Web Services for my existing
applications?
oh, and bear in mind that all of these systems
are in production. I run my business on these!
30Enabling Web Serviceson existing applications
- COM
- COM1.5 components checkBox enables SOAP on the
COM components - COM use COM Interop (managed wrappers) to
access and wrap functionality into WS - Java
- Java beans, EJB,etc
- Object brokers and write ASMX WS that wrapp the
beans - Write WS in Java
- Message and integration Brokers (exemple
Biztalk)
31Host Integration
- 4 x Primary Integration Options
- Direct Data Access
- Give me my 10,000 customers
- BLI Business Logic Interface
- Application Integration
- SLI Screen Logic Interface
- Screen Scraping
- Asynchronous Access
- Batch job completed
- All of the above can be abstracted with Web
Services
32Host Integration
- Microsoft Host Integration Server (HIS) 2004
- Transaction Integrator
- Wrap business rules with COM or .NET wrapper
- Import COBOL, parse declarations, create
interface - Publish type library to Component Services
application - VS.NET and MMC Experience
- Once in .NET, expose through Web Services Façade
33(No Transcript)