1
votes

I'm using WebLogic JWSC ant task to generate WebLogic Web Service artifacts from existing wsdl. JWSC generates all the required files and archives them in an ear file.

Since I don't want JWSC task to create a new application.xml, I use applicationXml attribute of the JWSC task by pointing the location of the existing application.xml. Then JWSC task updates the application.xml by adding a new <module> tag successfully. Inside the module tag there is <web-uri> tag. web-uri defines the location of the WAR file. So far so good.

If I set explode attribute to true, the task doesn't create an ear file, put all the required files inside a directory. JWSC task also update the specified application.xml too, but this time it puts the exloded directory's name to web-uri tag without the .war extension altough it is wrong to put here a non war file name.

The correct format should be like that

<module>
  <web>
    <web-uri>petStore.war</web-uri>
    <context-root>store</context-root>
  </web>
</module>

If you don't realize the situation, WebLogic will not find the specified war file (without .war extension)

Does anyone know why JWSC updates the application.xml with a wrong web-uri ?

1

1 Answers

2
votes

We can have the application.xml some where , when we create an app.xml we will give property appxml = "${path-original-application.xml}" below is the snippet

<target name="dist-ear" depends="clean-build-webservices">
    <delete file="${build.dir}/META-INF/application.xml"/>
    <copy todir="${build.dir}/META-INF"  overwrite="true">
        <fileset dir="${webservices.resource.dir}">
            <include name="weblogic-application.xml"/>
        </fileset>
    </copy>
    <ear destfile="${dist.dir}/${webservice.name}.ear" appxml="${viwebservices.appxml.location}">
        <fileset dir="${build.dir}" includes="*.war"/>
        <zipfileset dir="${webservices.src.dir}/jdbc" prefix="jdbc"/>
        <metainf dir="${build.dir}/META-INF"/>
    </ear>
</target>