在WEBLOGIC SERVER 10中使用JAX-WS和JAXB(2)

發表于:2008-10-27來源:作者:點擊數: 標簽:JAXBWeblogicSERVERWebLogicServer
關鍵字: 接下來,我們將實現DataStagingService Web服務的代碼。首先,運行BEA wsdlc Ant任務,目的是生成主干JAX-WS端點實現和JAXB類。 WebLogic Server 10.1將使用Glassfish Project項目中的jar文件用于其JAX-WS和JAXB實現。type="JAXWS"屬性將指定使用JA
關鍵字:

 

接下來,我們將實現DataStagingService Web服務的代碼。首先,運行BEA wsdlc Ant任務,目的是生成主干JAX-WS端點實現和JAXB類。

WebLogic Server 10.1將使用Glassfish Project項目中的jar文件用于其JAX-WS和JAXB實現。type="JAXWS"屬性將指定使用JAX-WS和JAXB,而不是JAX-RPC。

<target name="run-wsdlc" depends="clean">
<taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask"
classpathref="compile.classpath" />

<property name="client.binding" value="custom-client.xjb"/>

<wsdlc type="JAXWS"
srcWsdl="etc/${wsdl.file.name}.wsdl"
destJwsDir="WebContent/WEB-INF/lib"
destImplDir="${src.dir}"
explode="false"
verbose="${verbose}"
debug="${debug}"
failonerror="true">
<binding dir="etc" includes="${client.binding}"/>
<classpath>
<path refid="compile.classpath"/>
</classpath>
</wsdlc>
; /target>

type="JAXWS"屬性和<binding>子元素需要格外注意。

這時,我們應該能夠運行Ant構建文件了。結果將生成JAX-WS端點實現的代碼。由于我提供了一個定制文件,因此生成代碼將位于com.acmeworld.irad.services.datastaging包中。JAX-WS端點實現的完整代碼比較長,因此我只摘錄了其中的一部分:

public com.acmeworld.irad.services.datastaging.DataStagingResponse.OutputURIs dataStaging(com.acmeworld.irad.services.datastaging.DataStaging.InputURIs inputURIs)
{
DataStagingResponse dataStagingResponse = null;

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97