I have created the ant script for Webservice deployment into SOA server. This script will work for deployment and undeployment of Webservice.
<project name="Helloworld-WS" default="deploy">
<property name="deploy.username" value="weblogic" />
<property name="deploy.password" value="welcome1" />
<property name="deploy.hostname" value="localhost" />
<property name="deploy.port" value="7001" />
<property name="Target.server" value="soa_server1"/>
<property name="project.name" value="Helloworld-WS" />
<property name="proj.dir" value="${outputdir}/${project.name}"/>
<property name="deploy.source" value="${proj.dir}/Helloworld-WS.ear" />
<!-- Setting TaskDefinition -->
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath>
<pathelement location="C:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar"/>
</classpath>
</taskdef>
<!-- Deploying Applications -->
<target name="all">
<wldeploy action="deploy"
name="${project.name}"
source="${deploy.source}"
user="${deploy.username}"
nostage="true"
password="${deploy.password}"
verbose="true"
targets="${Target.server}"
adminurl="t3://${deploy.hostname}:${deploy.port}"/>
</target>
<!-- Uneploying Applications -->
<target name="undeploy">
<wldeploy action="undeploy"
name="${project.name}"
failonerror="false"
user="${deploy.username}"
password="${deploy.password}"
verbose="true"
targets="${Target.server}"
adminurl="t3://${deploy.hostname}:${deploy.port}"/>
</target>
</project>
<project name="Helloworld-WS" default="deploy">
<property name="deploy.username" value="weblogic" />
<property name="deploy.password" value="welcome1" />
<property name="deploy.hostname" value="localhost" />
<property name="deploy.port" value="7001" />
<property name="Target.server" value="soa_server1"/>
<property name="project.name" value="Helloworld-WS" />
<property name="proj.dir" value="${outputdir}/${project.name}"/>
<property name="deploy.source" value="${proj.dir}/Helloworld-WS.ear" />
<!-- Setting TaskDefinition -->
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath>
<pathelement location="C:/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar"/>
</classpath>
</taskdef>
<!-- Deploying Applications -->
<target name="all">
<wldeploy action="deploy"
name="${project.name}"
source="${deploy.source}"
user="${deploy.username}"
nostage="true"
password="${deploy.password}"
verbose="true"
targets="${Target.server}"
adminurl="t3://${deploy.hostname}:${deploy.port}"/>
</target>
<!-- Uneploying Applications -->
<target name="undeploy">
<wldeploy action="undeploy"
name="${project.name}"
failonerror="false"
user="${deploy.username}"
password="${deploy.password}"
verbose="true"
targets="${Target.server}"
adminurl="t3://${deploy.hostname}:${deploy.port}"/>
</target>
</project>