Rectangle 27 0

In RAD/Eclipse, assuming you have the Portal 8 Stubs and Developer Tools installed, you can go to Project->Project Properties -> Java Build Path, to the Libraries tab, Go to Add Library -> Server Runtime , and you should see "Websphere Portal 8" or whichever version you have installed ... once that library is added your URI problems should be resolved.This essentially adds every jar file in the entire portal installation to the build path. If you do not have the stubs and development tools installed, or if you are using another IDE, you will need to add the jar files manually to the build path ....

Where is the defining JAR of the portlet taglibs in IBM Websphere Port...

websphere ibm websphere-portal
Rectangle 27 0

If Ant can't find the WAS tasks, then it is likely that the WAS API's are missing from the Ant classpath.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

My understanding is that you build the EAR/WAR, then open your browser, login to the admin console, then deploy your application.

If my understanding is correct, just add an instance of the WAS server to your workspace, and then right click on the server, select Add/Remove Projects and add your project. This way, you don't have to build the EAR/WAR file at all... Building your project is enough. If the build is successful, then RAD automatically builds the EAR/WAR and publishes the file to the server.

Atleast that's the way we do it.

I don't want to build it with RAD or WAS Admin Console, just script that i want.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

My understanding is that you build the EAR/WAR, then open your browser, login to the admin console, then deploy your application.

If my understanding is correct, just add an instance of the WAS server to your workspace, and then right click on the server, select Add/Remove Projects and add your project. This way, you don't have to build the EAR/WAR file at all... Building your project is enough. If the build is successful, then RAD automatically builds the EAR/WAR and publishes the file to the server.

Atleast that's the way we do it.

I don't want to build it with RAD or WAS Admin Console, just script that i want.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

If Ant can't find the WAS tasks, then it is likely that the WAS API's are missing from the Ant classpath.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

com.ibm.websphere.ant.tasks.WSDL2Java
lib.path
<taskdef name="wsdl2java"
    classname="com.ibm.websphere.ant.tasks.WSDL2Java">
    <classpath refid="lib.path"/>
</taskdef>

If you're on UNIX, you can scan for this class using code similar to:

find . -type f -name "*.jar" | while read file
do
    jar tvf $file | grep WSDL2Java && echo $file
done

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

com.ibm.websphere.ant.tasks.WSDL2Java
lib.path
<taskdef name="wsdl2java"
    classname="com.ibm.websphere.ant.tasks.WSDL2Java">
    <classpath refid="lib.path"/>
</taskdef>

If you're on UNIX, you can scan for this class using code similar to:

find . -type f -name "*.jar" | while read file
do
    jar tvf $file | grep WSDL2Java && echo $file
done

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

I read this IBM Article and tried to run ant script by RAD

