作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在查看 Java EE 6 教程的第 344 页:
这个生成的类在哪里?我包含了应该生成它的服务的 WAR 文件。服务端很好,因为我可以在以下位置看到 WSDL 生成的模式 http://localhost:8080/helloservice/HelloService?WSDL
最佳答案
这是来自 oracle 的 javaee tutorial 的链接:
generate-wsdl 任务 generate-wsdl 任务运行 wscompile,它创建 WSDL 和映射文件。 WSDL 文件描述了 Web 服务,并用于在 Static Stub Client 中生成客户端 stub 。映射文件包含关联 Java 接口(interface)和 WSDL 定义之间的映射的信息。它意味着可移植,以便任何符合 J2EE 的部署工具都可以使用此信息以及 WSDL 文件和 Java 接口(interface),为已部署的 Web 服务生成 stub 和联系。
The files created in this example are MyHelloService.wsdl and mapping.xml. The generate-wsdl task runs wscompile with the following arguments:
wscompile -define -mapping build/mapping.xml -d build -nd build
-classpath build config-interface.xml
The -classpath flag instructs wscompile to read the SEI in the build directory, and the -define flag instructs wscompile to create WSDL and mapping files. The -mapping flag specifies the mapping file name. The -d and -nd flags tell the tool to write class and WSDL files to the build subdirectory.
The wscompile tool reads an interface configuration file that specifies information about the SEI. In this example, the configuration file is named config-interface.xml and contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<service
name="MyHelloService"
targetNamespace="urn:Foo"
typeNamespace="urn:Foo"
packageName="helloservice">
<interface name="helloservice.HelloIF"/>
</service>
</configuration>
This configuration file tells wscompile to create a WSDL file named MyHello
Service.wsdl with the following information:
•The service name is MyHelloService.
•The WSDL target and type namespace is urn:Foo. The choice for what to use for the namespaces is up to you. The role of the namespaces is similar to the use of Java package names--to distinguish names that might otherwise conflict. For example, a company can decide that all its Java code should be in the package com.wombat.*. Similarly, it can also decide to use the namespace http://wombat.com.
•The SEI is helloservice.HelloIF.
The packageName attribute instructs wscompile to put the service classes into the helloservice package.
关于class - JAX-WS - Web 服务生成的类在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5644306/
我正在尝试构建我的第一个 node.js 应用程序,但是,使用 node server.js 运行时,我收到以下错误消息: connect: multipart: use parser (multip
我是一名优秀的程序员,十分优秀!