axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r384802 - in /webservices/axis/trunk/c: build.xml build/build.common.properties build/buildAdminClient.xml src/client/adminclient/AdminClient.cpp src/client/adminclient/AxisAdminService.cpp src/client/adminclient/AxisAdminService.h
Date Fri, 10 Mar 2006 14:24:37 GMT
Author: prestonf
Date: Fri Mar 10 06:24:15 2006
New Revision: 384802

URL: http://svn.apache.org/viewcvs?rev=384802&view=rev
Log:
Modified AdminClient to build with the latest code and re-introduced it back into the build
scripts.

Added:
    webservices/axis/trunk/c/build/buildAdminClient.xml
Modified:
    webservices/axis/trunk/c/build.xml
    webservices/axis/trunk/c/build/build.common.properties
    webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp
    webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp
    webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h

Modified: webservices/axis/trunk/c/build.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build.xml?rev=384802&r1=384801&r2=384802&view=diff
==============================================================================
--- webservices/axis/trunk/c/build.xml (original)
+++ webservices/axis/trunk/c/build.xml Fri Mar 10 06:24:15 2006
@@ -33,7 +33,7 @@
 	- Windows = Microsoft Visual C++ 6.0
 	- Linux   = gcc
 	- AIX     = Visual Age
-    - HP-UX   = aC++   
+        - HP-UX   = aC++   
 	</description>
 
 	<import file="${basedir}/build/buildInitialize.xml"/>
@@ -49,6 +49,7 @@
 	<import file="${basedir}/build/buildSimpleAxisServer.xml"/>
 	<import file="${basedir}/build/buildWSDL2Ws.xml"/>
 	<import file="${basedir}/build/buildDocumentation.xml"/>
+	<import file="${basedir}/build/buildAdminClient.xml"/>
 
     <target name="buildVersionResource" if="windows">
         <delete>
@@ -218,7 +219,7 @@
 		<antcall target="compileServer" inheritall="true"/>
 	</target>
 
-	<target name="buildAll" depends="compile, compileWSDL2Ws, buildWSDL2WsJARFile, buildCBindings,
buildDocumentation"/>
+	<target name="buildAll" depends="compile, compileWSDL2Ws, buildWSDL2WsJARFile, buildCBindings,
buildDocumentation, buildAdminClient"/>
 
 
 	<target name="build" depends="initialize"
@@ -303,6 +304,11 @@
 		<!-- Delete generated Documentation -->
 		<delete dir="${basedir}/docs/apidocs/html"/>
 		<delete dir="${basedir}/docs/apidocs/latex"/>
+	</target>
+
+	<target name="buildAdminClient" depends="initialize"
+	 description="Build AdminClient runtime">
+		<antcall target="createAdminClient" inheritall="true"/>
 	</target>
 
 </project>

Modified: webservices/axis/trunk/c/build/build.common.properties
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build/build.common.properties?rev=384802&r1=384801&r2=384802&view=diff
==============================================================================
--- webservices/axis/trunk/c/build/build.common.properties (original)
+++ webservices/axis/trunk/c/build/build.common.properties Fri Mar 10 06:24:15 2006
@@ -151,6 +151,15 @@
 #     For Unix    :   simple_axis_server will produce simple_axis_server
 simpleAxisServerExecutableName = simple_axis_server
 
+##########################
+# AdminClient Properties #
+##########################
+
+# Name for compiled AdminClient - excluding any prefix or suffix
+# eg: For Windows :   adminClient will produce adminClient.exe
+#     For Unix    :   adminClient will produce adminClient
+adminClientExecutableName = admin_Client
+
 #####################
 # Apache Properties #
 #####################

