Saturday, April 8, 2017

Testing WTC Endpoint

Following samples in https://docs.oracle.com/middleware/1212/wls/WTCCF/samples.htm#WTCCF300 to gain an understanding of what's required.
Downloaded wtc_90.jar and extracted wtc folder to C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\examples
(note: needed to quickstart again to install the samples to wlserver. Should have selected "with samples" when initially installing WebLogic).

Started weblogic 12.2.1.1 via eclipse (with Oracle WebLogic Server Tools but could have also used oepe eclipse download from Oracle) server config with domain home set to C:\Oracle\12c\Middleware\Oracle_Home\user_projects\domains\wl_server.
Downloaded Tuxedo and updated C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010\samples\atmi\simpapp\setenv.cmd to be:
set TUXDIR=C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010
rem set WSNADDR=<address of the server; only if this is a workstation client>
set APPDIR=C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010\samples\atmi\simpapp
set PATH=%TUXDIR%\bin;%APPDIR%;%PATH%
set TUXCONFIG=%APPDIR%\tuxconfig
Opened command window to C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010\samples\atmi\simpapp\. 
Ran setenv.cmd.
change to and ran  C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\setExamplesEnv.cmd
changed to C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\examples\wtc\atmi\simpserv

ran ant. got error: C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\examples\wtc\atmi\simpserv\build.xml:6: java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
Updated C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\examples.properties replacing \ with / for properties examples.home.dir and examples.domain.dir.

ran ant got error:
C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\examples\wtc\atmi\simpserv\build.xml:129: Problem: failed to create task or type wlappc
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Inserted a task def above the appc target - at line 124:
  <property name="wls_root" value="C:/Oracle/12c/Middleware/Oracle_Home" />
  <property name="wls_home" value="${wls_root}/wlserver" />
  <path id="wls.classpath">
    <fileset dir="${wls_home}/modules">
      <include name="*.jar"/>
    </fileset>
  </path>

<taskdef name="wlappc" classpathref="wls.classpath" classname="weblogic.ant.taskdefs.j2ee.Appc"/>

Ran ant.
This time it got pas the deploy task and failed at the buildclient.
opened http://localhost:7001/console/ and clicked deployments. There were four pages of sample deploymets. Went to last page and verified that wtc_tolower was deployed.
The fail messages was:
compile.client:
     [copy] Copying 4 files to C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010\sampl
es\wtc\simpserv
     [exec] 'cl' is not recognized as an internal or external command,
     [exec] operable program or batch file.
     [exec] NLS:4: Cannot open message catalog TUXNT_CAT, set 1, num 77; check T
UXDIR=C:\Oracle\Tux\Middleware\tuxedo11gR1_VS2010, LANG=English_United States.12
52

BUILD FAILED
C:\Oracle\12c\Middleware\Oracle_Home\wlserver\samples\server\examples\src\exampl
es\wtc\atmi\simpserv\build.xml:153: exec returned: 1

Installed Visual Studio 2007 Community selecting C++ options, then ran "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64

Ran ant. Build Successful.
in simpserv, modified both CreateWTCResources.py and DeleteWTCResources.py to have:
servermb=getMBean("Servers/AdminServer")
where "AdminServer" is what's matched in the Targets dropdown for WTC Servers.
changed the port from 1234 to 5679 in build-run.xml
Then ran ant wtcmbeans
Verified the WTC Servers and TDOM1 user was created.

At this point I installed a new Tuxedo and updated its setenv.bat.
copied the dom1config.template to C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp\dom2config and modified it setting:
DMTLOGDEV="C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp\tlog"
...and
TDOM1 NWADDR="//192.168.56.1:5679"
TDOM2 NWADDR="//192.168.56.1:5678"
copied simpserv\tuxfiles\ubbdomain.template to  C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp\ubbmydomain and modified:
replaced "@HOST@" with the hostname of my machine with it being uppercase!
updated vars:
        APPDIR       = "C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp"
        TUXCONFIG    = "C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp\tuxconfig"
        TUXDIR       = "C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015"

copied tolower.c from tuxfiles to  C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp

opened a Developer Command Prompt for VS 2017 and changed to  C:\Oracle\12c\Middleware\OracleHome2\tuxedo12.2.2.0.0_VS2015\samples\atmi\simpapp
ran:
setenv.cmd
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
tmloadcf -y ubbmydomain
dmloadcf -y dom2config
buildclient -f tolower.c o tolower
tmboot -y
verified that port 5679 was opened and listening now in tcpview
ran
tolower.exe ALLSMALL
got back "Returned string is: allsmall"




No comments:

Post a Comment