luni, 5 octombrie 2009

[WCF] Summaries I

WCF

[ServiceContract]
[OperationContract]

WsHttpBindings
.HostNameComparationMode
->
HostNameComparationMode.Strong
.Security.Mode
->SecurityMode.None

ServiceHost _sh = new ServiceHost(typeof(MyService), _baseAddress);
.DescriptorBehavior.Find()
.AddServiceEndpoint()
.Open();

ServiceMetadataBehavior
.HttpGetEnabled
.MetadataExporter


ChannelFactory
.
CreateChannel()
((IChannel)_channel).Close();
_________________________________________________________

svcutil /:t metadata http://localhost:8000/MyService
->
results 3 files:
  • schema.microsoft,com.2003.10.Serialization.xsd
  • tempuri.org.wsdl
  • tempuri.org.xsd
_________________________________________________________

A service is an autonomous (business) system that accepts one or more requests and returns one or more responses via a set of published and well defined interfaces.

Tenet 1: Boundaries Are Explicit
- A well-defined and published public interface
- easy to consume
- use explicit messages
- Keep the service surface area small
- Don’t expose implementation details

Tenet 2: Services Are Autonomous
• Contracts, once published, should not be changed.
____________
BPEL -
Business Process Execution Language -- is a business process language that is based on XML and built using web service standards.

Tenet 3: Services Share the Schema and Contract, Not the Class
Tenet 4: Service Compatibility Is Based on Policy

____________
A component is a piece of compiled code that can be assembled with other components to build applications.
A service is implemented by one or more components and is a higher-level aggregation than a component.
_____________
XSD - XML Schema Definition
WS - MetadataExchange = MEX
-> message to retrieve
_____________

SOAP
= Simple Object Access Protocol
- it is extensible
- works across a no. of standardized underlying netw. protocols
- independent of language/platform/programming model
- can use one of many standard protocols (TCP, SMNP, FTP, MSMQ...)
_____________

Message (SOAP)
  • envelope
  • header (individual headers) & body (Message Name & Data, Fault)
  • 3 types: request msg. , response msg., fault msg
  • has Protocol Header (HTTP, SMNP,...)













_____________

WSDL ("whiz-dull")
- describe service endpoints
- standardization for specifying interfaces and allows for integration













_____________
Endpoint - “an association between a fully specified interface binding and a network address, specified by a URI that may be used to communicate with an instance of a web service.”
- ~~ port
- Service = collection of endpoints

____________
WSDL Document Structure

Operations performed by the web service
- message -- Message used by the web service
- types -- Data types used by the web service
- binding -- Defines a communication endpoint (by means of protocol and address)
to access the service
- Service -- Aggregates multiple ports (in combination with binding and address
into a service)
____________

Niciun comentariu:

Trimiteți un comentariu