Added: webservices/axis/trunk/c/build/buildAdminClient.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build/buildAdminClient.xml?rev=384802&view=auto
==============================================================================
--- webservices/axis/trunk/c/build/buildAdminClient.xml (added)
+++ webservices/axis/trunk/c/build/buildAdminClient.xml Fri Mar 10 06:24:15 2006
@@ -0,0 +1,86 @@
+<project name="AdminClient" default="compileAdminClient" basedir="..">
+
+  <!--
+       Compile the Admin Client Library
+  -->
+
+  <target name="createAdminClient">
+    <mkdir dir="${dir.objects}"/>
+    <mkdir dir="${dir.bin}"/>
+
+    <if>
+      <not>
+        <isset property="aix"/>
+      </not>
+      <then>
+        <!--
+             Library name may have been change if windows debug build. Changed in buildInitialize.xml
+        -->
+        <cc outfile="${dir.bin}/${adminClientExecutableName}"
+            objdir="${dir.objects}"
+            exceptions="true"
+            outtype="executable"
+            multithreaded="true">
+
+          <!-- Compilers -->
+          <compiler refid="SolarisCC"/>
+          <compiler refid="Linuxgcc"/>
+          <compiler refid="HP-UXaC++"/>            
+          <compiler extends="VisualC++"/>
+          <compiler refid="OS400icc"/>
+
+          <!-- required libraries -->
+          <syslibset libs="${clientLibraryName}" dir="${dir.bin}"/>
+
+          <!-- Additional compiler flag for Client library on all platforms -->
+          <defineset>
+            <define name="ENABLE_AXISTRACE" if="trace"/>
+          </defineset>
+
+          <!-- Linkers -->
+          <linker refid="SolarisLinker"/>
+          <linker refid="LinuxLinker"/>
+          <linker refid="HP-UXLinker"/>            
+          <linker refid="VisualC++Linker"/>
+          <linker refid="OS400Linker"/>
+
+          <!-- Files to be compiled -->
+          <fileset dir="${dir.src}">
+            <include name="client/adminclient/*.cpp"/>
+            <include name="platforms/windows/*.cpp" if="windows"/>
+            <include name="platforms/unix/*.cpp" if="linux"/>
+            <include name="platforms/unix/*.cpp" if="solaris"/>
+            <include name="platforms/os400/*.cpp" if="os400"/>
+          </fileset>
+        </cc>
+      </then>
+      <else>
+        <cc outfile="${dir.bin}/${adminClientExecutableName}"
+            objdir="${dir.objects}"
+            exceptions="true"
+            multithreaded="true">
+
+          <!-- Compilers -->
+          <compiler refid="AIXxlc"/>
+
+          <!-- required libraries -->
+          <syslibset libs="${clientLibraryName}" dir="${dir.bin}"/>
+
+          <!-- Additional compiler flag for Client library on all platforms -->
+          <defineset>
+            <define name="ENABLE_AXISTRACE" if="trace"/>
+          </defineset>
+
+          <!-- Linkers -->
+          <linker refid="AIXLinker"/>
+
+          <!-- Files to be compiled -->
+          <fileset dir="${dir.src}">
+            <include name="client/adminclient/*.cpp"/>
+            <include name="platforms/aix/*.cpp"/>
+          </fileset>
+        </cc>
+      </else>
+    </if>
+  </target>
+</project>

Modified: webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp?rev=384802&r1=384801&r2=384802&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp Fri Mar 10 06:24:15 2006
@@ -17,65 +17,94 @@
 
 #include "AxisAdminService.h"
 #include <string>
+#include <axis/AxisException.hpp>
+#include <iostream>
+
 using namespace std;
 
 #define FILEBUFFSIZE 256
 
