Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » WebService/XML/JSON/SOAP/SOA
打印话题 寄给朋友 订阅主题 |
作者 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) [Re:charleszq] |
charleszq
发贴: 36 积分: 0 |
于 2003-12-01 23:58
copy 'helloworld.jar' into the folder 'staging', where we should use the 2nd build.xml to automatically generate the type, and publish the webservices. We should modify the build.xml file as this. ( This is the 2nd build.xml mentioned in the doucment) ------------------------------------------------- <path id="class.path"> <pathelement path="${java.class.path}"/> <pathelement path="."/> <fileset dir="."> <include name="**/*.jar"/> </fileset> </path> <target name="ear"> <autotype javatypes="xdoclet.Address" targetNamespace="http://www.foobar.com/autotypeer" packageName="xdoclet" destdir="." classpathref="class.path"/> <servicegen destEar="ws_basic_statelessSession.ear" contextURI="WebServices"> <classpath refid="class.path"/> <service ejbJar="HelloWorld.jar" targetNamespace="http://www.bea.com/webservices/basic/statelesSession" serviceName="HelloWorldEJB" serviceURI="/HelloWorldEJB" generateTypes="True" expandMethods="True" typeMappingFile="types.xml" style="rpc" > </service> .... ------------------------------------------------- We should add the current folder into the CLASSPATH, because the 'autotypes' task will look for the xdoclet.Address class, which is in helloworld.jar; and the 'servicegen' task will look up the Serialization class which will be generated automatically into the current folder ( it's specified in the build xml file ) we add another task 'autotype' to the target 'ear', and add a new attribute to task 'servicegen', which is typeMappingFile. the attribute 'javatypes' of 'autotype' tells ant which class is the non-built-in type, we should specify the 'classpathref' attribute to let this task know where to find the class 'xdoclet.Address'. the task 'autotype' will generate a types.xml, together with the Serialization class 'AddressCodec.class' in the current folder, which is specified by the attribute 'destdir'. the attribuet 'typeMappingFile' of 'servicegen' will merge 'types.xml' into 'web-services.xml' to show how to handle the non-built-in type, which is Address. After the task 'servicegen', you will see that in the war file generated, Address.class and AddressCodec.class is in the WEB-INF/classes folder, and the content of types.xml is there in the 'web-service.xml' Now we can deploy the generated 'ear' file into weblogic 学java的朋友,请一起来投票让sun推出中文jdk文档!!! |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
16462 | Weblogic Web Service学习笔记(XDoclet, Ant) | charleszq | 155 | 2003-11-30 18:37 |
9361 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) | charleszq | 112 | 2003-11-30 18:40 |
9291 | Continue, Implement non-built-in types | charleszq | 1157 | 2003-12-01 23:44 |
9401 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) | charleszq | 2760 | 2003-12-01 23:58 |
9390 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) | charleszq | 1197 | 2003-12-02 00:04 |
9124 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) | toString | 24 | 2003-12-02 04:27 |
9258 | Creating SOAP Message Handlers to Intercept the SOAP Message | charleszq | 3952 | 2003-12-02 23:27 |
9060 | Have to do some other things these days, update this later. | charleszq | 2 | 2003-12-03 22:16 |
9565 | Re:Weblogic Web Service学习笔记(XDoclet, Ant) | find11 | 6 | 2003-12-06 11:01 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |