Tutorials to .com

Tutorials to .com » Dotnet » Webservice » Continued continued continued continued continued continued continued continued continued continued continued !!!!!!!!!!!!!

Continued continued continued continued continued continued continued continued continued continued continued !!!!!!!!!!!!!

Print View , by: iSee ,Total views: 10 ,Word Count: 2151 ,Date: Sat, 23 May 2009 Time: 6:38 AM

Finally, I give the corresponding save_category This section describes the elements of the Schema definition of the Schema icon to the end of this section.

Figure 1. SOAP API Schema icon



WSDL Service Description

SOAP API for information after the completion of Schema modeling, on the one hand, this data model can be used by the SOAP Interface, when the call occurred when the specific data can use this model to the parameters in addition to the introduction of parameters and generate reports. At the same time, take advantage of this data model, we can generate the corresponding WSDL description, so that the Web service interface document issued to users, the interface document is to be the procedure with the ability of automatic processing.

The following is a detailed definition of WSDL documents: (a complete WSDL document is: sagitta.wsdl)


<? xml version = "1.0"?>
<definitions name = "catalogService"
targetNamespace = "http://www.sagitta.com/wsdl/savecategory.wsdl"
xmlns: tns = "http://www.sagitta.com/wsdl/savecategory.wsdl"
xmlns: myxs = "http://www.sagitta.com/schema/"
xmlns: soap = "http://www.w3.org/2001/06/soap-envelope"
xmlns = "http://schemas.xmlsoap.org/wsdl/">

<import namespace="http://www.sagitta.com/schema/" location=" http://www.sagitta.com/schema/save_category.xsd" />




This is the WSDL file first, which specified the import element in the WSDL document, types system is described by the document http://www.sagitta.com/schema/save_category.xsd here is to import only .


<message name="save_category">
<part name="body" element="myxs:save_category"/>
</ message>

<message name="categoryList">
<part name="body" element="myxs:categoryList"/>
</ message>




The definition of the two sources here: save_category information modeling in front of the Schema has been created complete the structure of the definition of the root element. Which is here used myxs namespace (namespace), the specific definition of the namespace in the document head there. And save_category news categoryList will return the corresponding message, not in the performance of Schema modeling, I have only one element list, and I believe we saw the first part of this article, as well as the first of this series in an article after very clear idea of how to define.


<portType name="save_category_portType">
<operation name="save_category_operation">
<input message="tns:save_category"/>
<output message="tns:categoryList"/>
</ operation>
</ portType>




This part of the definition of a service access point mode the type of call that is the entrance to the type of request / response model, the request message is save_category, and in response to news is categoryList.


<binding name="save_category_soapBinding" type=" save_category_portType ">
<soap:binding style="document" transport=" http://www.w3.org/2001/06/soap-envelope/http">
<operation name="save_category_operation">
<soap:operation soapAction=" http://www.sagitta.com/catalog/">
<input>
<soap: body use = "literal" namespace = "http://www.sagitta.com/schema/"
encodingStyle = "http://www.w3.org/2001/06/soap-encoding" />
</ input>
<output>
<soap: body use = "literal" namespace = "http://www.sagitta.com/schema/"
encodingStyle = "http://www.w3.org/2001/06/soap-encoding" />
</ output>
</ soap: operation>
</ operation>
</ soap: binding>
</ binding>




This part of the service access point definition and the abstract SOAP HTTP binding, describing how SOAP / HTTP to access in accordance with the description of the visit in front of the entrance point of the visit to the entrance of the type of deployment. Which set out the specific SOAP call should be used soapAction is "http://www.sagitta.com/catalog/", and request / response messages are encoded style SOAP specification should be defined in the default encoding style "http: / / www.w3.org/2001/06/soap-encoding ".


<service name="catalogService">
<documentation> Online Web Service for Catalog </ documentation>
<port name="save_category_port" binding="tns:save_category_soapBinding">
<soap:address location="http://www.sagitta.com/catalog/"/>
</ port>
</ service>

</ definitions>




Part of this is the specific definition of Web services, in the name of the Web services catalogService provide a service visit to the entrance (in fact there are many, but here because of the reasons for presentation, just introduced a), to visit the address is " http://www.sagitta.com/catalog/ ", the use of the information model is defined in front of the binding.

UDDI service release

The previous one, we have this tool through the use of WSDL to the Catalog Service for Web services to describe the structure. In order to more potential users to discover the Web service, but also to enhance the interoperability of Web services capabilities and disaster recovery to maintain the ability to connect at the time, we will need to use the UDDI SDK to the Web services registered in UDDI registry to.

Assume that we have been registered prior to a businessEntity, called www.sagitta.com, an online service provider, the key is businessEntity the "434554F4-6E17-1342-EA41-36E642531DA1", then we have to register under this businessEntity a businessService to used to describe the front of the Catalog Service. At the same time need to set up the assumption that we have pre-registered a Service Type (tModel), the tModel description of the needs of our published specification called Web services, the specific content in front of me is the definition of the WSDL document, the UDDI, the registered link is described.