-int main (int argc, char *argv[])
+int main( int argc, char *argv[])
 {
-    int done;
-    int len;
-    char Buff[FILEBUFFSIZE];
-    string Uri = "http://";
-    string wsdd;
-    if (argc < 3)
+    int		done = 0;
+    int		len;
+    char	Buff[FILEBUFFSIZE];
+    string	Uri = "http://";
+    string	wsdd;
+
+    if( argc < 3)
     {
-        printf ("Usage: %s <server> <port> <wsdd file>\n", argv[0]);
-        exit (1);
+        printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+        exit( 1);
     }
+
     Uri += argv[1];
     Uri += ":";
     Uri += argv[2];
     Uri += "/axis/AxisAdmin";
     wsdd = argv[3];
 
-    FILE *file = fopen (wsdd.c_str (), "r");
+    FILE *	file = fopen( wsdd.c_str(), "r");
+
     if (NULL == file)
     {
-        printf ("WSDD file %s cannot be opened\n", wsdd.c_str ());
-        printf ("Usage: %s <server> <port> <wsdd file>\n", argv[0]);
-        exit (1);
+        printf( "WSDD file %s cannot be opened\n", wsdd.c_str ());
+        printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+        exit( 1);
     }
+
     wsdd = "";
-    while (true)
+    
+	while( !done)
     {
-        len = fread (Buff, 1, FILEBUFFSIZE, file);
+        len = fread( Buff, 1, FILEBUFFSIZE - 1, file);
+
         Buff[len] = 0;
-        if (ferror (file))
+
+        if( ferror( file))
         {
-            fclose (file);
-            printf ("WSDD file %s cannot be read\n", wsdd.c_str ());
-            printf ("Usage: %s <server> <port> <wsdd file>\n", argv[0]);
-            exit (1);
+            fclose( file);
+
+            printf( "WSDD file %s cannot be read\n", wsdd.c_str());
+            printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+            exit( 1);
         }
-        done = feof (file);
+
+        done = feof( file);
+
         wsdd += Buff;
-        if (done)
-            break;
     }
-    fclose (file);
 
-    AxisAdminService ws (Uri.c_str ());
-    xsd__base64Binary v;
-    v.__ptr = (unsigned char *) wsdd.c_str ();
-    v.__size = wsdd.length ();
-    if (true_ == ws.updateWSDD (v))
-    {
-        printf ("server wsdd at %s updated successfully\n", Uri.c_str ());
-    }
-    else
-    {
-        printf ("wsdd update at %s failed\n", Uri.c_str ());
-    }
+    fclose( file);
+
+	try
+	{
+		axiscpp::AxisAdminService	ws( Uri.c_str());
+		axiscpp::xsd__base64Binary	v;
+
+		v.set( (axiscpp::xsd__unsignedByte *) wsdd.c_str(), wsdd.length());
+
+		if( axiscpp::true_ == ws.updateWSDD( v))
+		{
+			printf( "server wsdd at %s updated successfully\n", Uri.c_str());
+		}
+		else
+		{
+			printf( "wsdd update at %s failed\n", Uri.c_str());
+		}
+	}
+	catch( axiscpp::AxisException& e)
+	{
+		cout << "Exception : " << e.what() << endl;
+	}
+	catch( exception& e)
+	{
+	    cout << "Unknown exception has occured : " << e.what() << endl;
+	}
+	catch( ...)
+	{
+	    cout << "Unknown exception has occured" << endl;
+	}
+
     return 0;
 }

Modified: webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp?rev=384802&r1=384801&r2=384802&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp Fri Mar 10 06:24:15
2006
@@ -24,10 +24,12 @@
 #include "AxisAdminService.h"
 #include <axis/AxisWrapperAPI.hpp>
 
+AXIS_CPP_NAMESPACE_START
+
 AxisAdminService::AxisAdminService (const char *pchUri)
 {
     m_pCall = new Call ();
-    m_pCall->setProtocol (APTHTTP);
+    m_pCall->setProtocol (APTHTTP1_1);
     m_pCall->setEndpointURI (pchUri);
 }
 
@@ -44,8 +46,8 @@
  */
 xsd__boolean AxisAdminService::updateWSDD (xsd__base64Binary Value0)
 {
-    xsd__boolean Ret;
-    if (AXIS_SUCCESS != m_pCall->initialize (CPP_DOC_PROVIDER, NORMAL_CHANNEL))
+    xsd__boolean Ret = false_;
+    if (AXIS_SUCCESS != m_pCall->initialize (CPP_DOC_PROVIDER))
         return Ret;
     m_pCall->setTransportProperty (SOAPACTION_HEADER, "AxisAdmin#updateWSDD");
     m_pCall->setSOAPVersion (SOAP_VER_1_1);
@@ -56,9 +58,10 @@
         if (AXIS_SUCCESS == m_pCall->checkMessage ("updateWSDDResponse",
             "http://www.opensource.lk/xsd"))
         {
-            Ret = m_pCall->getElementAsBoolean ("return", 0);
+            Ret = *m_pCall->getElementAsBoolean ("return", 0);
         }
     }
     m_pCall->unInitialize ();
     return Ret;
 }
+AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h?rev=384802&r1=384801&r2=384802&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h Fri Mar 10 06:24:15
2006
@@ -25,17 +25,20 @@
 #define __AXISADMINSERVICE_CLIENTSTUB_H__OF_AXIS_INCLUDED_
 
 #include <axis/client/Call.hpp>
+#include <axis/AxisUserAPI.hpp>
+
+AXIS_CPP_NAMESPACE_START
 
 class AxisAdminService
 {
-    private:
-        Call * m_pCall;
     public:
         AxisAdminService (const char *pchUri);
-    public:
         virtual ~ AxisAdminService ();
-    public:
         xsd__boolean updateWSDD (xsd__base64Binary Value0);
+
+	private:
+        Call * m_pCall;
 };
 
+AXIS_CPP_NAMESPACE_END
 #endif 



Mime
View raw message