<?xml version="1.0" encoding="UTF-8"?>                     
<project name="xx" default="build" basedir=".">

  <property name="WSAS.home" value="C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6" />

  <path id="lib.path">
    <pathelement location="${WSAS.home}/lib/*.jar"/>
  </path>                                                                                               

  <taskdef name="wsdl2java"
           classname="com.ibm.websphere.ant.tasks.WSDL2Java">
    <classpath refid="lib.path"/>
  </taskdef>

  <taskdef name="java2wsdl"
           classname="com.ibm.websphere.ant.tasks.Java2WSDL">
    <classpath refid="lib.path"/>
  </taskdef>

  <taskdef name="endptenabler"
           classname="com.ibm.websphere.ant.tasks.endptEnabler">
    <classpath refid="lib.path"/>
  </taskdef>

  <taskdef name="wsdeploy"
           classname="com.ibm.websphere.ant.tasks.WSDeploy">
    <classpath refid="lib.path"/>
  </taskdef>

  <taskdef name="wsejbdeploy"
           classname="com.ibm.websphere.ant.tasks.WsEjbDeploy">
     <classpath refid="lib.path"/>
  </taskdef>

  <taskdef name="installapp"
           classname="com.ibm.websphere.ant.tasks.InstallApplication">
    <classpath refid="lib.path"/>
  </taskdef>

  <target name="build" depends="init, j2w, w2j, buildapp, makejar, makeear, endpt, ejbdeploy, deployws, install"/>

  <target name="init">
    <delete dir="${WSAS.home}/bin/tmp"/>
    <mkdir dir="${WSAS.home}/bin/tmp/META-INF"/>
    <copy toDir="${WSAS.home}/bin/tmp/META-INF" overwrite="true">
      <fileset dir="${WSAS.home}/bin">
        <include name="application.xml"/> 
        <include name="ejb-jar.xml"/> 
      </fileset>
    </copy>
  </target>

  <target name="j2w">

    <javac srcdir="${WSAS.home}/bin"
           destdir="${WSAS.home}/bin">
      <classpath refid="lib.path"/>
      <include name="WSExample.java"/>
    </javac> 

    <java2wsdl output="${WSAS.home}/bin/tmp/META-INF/wsdl/WSExample.wsdl"
               classpath="${WSAS.home}/bin"
               className= "example.WSExample"
               namespace="http://example"
               namespaceImpl="http://example"
               location="http://localhost:9080/example/services/WSExample"
               style="document"
               use="literal">
      <mapping namespace="http://example" package="example"/>
    </java2wsdl>

  </target>                


  <target name="w2j">

    <wsdl2java url="${WSAS.home}/bin/tmp/META-INF/wsdl/WSExample.wsdl"
               output="${WSAS.home}/bin/tmp"
               role="develop-server"
               container="EJB"
               introspect="false"
               verbose="false">
    </wsdl2java>

  </target>


  <target name="buildapp">  

    <copy toDir="${WSAS.home}/bin/tmp/example" overwrite="true">
      <fileset dir="${WSAS.home}/bin">
        <include name="WSExampleSoapBindingImpl.java"/> 
      </fileset>
    </copy>

    <javac srcdir="${WSAS.home}/bin/tmp"
           destdir="${WSAS.home}/bin/tmp">
      <classpath refid="lib.path"/>
      <include name="**/*.java"/>
    </javac> 

    <replace file="${WSAS.home}/bin/tmp/META-INF/webservices.xml"
             token="??SET THIS TO ejb-name ELEMENT OF ejb-jar.xml??"
             value="WSExample"/>

  </target>


  <target name="makejar">

    <jar jarfile="${WSAS.home}/bin/tmp/WSExample.jar">
      <fileset dir="${WSAS.home}/bin/tmp">
        <include name="**/*.class"/> 
      </fileset>
      <zipfileset dir="${WSAS.home}/bin/tmp/META-INF" prefix="META-INF">
        <include name="**/*"/>
      </zipfileset>
    </jar>

  </target>


  <target name="makeear">

    <ear earfile="${WSAS.home}/bin/tmp/WSExample.ear"
         appxml="${WSAS.home}/bin/tmp/META-INF/application.xml">
      <fileset dir="${WSAS.home}/bin/tmp">
        <include name="WSExample.jar"/>
      </fileset>
    </ear>

  </target>

  <target name="endpt">

    <endptenabler earfile="${WSAS.home}/bin/tmp/WSExample.ear">
      <property key="verbose" value="false"/>
      <property key="WSExample.transports" value="http"/>
      <property key="WSExample.http.rounterModuleName" value="WSExample_HTTPRouter.war"/>
      <property key="WSExample.http.contextRoot" value="wsexample"/>
    </endptenabler>

  </target>               


  <target name="ejbdeploy">

    <wsejbdeploy inputJar="${WSAS.home}/bin/tmp/WSExample.ear"
                 wasHome="${WSAS.home}"
                 workingDirectory="${WSAS.home}/tmp"
                 outputJar="${WSAS.home}/bin/tmp/WSExampleDeployed.ear"               
                 codegen="false"
                 keepGenerated="false"
                 quiet="true"
                 noValidate="false"
                 noWarnings="false"
                 noInform="false"
                 failonerror="true"
                 trace="false"/>

  </target>  


  <target name="deployws">

    <wsdeploy classPath="" debug="false"
              ignoreErrors="false"
              inputFile="${WSAS.home}/bin/tmp/WSExampleDeployed.ear"
              noValidate="false"
              outputFile="${WSAS.home}/bin/tmp/WSExampleReadyToInstall.ear"
              trace="false"/>

  </target>


  <target name="install">

    <installapp wasHome="${WSAS.home}"
                ear="${WSAS.home}/bin/tmp/WSExampleReadyToInstall.ear"
                options="-usedefaultbindings"
                conntype="NONE"
                failonerror="true"/>

  </target>

</project>
BUILD FAILED: D:\SourceCode\Server (RAD)\Common\build.xml:11: taskdef class com.ibm.websphere.ant.tasks.WSDL2Java cannot be found

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

If you're using a brand new version of Eclipse (like Helios or Indigo) that has the Marketplace, then there is the possibility of deploying directly to Websphere. Here's a link about it: Announcing the new WebSphere Application Server Developer Tools for Eclipse V8.0.4

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

com.ibm.websphere.ant.tasks.WSDL2Java
lib.path
<taskdef name="wsdl2java"
    classname="com.ibm.websphere.ant.tasks.WSDL2Java">
    <classpath refid="lib.path"/>
</taskdef>

If you're on UNIX, you can scan for this class using code similar to:

find . -type f -name "*.jar" | while read file
do
    jar tvf $file | grep WSDL2Java && echo $file
done

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

If you're using a brand new version of Eclipse (like Helios or Indigo) that has the Marketplace, then there is the possibility of deploying directly to Websphere. Here's a link about it: Announcing the new WebSphere Application Server Developer Tools for Eclipse V8.0.4

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

If Ant can't find the WAS tasks, then it is likely that the WAS API's are missing from the Ant classpath.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

If you're using a brand new version of Eclipse (like Helios or Indigo) that has the Marketplace, then there is the possibility of deploying directly to Websphere. Here's a link about it: Announcing the new WebSphere Application Server Developer Tools for Eclipse V8.0.4

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm
Rectangle 27 0

My understanding is that you build the EAR/WAR, then open your browser, login to the admin console, then deploy your application.

If my understanding is correct, just add an instance of the WAS server to your workspace, and then right click on the server, select Add/Remove Projects and add your project. This way, you don't have to build the EAR/WAR file at all... Building your project is enough. If the build is successful, then RAD automatically builds the EAR/WAR and publishes the file to the server.

Atleast that's the way we do it.

I don't want to build it with RAD or WAS Admin Console, just script that i want.

java - How to build EAR/WAR for Websphere Application Server by Eclips...

java java-ee websphere ibm