businessService registered SOAP message is as follows, in which the use of Microsoft's test.uddi.microsoft.com site, so we can fill authInfo test the udditest.


<? xml version = "1.0" encoding = "UTF-8"?>
<Envelope Xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<save_service generic="1.0" xmlns="urn:uddi-org:api">
<authInfo> udditest </ authInfo>
<businessService businessKey="434554F4-6E17-1342-EA41-36E642531DA1" serviceKey="">
<name> categoryService </ name>
<description xml:lang="en"> Online Web Service for Catalog </ description>
<bindingTemplates>
<bindingTemplate bindingKey="" serviceKey="">
<description xml:lang="en"> categoryService's BindingTemplate3 </ description>
<accessPoint URLType="http"> http://www.sagitta.com/catalog/ </ accessPoint>
<tModelInstanceDetails>
<tModelInstanceInfo tModelKey="uuid:E31A569A-AEFF-4468-BA4D-2BF22FE4ACEF">
<description xml:lang="en"> Sagitta Web Service Type Description </ description>
<instanceDetails>
<description xml:lang="en"> Sagitta Web Service Type Description </ description>
<overviewDoc>
<description xml:lang="en"> Sagitta Web Service Overview </ description>
<overviewURL> http://www.sagitta.com/wsdl/savecategory.wsdl </ overviewURL>
</ overviewDoc>
</ instanceDetails>
</ tModelInstanceInfo>
</ tModelInstanceDetails>
</ bindingTemplate>
</ bindingTemplates>
</ businessService>
</ save_service>
</ Body>
</ Envelope>




Through the above API call, we will have to register the service into the UDDI registry, which is accessPoint the bindingTemplate service entrance, and the overviewDoc is overviewURL visit to the location of WSDL documents.

Potential users can query the UDDI registry to find Web services overviewURL saved through the URL to find a description of services, and then visit accessPoint address specified to access the service.

When the collapse occurred when the emergency services, Web services may be moved to another host, IP address, or even visit the URL may have changed greatly, when the original integration work will no longer connect. However, due to the existence of UDDI registration, we can automate the process through the means to resolve this problem, makes a similar process of disaster recovery services very quickly.

Specific process in general is:

When the restoration of the service to start automatically to update the UDDI registry's data, will visit the entrance to the new amendments to the URL location;
Client connected to the system when found to not be able to access services when the end will be a regular basis to query UDDI registry to see if the new data and the local cache BindingTemplate were no difference, if any, on the download to a local, re-establish service binding, the completion of the relocation of service connections.
Summary

To this article so far, how to structure Web Service in this series will come to an end, in the entire series, from the beginning of why we need Web services, what is Web services, Web services development tools, Web services made on a conceptual comprehensive introduction. And then to introduce a concrete example of building a model of Web services and Web Service "stack" of the specific application of technology. We hope that this series on understanding and acceptance of the application of next-generation Web services packaging model has a comprehensive help.

Reference

Web Service Technology / comment sites
UDDI-China.ORG, to UDDI-based Web services technology site.
WebServices.ORG, Web services technology integrated site.
IBM developerWorks / Web Service Zone, IBM's Web Services Technology Resource Center
MSDN Online Web Services Developer Resources, Microsoft's Web services, Web site developers resources
ITPapers / Web Service, ITPapers reviews of Web services to resolve B2B e-business applications and integrated interactive InterOP Stack series of technical standards
UDDI Executive White Paper, UDDI-China.org, UDDI.org
UDDI Technical White Paper, UDDI-China.org, UDDI.org
UDDI programmers API specification, UDDI-China.org, UDDI.org
UDDI Data Structure Reference, UDDI-China.org, UDDI.org
Web Service Description Language (WSDL) 1.0, IBM, 25 Sep 2000
SOAP: Simple Object Access Protocol Specification 1.1, IBM, Microsoft, DevelopMentor, 2000
xml Schema Part 0: Primer, W3C, 2 May 2001
Extensible Markup Language (XML) 1.0 (Second Edition), W3C, 6 Oct 2000
About the author

CHAI Xiao-Lu: Shanghai too easy to e-commerce Technology Co., Ltd. (DealEasy) Chief System Architect, XML technology consultant. UDDI-China.org Studios Blue Flame (Blue Blaze Studio) members. UDDI Advisor Group members, WSUI Working Group members. Fudan University in 2000 a master's degree in computer science, computer science in the International Academic Conference (ICSC), the Asia-Pacific Seminar on XML technologies (XML Asia / Pacific'99), the Chinese XML technical seminar (Beijing), computer science journals various types of international and domestic major conferences and journals published more than paper. Specializing in XML-based system integration and data exchange of technical studies, at the same time on the database, object-oriented technologies such as technology and know more about CSCW.


.Net WebService Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.