hengheng123456789

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  297 Posts :: 68 Stories :: 144 Comments :: 0 Trackbacks
我使用的是lomboz-wtp-emf-gef-jem-3.1.2的Eclipse插件,开源的项目。

一、Importing a WSDL file

  1. Select your project in the J2EE Navigator pane, and from the File menu, select Import.
  2. Select File System and click Next.
  3. Click the Browse button on the next page of the wizard to select the directories from which you would like to add the WSDL.
  4. In the import selection panes, use the following methods to select exactly the resources you want to add:
    • Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files.
    • Click Filter Types to filter the current selection for files of a specific type.
    • Click Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.
    • Click Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
  5. Specify the Workbench project or folder that will be the import destination.
  6. When you have finished specifying your import options, click Finish.
二、Creating a new WSDL file

  1. Create a project to contain the WSDL document. It does not matter what kind of project you create.
  2. In the workbench, click File > New > Other > Web Services > WSDL. Click Next.
  3. Select the project or folder that will contain the WSDL file. In the File name field, type the name of the WSDL file, for example MyWSDLFile.wsdl. The name of your XML file must end in .wsdl
  4. Click Next.
  5. Enter the following information:
    1. Target namespace is the namespace for the WSDL file or accept the default (http://www.example.org/MyWSDLFile/). The target namespace is used for the names of messages and the port type, binding and service defined in the WSDL file. The value must take the form of a valid URI (for example, http://www.mycompany.com/myservice/)
    2. The Prefix is the prefix associated with the target namespace.
    3. Select Create WSDL Skeleton if you want the wizard to create the skeleton of the WSDL file. This will generate the WSDL elements required for your service, including bindings, ports and messages. You can then modify these to meet the requirements of your Web service.
    4. If you have chosen to create a WSDL skeleton, select the binding options you want to use in the WSDL document. The options are SOAP and HTTP. If you select SOAP you can then select the encoding style you want to use. If you select HTTP you can select whether to create an HTTP getter or setter.
  6. Click Finish. The WSDL file opens in the WSDL editor.
  • services, which are used to aggregate a set of related ports. These are the root elements of all WSDL files.
  • ports, which specify an address for a binding, thus defining a single communication endpoint.
  • bindings, which specify concrete protocol and data format specifications for the operations and messages defined by a particular port type.
  • port types, which are a set of abstract operations. Each operation refers to an input message and output messages.
  • operations, which refer to input and output messages
  • messages, which represent an abstract definition of the data being transmitted. A message consists of logical parts, each of which is associated with a definition within some type system.
  • parts, which are a flexible mechanism for describing the logical abstract content of a message
  • types, which describe all the data types used between the client and server. WSDL is not tied exclusively to a specific typing system, but it uses the W3C XML Schema specification as its default choice.
  • import statements, which are used to associate a namespace with a document location

  •  

    posted on 2007-02-28 16:28 哼哼 阅读(1686) 评论(2)  编辑  收藏 所属分类: JAVA-Web

    Feedback

    # re: Java Web services 开发之WSDL (使用 Web Tools Project) 2011-05-07 19:06 吴家正

      回复  更多评论
      

    # re: Java Web services 开发之WSDL (使用 Web Tools Project) 2011-05-07 19:06 吴家正
    ··············
      回复  更多评论
      


    只有注册用户登录后才能发表评论。


    网站导航: