<?xml version="1.0" encoding="UTF-8" ?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at
 
  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<project name="hello world javascript demo" default="build" basedir=".">
    <property environment="env"/>
    <condition property="cxf.home" value="${env.CXF_HOME}">
        <isset property="env.CXF_HOME"/>
    </condition>
    <property name="cxf.home" location="../.."/>

    <path id="rhino.classpath">
        <fileset dir="${cxf.home}/lib">
            <include name="cxf-rt-frontend-js-*.jar"/>
            <include name="js-*.jar"/>
            <include name="xbean-*.jar"/>
        </fileset>
    </path>

    <property name="thirdparty.classpath" refid="rhino.classpath"/>


    <import file="../common_build.xml"/>        
        
    <target name="client" description="run demo client" depends="build">
        <property name="param" value=""/>
        <cxfrun classname="demo.hwDispatch.client.Client" param1="${basedir}/wsdl/hello_world.wsdl" param2="${op}" param3="${param}"/>
    </target> 
        
    <target name="server" description="run demo server" depends="build">
        <cxfrun classname="org.apache.cxf.js.rhino.ServerApp" param1="-v" param2="-b" param3="http://localhost:9000/SoapContext" param4="${basedir}/src/main/resources/impl.jsx" param5="${basedir}/src/main/resources/impl.js"/>
    </target>
        
    <target name="generate.code">
        <echo level="info" message="Generating code using wsdl2java..."/>
        <wsdl2java file="hello_world.wsdl" servicename.arg="-sn SOAPService1"/>
        <wsdl2java file="hello_world.wsdl" servicename.arg="-sn SOAPService2"/>
        <wsdl2java file="hello_world.wsdl" servicename.arg="-sn SOAPService3"/>
    </target>

</project>
